Public report of mathrunet/flutter_masamune, published 17 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 17 November 2026, 16:03 UTC · Survey ID cd_03ce10c1e57a4c789660027e85aea84a

mathrunet/flutter_masamune

Measured 17 November 2026, 16:01 UTC, at code version 0b4dde6

First survey, so nothing to compare with yet
CAI score 52.7out of 100 Adequate
CriticalWeakAdequateStrongExemplary

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 271,559 lines of product code in 106 projects, tests not counted · Estimated rebuild effort: about 2.2 person-years · Weakest lens: Production Readiness, 43.1

Findings by how serious they are

25 critical 2178 serious 247 minor

15 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

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

55of 55 dimensions measured by tools.
2426of 2450 findings point to an exact file and line, so you can open each one in the code. The other 24 concern the repository as a whole, such as missing documentation.
55dimensions across 6 lenses, read from 271,559 lines of product code in 106 projects.
Chapters

Executive summary

mathrunet/flutter_masamune falls short of our standard for production because we found no automated security scanning of the code, its secrets or its dependencies. It scores 52.7 out of 100 and is rated Adequate, and 16 of its 25 critical findings are security problems.

Production Readiness, at 43.1, is the weakest lens and counts most in the score. The best first step is adding automated security scanning, worth about 7.8 points. Adding structured logging comes next, worth about 4.2 points. Raising Production Readiness to 70 would lift the score to about 60.7.

Ten pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Four passwords or keys are open to anyone who can read the repository, and five sets of files in separate parts keep changing together, which points to hidden dependencies. Pinning each tool to an exact version, replacing each exposed password or key and making the hidden dependencies explicit would close these risks. Limiting each secret to its own step would fix the two secrets exposed to more of the pipeline than needed. The four parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.

The product code is 271,559 lines, about €320,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 43.1 · counts for 46%Security and Compliance 57.7 · counts for 25%Performance 60.0 · counts for 14%Code Health 61.9 · counts for 8%Maturity 63.5 · counts for 4%Architecture 94.1 · counts for 2%

If Production Readiness rose from 43.1 to 70, the lowest score rated Strong, the score would rise from 52.7 to about 60.7.

Code composition: what the lines of code are
Product code 83%Tests 17%
Rebuild cost: about €320,000 · Estimate
Cost to rebuild€110,000 to €530,000, for 1,751 to 5,555 hours of work, about 2.2 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 53. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 271,559 lines of product code
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. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.
Raises the score by about 7.8 points · Medium effort · Security & performance tooling
2
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Raises the score by about 4.2 points · Medium effort · Observability
3
Stop committing the lockfile of a package you publish — `git rm --cached pubspec.lock` and add it to `.gitignore`, so your own CI resolves the version ranges you declare instead of a pin no consumer shares.
Raises the score by about 3.3 points · Medium effort · Release 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 €320,000 to build again, about 2.2 person-years of work. Its weakest lens is Production Readiness, at 43.1 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing. Of all the actions in this report, it raises the score most for the work it takes: about 7.8 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 7% to 16% on every change. The history of the code shows how much it changes: about 74,867 lines over the last 90 days, which is about 303,627 lines a year. At that pace, the extra work comes to an estimated 54 to 323.7 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch katana katana katana_auth katana_auth katana_auth->katana katana_logger katana_logger katana_auth->katana_logger katana_platform_info katana_platform_info katana_auth->katana_platform_info katana_auth_firebase katana_auth_firebase katana_auth_firebase->katana katana_auth_firebase->katana_auth katana_firebase katana_firebase katana_auth_firebase->katana_firebase katana_auth_firebase->katana_platform_info katana_builder katana_builder katana_builder->katana katana_firebase->katana katana_functions katana_functions katana_functions->katana katana_functions_firebase katana_functions_firebase katana_functions_firebase->katana katana_functions_firebase->katana_firebase katana_functions_firebase->katana_functions katana_functions_firebase->katana_platform_info katana_localization_annotation katana_localization_annotation katana_localization_annotation->katana katana_localization_builder katana_localization_builder katana_localization_builder->katana katana_localization_builder->katana_builder katana_localization_builder->katana_localization_annotation katana_logger->katana katana_logger->katana_platform_info katana_model katana_model katana_model->katana katana_model->katana_logger katana_model_firestore katana_model_firestore katana_model_firestore->katana katana_model_firestore->katana_firebase katana_model_firestore->katana_model katana_model_firestore->katana_platform_info katana_model_local katana_model_local katana_model_local->katana katana_model_local->katana_model katana_model_local->katana_platform_info katana_platform_info->katana katana_router katana_router katana_router->katana katana_router->katana_logger katana_storage katana_storage katana_storage->katana katana_storage->katana_platform_info masamune masamune masamune->katana masamune->katana_auth masamune->katana_functions masamune->katana_logger masamune->katana_model masamune->katana_model_local masamune->katana_platform_info masamune->katana_router masamune->katana_storage masamune_annotation masamune_annotation masamune->masamune_annotation masamune_annotation->katana masamune_auth_firebase masamune_auth_firebase masamune_auth_firebase->katana masamune_auth_firebase->katana_auth masamune_auth_firebase->katana_auth_firebase masamune_auth_firebase->katana_firebase masamune_auth_firebase->masamune masamune_builder masamune_builder masamune_builder->katana masamune_builder->katana_builder masamune_builder->katana_localization_annotation masamune_builder->katana_localization_builder masamune_builder->masamune_annotation __more__ +86 more projects

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.

33 modules, with 33 dependencies between them. One loop runs through 8 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 net.mathru.masamune_ai_debugger2 net.mathru.masamune_ai_debugger.MasamuneAIDebuggerVoice3 packages.masamune_handover.tools.apple_user_migration4 packages.masamune_handover.tools.apple_user_migration.2_exchange_and_update5 repository6 repository.buttons7 repository.controller8 repository.firebase9 repository.generator10 repository.modal11 repository.ui12 repository.actions13 repository.common14 repository.form15 repository.masamune16 repository.model17 repository.scoped18 repository.value19 repository.adapter20 repository.models21 repository.src22 repository.action23 repository.adapters24 repository.command25 repository.converter26 repository.delegate27 repository.extension28 repository.functions29 repository.loggable30 repository.provider31 repository.query32 repository.snippet33 repository.tools
1 net.mathru.masamune_ai_debugger
2 net.mathru.masamune_ai_debugger.MasamuneAIDebuggerVoice
3 packages.masamune_handover.tools.apple_user_migration
4 packages.masamune_handover.tools.apple_user_migration.2_exchange_and_update
5 repository
6 repository.buttons
7 repository.controller
8 repository.firebase
9 repository.generator
10 repository.modal
11 repository.ui
12 repository.actions130
13 repository.common8
14 repository.form21
15 repository.masamune12
16 repository.model28
17 repository.scoped2
18 repository.value75
19 repository.adapter11395
20 repository.models4475462
21 repository.src41344312
22 repository.action147
23 repository.adapters211
24 repository.command218
25 repository.converter126
26 repository.delegate4
27 repository.extension4
28 repository.functions16
29 repository.loggable8
30 repository.provider23
31 repository.query6
32 repository.snippet7
33 repository.tools24252
Uses a module listed above itPart of a loopThe module itself
1 net.mathru.masamune_ai_debugger2 net.mathru.masamune_ai_debugger.MasamuneAIDebuggerVoice3 packages.masamune_handover.tools.apple_user_migration4 packages.masamune_handover.tools.apple_user_migration.2_exchange_and_update5 repository6 repository.buttons7 repository.controller8 repository.firebase9 repository.generator10 repository.modal11 repository.ui12 repository.actions13 repository.common14 repository.form15 repository.masamune16 repository.model17 repository.scoped18 repository.value19 repository.adapter20 repository.models21 repository.src22 repository.action23 repository.adapters24 repository.command25 repository.converter26 repository.delegate27 repository.extension28 repository.functions29 repository.loggable30 repository.provider31 repository.query32 repository.snippet33 repository.toolsnet.mathru.masamune_ai_debugger1net.mathru.masamune_ai_debugger.MasamuneAIDebuggerVoice2packages.masamune_handover.tools.apple_user_migration3packages.masamune_handover.tools.apple_user_migration.2_exchange_and_update4repository5repository.buttons6repository.controller7repository.firebase8repository.generator9repository.modal10repository.ui11repository.actions12repository.common13repository.form14repository.masamune15repository.model16repository.scoped17repository.value18repository.adapter19repository.models20repository.src21repository.action22repository.adapters23repository.command24repository.converter25repository.delegate26repository.extension27repository.functions28repository.loggable29repository.provider30repository.query31repository.snippet32repository.tools3313082112282751139544754624134431214721121812644168236724252

At a glance — Code Health · 61.9 · Adequate · gated by D2 ·

At a glance — Architecture · 94.1 · Exemplary ·

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

At a glance — Readiness · 43.1 · Weak · gated by P3 ·

At a glance — Security · 57.7 · Checked 4 of 9 · gated by D36 ·

At a glance — Performance · 60.0 · Adequate ·

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 — Injection12High / Critical
A07:2025 — Authentication Failures5High / Critical
A03:2025 — Software Supply Chain Failures5Medium

Roadmap

Top priorities: Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing; Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production; Stop committing the lockfile of a package you publish — `git rm --cached pubspec.lock` and add it to `.gitignore`, so your own CI resolves the version ranges you declare instead of a pin no consumer shares.

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

Do thisHelpsEffortDimension
Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.+7.8 ptsMediumSecurity & performance tooling
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+4.2 ptsMediumObservability
Stop committing the lockfile of a package you publish — `git rm --cached pubspec.lock` and add it to `.gitignore`, so your own CI resolves the version ranges you declare instead of a pin no consumer shares.+3.3 ptsMediumRelease Hygiene
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.dart.+1.4 ptsLowADR Quality
Run the test suite in CI via an explicit runner step (`flutter test` for the toolchain this pipeline already uses) and gate merges on it.+2.1 ptsMediumCI/CD gates
Resolve the 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (3), REDACTED.+0.9 ptsLowSecrets (history)
Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.+1.8 ptsMediumAsync & latency hygiene
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2).+0.9 ptsLowStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart3.5SlopChange Coupling: Boundary-crossing change coupling: firestore_model_adapter.dart ↔ local_model_adapter.dart
packages/katana_model/lib/src/model_field_value.dart4.0MixedCyclomatic Complexity: ModelFieldValue.fromMap (cyclomatic 25)
packages/katana_model/lib/src/model_uri.dart4.4MixedCyclomatic Complexity: ModelImageUriFilter.hasMatch (cyclomatic 23)
packages/katana_cli/lib/action/app/deeplink.dart4.8MixedCyclomatic Complexity: AppDeeplinkCliAction.exec (cyclomatic 71)
packages/masamune_markdown/lib/src/markdown_field.dart4.8MixedCyclomatic Complexity: MarkdownFieldState.build (cyclomatic 52)
packages/masamune_markdown/lib/src/markdown_value.dart4.8MixedCyclomatic Complexity: MarkdownLineValue._parseInlineMarkdown (cyclomatic 22)
packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart4.8MixedCyclomatic Complexity: CsvDocumentSourceModelAdapter.fromCsv (cyclomatic 20)
packages/masamune_painter/lib/src/painter_controller.dart4.8MixedCyclomatic Complexity: PainterController.moveSelectedLayersForward (cyclomatic 17)
packages/katana_form/lib/form/form_chips_field.dart4.8MixedGod Classes: MethodTooLong: _FormChipsField.build
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
packages/katana_cli/lib/action/app/icon.dart4.8MixedCyclomatic Complexity: AppIconCliAction.exec (cyclomatic 27)
packages/masamune_painter/lib/src/form_painter_field.dart4.8MixedCyclomatic Complexity: FormPainterFieldState._getResizeDirection (cyclomatic 17)
packages/katana_model/lib/src/model_locale.dart4.8MixedCyclomatic Complexity: ModelLocalizedValueFilter._hasMatch (cyclomatic 31)
packages/katana_model/lib/src/model_geo_value.dart4.8MixedCyclomatic Complexity: ModelGeoValueFilter._hasMatch (cyclomatic 29)
packages/katana_cli/lib/action/cloudflare/init.dart4.8MixedCyclomatic Complexity: CloudflareInitCliAction.exec (cyclomatic 34)
packages/katana_model_local/lib/adapter/json_source_model_adapter.dart4.9MixedCyclomatic Complexity: JsonCollectionSourceModelAdapter.fromJson (cyclomatic 19)
packages/katana_model/lib/adapter/runtime_model_adapter.dart5.0MixedChange Coupling: Boundary-crossing change coupling: runtime_model_adapter.dart ↔ local_model_adapter.dart
REDACTED5.1MixedSecrets (history): REDACTED: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED

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

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

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

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

Could not be resolved — 15

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 55 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 — 55 dimensions across the health lenses
D1D2D3D4D5D6D13D14D15D16D17D19D20D26D28D29D30D34D35D36D43D44AX10AX3AX4AX6AX8AX9GD1IC1M1M2M3M4P1P10P2P3P6PF3X1X12X13X16X17X18X2X21X25X27X28X29X3X30X5

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, 2426 of 2450 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 01a1ea3e-2ad7-7b45-8804-ea77b00338c4.

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.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.dart) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.dart) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 47 Maven/Gradle manifest(s) were read, stating a version for 23 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (pubspec.yaml), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in packages/katana_scoped/lib/src/scoped.dart, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: a native UI project (packages/masamune_lints/pubspec.yaml). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'package:cloud_firestore' is imported (packages/katana_model_firestore/lib/katana_model_firestore.dart:19), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C2 Access Controls — 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. 'package:firebase_storage' is imported (packages/katana_storage_firebase/lib/adapter/web/web.dart:8), but this repository stands up no server and carries no migration or rules file this check reads, so who may read and write its data could not be decided.
  • C3 Audit Trail — 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. 'package:cloud_firestore' is imported (packages/katana_model_firestore/lib/katana_model_firestore.dart:19), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — 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. 'package:cloud_firestore' is imported (packages/katana_model_firestore/lib/katana_model_firestore.dart:19), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — 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. 'package:cloud_firestore' is imported (packages/katana_model_firestore/lib/katana_model_firestore.dart:19), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P6 Release Hygiene — 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. 63 further occurrence(s) are not listed individually; the score already reflects all 103.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 51 further occurrence(s) are not listed individually; the score already reflects all 91.

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.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • 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.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

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

183 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was FirebaseInitCliAction.exec at 134. A further 22 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being AgoraVideoProfile.bitrate at 62 — they are counted neither in the figure above nor in this dimension's score. 11 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: packages/masamune_agora/lib/src/agora_video_profile.dart (AgoraVideoProfile.bitrate at 62), packages/masamune_util/lib/src/japanese_prefectures.dart (JapanesePrefectures.label at 49), packages/masamune_ai_firebase/lib/src/firebase_ai_model.dart (FirebaseAIModel.inputPriceDollarPerToken at 39), packages/masamune_auth_github_firebase/lib/src/github_auth_scope.dart (GithubAuthScope.scope at 37), packages/katana_firebase/lib/firebase/firebase_region.dart (FirebaseRegion.value at 28), and 6 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

FirebaseInitCliAction.exec (cyclomatic 134)packages/katana_cli/lib/action/firebase/init.dart:476
FirebaseAuthenticationCliAction.exec (cyclomatic 121)packages/katana_cli/lib/action/firebase/authentication.dart:45
MarkdownController._replaceTextSingleField (cyclomatic 113)packages/masamune_markdown/lib/src/markdown_controller.dart:1000
MarkdownController._replaceTextMultiField (cyclomatic 112)packages/masamune_markdown/lib/src/markdown_controller.dart:1667
GithubModelAdapter.loadCollection (cyclomatic 110)packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1444

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

What to do

  1. Bring the 11 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with FirebaseInitCliAction.exec (cyclomatic 134), FirebaseAuthenticationCliAction.exec (cyclomatic 121), MarkdownController._replaceTextSingleField (cyclomatic 113). — 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 11 together lifts Cyclomatic Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

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

343 method(s) exceeded the cognitive complexity threshold of 15; the worst was MobilePurchaseMasamuneAdapter.listenPurchase at 307.

MobilePurchaseMasamuneAdapter.listenPurchase (cognitive 307)packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:94
FirebaseInitCliAction.exec (cognitive 214)packages/katana_cli/lib/action/firebase/init.dart:476
MarkdownController._replaceTextSingleField (cognitive 211)packages/masamune_markdown/lib/src/markdown_controller.dart:1000
FirebaseAuthenticationCliAction.exec (cognitive 210)packages/katana_cli/lib/action/firebase/authentication.dart:45
MarkdownController._replaceTextMultiField (cognitive 210)packages/masamune_markdown/lib/src/markdown_controller.dart:1667

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

What to do

  1. Bring the 1 body over 240 down to 240 or less in Cognitive Complexity — start with MobilePurchaseMasamuneAdapter.listenPurchase (cognitive 307). — Refactoring it lifts Cognitive Complexity from 3.2 to about 3.6/10.

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

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

174 god class(es) detected.

MethodTooLong: FirebaseInitCliAction.exec · ×72packages/katana_cli/lib/action/firebase/init.dart:476
FileTooLong: command/create.dart · ×47packages/katana_cli/lib/command/create.dart
ClassTooLong: MarkdownController · ×28packages/masamune_markdown/lib/src/markdown_controller.dart:3
TooManyMethods: CollectionBase · ×27packages/katana_model/lib/src/collection_base.dart:3

What to do

  1. Resolve the 72 MethodTooLong finding(s) in God Classes — start with github_model_adapter.dart (4), markdown_controller.dart (4), markdown_field.dart (4). — One of this dimension's main actionable groups (72 warning-level).
  2. Resolve the 47 FileTooLong finding(s) in God Classes — start with create.dart, markdown_field.dart, app_theme_data.dart. — One of this dimension's main actionable groups (47 warning-level).
  3. Resolve the 28 ClassTooLong finding(s) in God Classes — start with markdown_field.dart (2), markdown_controller.dart, app_theme_data.dart. — One of this dimension's main actionable groups (28 warning-level).

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

D4 · Code Duplication4.5 / 10Weak✓ 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 4.5 / 10 · rule-coverage 100% · ceiling Verified

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

Duplicated block (8 lines × 2) · ×36packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:650
Duplicated block (10 lines × 2) · ×34packages/katana_cli/lib/action/cloudflare/kv.dart:343
Duplicated block (14 lines × 2) · ×24packages/katana_cli/lib/action/ecosystem/ecosystem.dart:60
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×22packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:280
Duplicated block (13 lines × 2) · ×22packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:721

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

What to do

  1. Resolve the 36 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with local_auth_adapter.dart (6), firestore_model_adapter.dart (2), form_pin_field.dart (2). — One of this dimension's main actionable groups (36 warning-level).
  2. Resolve the 34 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with cached_firestore_model_adapter.dart (3), builder.dart (2), universal_grid_view.dart (2). — One of this dimension's main actionable groups (34 warning-level).
  3. Resolve the 24 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with functions_storage_adapter.dart (2), ecosystem.dart, form_enum_dropdown_field.dart. — One of this dimension's main actionable groups (24 warning-level).

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

D5 · Coupling9.3 / 10Stronggated by 9 serious findings✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

106 production modules (Gradle+pub), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 9 module(s) off the main sequence, with abstractness counted on 104 of the 106 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: katana · ×9

What to do

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

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

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

201 of 877 classes have LCOM4 above 3.

Low cohesion: CollectionBase (LCOM4 69) · ×201packages/katana_model/lib/src/collection_base.dart:3

What to do

  1. Resolve the 201 Low cohesion finding(s) in Cohesion (LCOM4) — start with create.dart (14), model_field_value.dart (9), main.page.dart (6). — One of this dimension's main actionable groups (201 warning-level).

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

D13 · REDACTED 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

REDACTED 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 68 resolved pub package(s) use a banned license. Licences were read from pub.dev's analysis of each package's licence file, over every package this repository's pubspec.lock resolves from pub.dev, direct and transitive, at the locked version; the 2 package(s) the lock marks direct dev are excluded, and SDK, path and git packages have no registry release to read. pub.dev analyses only recent releases, so for 23 package(s) locked at an older version the licence read is that of the package's latest analysed release, not of the locked one.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.7 / 10Stronggated by 19 serious findings✓ 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 9.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: packages/katana_cli/lib/action/firebase/init.dart (10×134=1340); packages/katana_cli/lib/action/cloudflare/tidb.dart (11×57=627); packages/katana_cli/lib/command/apply.dart (13×30=390)

Hotspot: packages/katana_cli/lib/action/firebase/init.dart · ×19packages/katana_cli/lib/action/firebase/init.dart:476

What to do

  1. Resolve the 19 Hotspot finding(s) in Churn × Complexity Hotspots — start with init.dart (2), tidb.dart, apply.dart. — One of this dimension's main actionable groups (19 warning-level).

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

D16 · Bus Factor9.2 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

69 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/masamune_markdown/lib/src/markdown_field.dart. Counted over 845 of the 1382 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D17 · Explicit Debt9.8 / 10Stronggated by 167 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

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

216 deducted task-comment markers across 271559 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×164packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:93
TodoComment repeated across 19 filespackages/katana_cli/lib/command/code/collection.dart:230
TodoComment repeated across 17 filespackages/katana_cli/lib/command/code/modal.dart:89
TodoComment repeated across 14 filespackages/katana_cli/lib/command/code/page.dart:138

What to do

  1. Resolve the 164 TodoComment finding(s) in Explicit Debt — start with model_adapter.dart (19), create.dart (13), collection.dart (9). — One of this dimension's main actionable groups (164 warning-level).
  2. Resolve the 1 TodoComment repeated across 19 files finding(s) in Explicit Debt — start with collection.dart. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 TodoComment repeated across 17 files finding(s) in Explicit Debt — start with modal.dart. — One of this dimension's main actionable groups (1 warning-level).

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

D19 · Documentation Quality9.7 / 10Exemplary✓ Tool-verified

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

1 of 2 documentation facets pass in full; short on: F2 example. 110 document(s) read across 109 unit(s).

Documentation: no build, run or usage example · ×6packages/masamune_functions_cloudflare/README.md:1

✓ On the Gold path — maintain.

Detailed fixes: d19_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 foundpackages/masamune_lints/lib/main.dart:1

What to do

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

D26 · Project Cohesion9.4 / 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 9.4 / 10 · rule-coverage 100% · ceiling Documented

3 of 106 build units (Gradle, pub) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×3packages/katana_cli/pubspec.yaml:1

✓ On the Gold path — maintain.

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

D28 · Secrets (history)6.0 / 10Adequate✓ Tool-verified

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

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

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

4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)7.1 / 10Adequategated by 12 critical 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 7.1 / 10 · rule-coverage 100% · ceiling Documented

12 finding(s): 0 critical, 12 high, 0 medium, 0 low. 10 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens.

REDACTED
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 issue-level).
  2. No action in Static Analysis (SAST) — all 10 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (10 issue-level, 0 of them charged here).

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

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

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness8.7 / 10Adequategated by 4 critical findings✓ 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 8.7 / 10 · rule-coverage 100% · ceiling Documented

105 of 845 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is packages/masamune_markdown/lib/src/markdown_controller.dart. Counted over 845 of the 1382 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×4packages/masamune_markdown/lib/src/markdown_controller.dart:1
Orphaned file · ×101packages/masamune_markdown/lib/src/markdown_tools.dart:1
Further orphaned files (smaller)

What to do

  1. Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with markdown_controller.dart, ai_agent.dart, painter_layer_list.dart. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 101 Orphaned file finding(s) in Knowledge Freshness — start with markdown_tools.dart, github_copilot_agent_controller.dart, vector_converter.dart. — One of this dimension's main actionable groups (101 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.8 / 10Adequategated by 5 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

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

Strongest change-coupling: others.dart↔web.dart 90%; firestore_model_adapter.dart↔local_model_adapter.dart 83%; listenable_firestore_model_adapter.dart↔local_model_adapter.dart 78%

Boundary-crossing change coupling: firestore_model_adapter.dart ↔ local_model_adapter.dart · ×5packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1
Change coupling: others.dart ↔ web.dart · ×10packages/katana_theme/lib/src/others/others.dart:1
Change-coupling hub: text_to_speech.dart → location.dart, authentication.dart, init.dart, purchase.dartpackages/katana_cli/lib/action/app/text_to_speech.dart
Change coupling clique: android.dart, ios.dart, web.dart, git.dartpackages/katana_cli/lib/action/git/platform/android.dart

What to do

  1. Resolve the 5 Boundary-crossing change coupling finding(s) in Change Coupling — start with firestore_model_adapter.dart, listenable_firestore_model_adapter.dart, runtime_model_adapter.dart. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 10 Change coupling finding(s) in Change Coupling — start with init.dart (2), others.dart, csr.dart. — One of this dimension's main actionable groups (10 warning-level).
  3. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with text_to_speech.dart. — One of this dimension's main actionable groups (1 warning-level).

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

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

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition8.9 / 10Strong✓ 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. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

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.

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.

AX6 · Interface segregation9.9 / 10Exemplary✓ Tool-verified

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

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

  • `AuthAdapter` declares 25 abstract methods: `isSignedIn`, `isVerified`, `isAnonymously`, `isWaitingConfirmation`, `userId`, `userName`, `userEmail`, `userPhoneNumber`, `userPhotoURL`, `activeProviderIds`, `refreshToken`, `accessToken`, `tryRestoreAuth`, `create`, `register`, `signIn`, `confirmSignIn`, `reauth`, `reset`, `verify`, `change`, `confirmChange`, `signOut`, `delete`, `dispose`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/katana_auth/lib/src/auth_adapter.dart:3
  • `ModelAdapter` declares 20 abstract methods: `vectorConverter`, `loadDocument`, `loadCollection`, `loadAggregation`, `saveDocument`, `deleteDocument`, `disposeDocument`, `disposeCollection`, `availableListen`, `listenDocument`, `listenCollection`, `runTransaction`, `loadOnTransaction`, `saveOnTransaction`, `deleteOnTransaction`, `runBatch`, `saveOnBatch`, `deleteOnBatch`, `clearAll`, `clearCache`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/katana_model/lib/src/model_adapter.dart:3
  • `PlatformInfoAdapter` declares 16 abstract methods: `getApplicationId`, `getApplicationVersion`, `getApplicationBuildNumber`, `getTemporaryDirectory`, `getApplicationDocumentsDirectory`, `getLibraryDirectory`, `isIOS`, `isAndroid`, `isWeb`, `isDesktop`, `isMacOS`, `isLinux`, `isWindows`, `isFuchsia`, `isMobile`, `debugImageData`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/katana_platform_info/lib/src/platform_info_adapter.dart:3
  • `MarkdownToolRef` declares 16 abstract methods: `toggleMode`, `deleteMode`, `closeKeyboard`, `isTextSelected`, `currentTool`, `controller`, `selection`, `field`, `isKeyboardShowing`, `canPaste`, `toggleLinkDialog`, `mentionBuilder`, `insertImage`, `insertVideo`, `insertBlock`, `exchangeBlock`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:1044
  • `RenderContext` declares 16 abstract methods: `focusNode`, `selection`, `composingRegion`, `showCursor`, `expands`, `style`, `cursorWidth`, `cursorHeight`, `cursorRadius`, `cursorColor`, `selectionColor`, `theme`, `textAlign`, `textDirection`, `textWidthBasis`, `textHeightBehavior`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/masamune_markdown/lib/src/markdown_field.dart:4799

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue in this repository's Dart: methods whose whole body still throws UnimplementedError or a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of 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.

  • `convertToMarkdown` is a shipped member whose whole body still throws UnimplementedError — generated scaffolding that was never completed. Implement it or remove the dead surface. (×7) — packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:93, packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:93, packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:93, …

What to do

  • Finish or delete the methods that still throw UnimplementedError, and replace placeholder text before shipping.
IC1 · Incompleteness & stubs7.6 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Dart: methods that only throw UnimplementedError or a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

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.

  • `convertToMarkdown` is a shipped member whose whole body throws UnimplementedError — scaffolding that was never completed. Implement it or remove the dead surface. (×7) — packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:93, packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:93, packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:93, …
  • `key`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. (×3) — packages/katana_router/lib/src/route_query_builder.dart:249, packages/katana_router/lib/src/route_query_builder.dart:312, packages/katana_router/lib/src/route_query_builder.dart:339
  • `widget`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. (×3) — packages/katana_router/lib/src/route_query_builder.dart:252, packages/katana_router/lib/src/route_query_builder.dart:315, packages/katana_router/lib/src/route_query_builder.dart:342

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
  • Clear the softer debt: re-enable or delete tests marked `skip:`, decide whether each empty method or UnsupportedError is deliberate (and say so in a comment), and replace `// ignore_for_file: type=lint` with targeted, justified ignores.
M1 · Documentation (README)9.1 / 10Exemplary✓ Tool-verified

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

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

What to do

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

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

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

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

What to do

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

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

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

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates6.5 / 10Adequate✓ 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.

  • A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.

What to do

  • Run the test suite in CI via an explicit runner step (`flutter test` for the toolchain this pipeline already uses) and gate merges on it.
  • Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability4.1 / 10Weak✓ 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.

  • Only 2/73 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/katana_auth/example`, `packages/katana_auth/example/ios`, `packages/katana_auth/example/macos`, `packages/katana_cli`, `packages/katana_firebase` and 66 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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 the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:3
  • `packages/katana_auth/example/android/app/build.gradle.kts` 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`. — packages/katana_auth/example/android/app/build.gradle.kts:62

What to do

  • Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — 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.

  • `packages/katana/pubspec.yaml` publishes `katana` 3.5.0 to a pub registry, and `packages/katana/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana/pubspec.lock:1
  • `packages/katana_auth/pubspec.yaml` publishes `katana_auth` 3.2.0 to a pub registry, and `packages/katana_auth/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_auth/pubspec.lock:1
  • `packages/katana_auth_firebase/pubspec.yaml` publishes `katana_auth_firebase` 3.6.0 to a pub registry, and `packages/katana_auth_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_auth_firebase/pubspec.lock:1
  • `packages/katana_builder/pubspec.yaml` publishes `katana_builder` 3.3.0 to a pub registry, and `packages/katana_builder/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_builder/pubspec.lock:1
  • `packages/katana_cli/pubspec.yaml` publishes `katana_cli` 3.41.0 to a pub registry, and `packages/katana_cli/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_cli/pubspec.lock:1
  • `packages/katana_firebase/pubspec.yaml` publishes `katana_firebase` 3.4.0 to a pub registry, and `packages/katana_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_firebase/pubspec.lock:1
  • `packages/katana_form/pubspec.yaml` publishes `katana_form` 3.3.0 to a pub registry, and `packages/katana_form/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_form/pubspec.lock:1
  • `packages/katana_functions/pubspec.yaml` publishes `katana_functions` 3.3.0 to a pub registry, and `packages/katana_functions/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_functions/pubspec.lock:1
  • `packages/katana_functions_firebase/pubspec.yaml` publishes `katana_functions_firebase` 3.3.0 to a pub registry, and `packages/katana_functions_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_functions_firebase/pubspec.lock:1
  • `packages/katana_indicator/pubspec.yaml` publishes `katana_indicator` 3.4.1 to a pub registry, and `packages/katana_indicator/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_indicator/pubspec.lock:1
  • `packages/katana_localization/pubspec.yaml` publishes `katana_localization` 3.2.0 to a pub registry, and `packages/katana_localization/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_localization/pubspec.lock:1
  • `packages/katana_localization_annotation/pubspec.yaml` publishes `katana_localization_annotation` 3.3.0 to a pub registry, and `packages/katana_localization_annotation/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_localization_annotation/pubspec.lock:1
  • `packages/katana_localization_builder/pubspec.yaml` publishes `katana_localization_builder` 3.3.0 to a pub registry, and `packages/katana_localization_builder/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_localization_builder/pubspec.lock:1
  • `packages/katana_logger/pubspec.yaml` publishes `katana_logger` 3.4.0 to a pub registry, and `packages/katana_logger/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_logger/pubspec.lock:1
  • `packages/katana_model/pubspec.yaml` publishes `katana_model` 3.9.0 to a pub registry, and `packages/katana_model/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_model/pubspec.lock:1
  • `packages/katana_model_firestore/pubspec.yaml` publishes `katana_model_firestore` 3.6.0 to a pub registry, and `packages/katana_model_firestore/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_model_firestore/pubspec.lock:1
  • `packages/katana_model_local/pubspec.yaml` publishes `katana_model_local` 3.4.0 to a pub registry, and `packages/katana_model_local/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_model_local/pubspec.lock:1
  • `packages/katana_platform_info/pubspec.yaml` publishes `katana_platform_info` 3.3.0 to a pub registry, and `packages/katana_platform_info/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_platform_info/pubspec.lock:1
  • `packages/katana_router/pubspec.yaml` publishes `katana_router` 3.4.0 to a pub registry, and `packages/katana_router/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_router/pubspec.lock:1
  • `packages/katana_router_annotation/pubspec.yaml` publishes `katana_router_annotation` 3.2.0 to a pub registry, and `packages/katana_router_annotation/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_router_annotation/pubspec.lock:1
  • `packages/katana_router_builder/pubspec.yaml` publishes `katana_router_builder` 3.2.0 to a pub registry, and `packages/katana_router_builder/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_router_builder/pubspec.lock:1
  • `packages/katana_scoped/pubspec.yaml` publishes `katana_scoped` 3.2.0 to a pub registry, and `packages/katana_scoped/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_scoped/pubspec.lock:1
  • `packages/katana_shorten/pubspec.yaml` publishes `katana_shorten` 3.2.0 to a pub registry, and `packages/katana_shorten/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_shorten/pubspec.lock:1
  • `packages/katana_storage/pubspec.yaml` publishes `katana_storage` 3.2.0 to a pub registry, and `packages/katana_storage/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_storage/pubspec.lock:1
  • `packages/katana_storage_firebase/pubspec.yaml` publishes `katana_storage_firebase` 3.3.0 to a pub registry, and `packages/katana_storage_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_storage_firebase/pubspec.lock:1
  • `packages/katana_test/pubspec.yaml` publishes `katana_test` 3.1.1 to a pub registry, and `packages/katana_test/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_test/pubspec.lock:1
  • `packages/katana_theme/pubspec.yaml` publishes `katana_theme` 3.5.0 to a pub registry, and `packages/katana_theme/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_theme/pubspec.lock:1
  • `packages/katana_theme_annotation/pubspec.yaml` publishes `katana_theme_annotation` 3.2.0 to a pub registry, and `packages/katana_theme_annotation/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_theme_annotation/pubspec.lock:1
  • `packages/katana_theme_builder/pubspec.yaml` publishes `katana_theme_builder` 3.2.0 to a pub registry, and `packages/katana_theme_builder/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_theme_builder/pubspec.lock:1
  • `packages/katana_ui/pubspec.yaml` publishes `katana_ui` 3.5.0 to a pub registry, and `packages/katana_ui/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/katana_ui/pubspec.lock:1
  • `packages/masamune/pubspec.yaml` publishes `masamune` 3.6.2 to a pub registry, and `packages/masamune/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune/pubspec.lock:1
  • `packages/masamune_ads_google/pubspec.yaml` publishes `masamune_ads_google` 3.2.2 to a pub registry, and `packages/masamune_ads_google/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_ads_google/pubspec.lock:1
  • `packages/masamune_agora/pubspec.yaml` publishes `masamune_agora` 3.3.2 to a pub registry, and `packages/masamune_agora/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_agora/pubspec.lock:1
  • `packages/masamune_ai/pubspec.yaml` publishes `masamune_ai` 3.5.2 to a pub registry, and `packages/masamune_ai/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_ai/pubspec.lock:1
  • `packages/masamune_ai_firebase/pubspec.yaml` publishes `masamune_ai_firebase` 3.6.0 to a pub registry, and `packages/masamune_ai_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_ai_firebase/pubspec.lock:1
  • `packages/masamune_ai_openai/pubspec.yaml` publishes `masamune_ai_openai` 3.4.2 to a pub registry, and `packages/masamune_ai_openai/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_ai_openai/pubspec.lock:1
  • `packages/masamune_animate/pubspec.yaml` publishes `masamune_animate` 3.2.2 to a pub registry, and `packages/masamune_animate/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_animate/pubspec.lock:1
  • `packages/masamune_annotation/pubspec.yaml` publishes `masamune_annotation` 3.2.0 to a pub registry, and `packages/masamune_annotation/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_annotation/pubspec.lock:1
  • `packages/masamune_app_review/pubspec.yaml` publishes `masamune_app_review` 3.2.2 to a pub registry, and `packages/masamune_app_review/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_app_review/pubspec.lock:1
  • `packages/masamune_auth_apple/pubspec.yaml` publishes `masamune_auth_apple` 3.2.2 to a pub registry, and `packages/masamune_auth_apple/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`. — packages/masamune_auth_apple/pubspec.lock:1

What to do

  • Stop committing the lockfile of a package you publish — `git rm --cached pubspec.lock` and add it to `.gitignore`, so your own CI resolves the version ranges you declare instead of a pin no consumer shares.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ 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.

  • `exec` is async and calls readAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. (×5) — packages/katana_cli/lib/action/app/icon.dart:89, packages/katana_cli/lib/action/app/local_notification.dart:36, packages/katana_cli/lib/action/firebase/messaging.dart:93, …
  • `exec` is async and calls writeAsStringSync, readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/action/app/keystore.dart:32
  • `exec` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. (×4) — packages/katana_cli/lib/action/cloudflare/d1.dart:190, packages/katana_cli/lib/action/cloudflare/durable_object.dart:266, packages/katana_cli/lib/action/firebase/init.dart:476, …
  • `_deployPages` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/action/cloudflare/deploy.dart:184
  • `_resolveAccountId` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/action/cloudflare/pages.dart:394
  • `validateLocal` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/action/firebase/init.dart:367
  • `exec` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/command/code/dart_defines.dart:19
  • `exec` is async and calls deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/command/create.dart:1040
  • `exec` is async and calls listSync, readAsStringSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/command/pub/version.dart:22
  • `exec` is async and calls createSync, listSync, readAsBytesSync, writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/command/store/screenshot.dart:85
  • `generateForAnnotatedElement` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_theme_builder/lib/generator/theme_generator.dart:14
  • `apply` is async and calls readAsStringSync, runSync, createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/src/native_environment.dart:359
  • `removeMessageFromXCode` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/katana_cli/lib/src/xcode.dart:642
  • `load` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. (×2) — packages/katana_localization_builder/lib/src/loader.dart:47, packages/masamune_builder/lib/value/google_spread_sheet_value.dart:119
  • `_buildDocs` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/masamune_model_docs_builder/lib/src/builder.dart:18
  • `_buildSchemas` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:32
  • `_buildQueries` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:49
  • `_buildMutations` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:67
  • `_builConnectorYaml` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:85
  • `_buildIndexes` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/masamune_model_firestore_builder/lib/src/builder.dart:20
  • `_buildRules` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/masamune_model_firestore_builder/lib/src/builder.dart:35

What to do

  • Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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.

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 stream4.7 / 10Weak✓ Tool-verified

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.

  • `Process.start` always pipes both `stdout` and `stderr`, and here `process.stdout` is read while the child's end is awaited — but nothing in this scope ever reads `process.stderr`. Dart reads a process stream only while something listens to it, and the API's own documentation says every byte of both must be read: once the child writes more than the pipe holds to stderr (measured with Dart 3.12 on Linux: 60 KB hangs every time, and less on a box short of pipe pages), it blocks on the write, never exits, and the `exitCode` or end of stream this code awaits never comes. Nothing fails loudly: the future never completes and the stuck child holds its resources until something kills it. Consume both streams (`process.stderr.drain<void>()` to discard it, or listen to it), use `Process.run`, which collects both, or start it with `mode: ProcessStartMode.inheritStdio` when the output is not wanted. — packages/katana_cli/lib/action/app/csr.dart:65
  • `Process.start` always pipes both `stdout` and `stderr`, and here `keytoolResult.stdout` is read while the child's end is awaited — but nothing in this scope ever reads `keytoolResult.stderr`. Dart reads a process stream only while something listens to it, and the API's own documentation says every byte of both must be read: once the child writes more than the pipe holds to stderr (measured with Dart 3.12 on Linux: 60 KB hangs every time, and less on a box short of pipe pages), it blocks on the write, never exits, and the `exitCode` or end of stream this code awaits never comes. Nothing fails loudly: the future never completes and the stuck child holds its resources until something kills it. Consume both streams (`keytoolResult.stderr.drain<void>()` to discard it, or listen to it), use `Process.run`, which collects both, or start it with `mode: ProcessStartMode.inheritStdio` when the output is not wanted. — packages/katana_cli/lib/action/app/keystore.dart:227
  • `Process.start` always pipes both `stdout` and `stderr`, and here `openSslSha1Restul.stdout` is read while the child's end is awaited — but nothing in this scope ever reads `openSslSha1Restul.stderr`. Dart reads a process stream only while something listens to it, and the API's own documentation says every byte of both must be read: once the child writes more than the pipe holds to stderr (measured with Dart 3.12 on Linux: 60 KB hangs every time, and less on a box short of pipe pages), it blocks on the write, never exits, and the `exitCode` or end of stream this code awaits never comes. Nothing fails loudly: the future never completes and the stuck child holds its resources until something kills it. Consume both streams (`openSslSha1Restul.stderr.drain<void>()` to discard it, or listen to it), use `Process.run`, which collects both, or start it with `mode: ProcessStartMode.inheritStdio` when the output is not wanted. — packages/katana_cli/lib/action/app/keystore.dart:237
  • `Process.start` always pipes both `stdout` and `stderr`, and here `openSslBase64Result.stdout` is read while the child's end is awaited — but nothing in this scope ever reads `openSslBase64Result.stderr`. Dart reads a process stream only while something listens to it, and the API's own documentation says every byte of both must be read: once the child writes more than the pipe holds to stderr (measured with Dart 3.12 on Linux: 60 KB hangs every time, and less on a box short of pipe pages), it blocks on the write, never exits, and the `exitCode` or end of stream this code awaits never comes. Nothing fails loudly: the future never completes and the stuck child holds its resources until something kills it. Consume both streams (`openSslBase64Result.stderr.drain<void>()` to discard it, or listen to it), use `Process.run`, which collects both, or start it with `mode: ProcessStartMode.inheritStdio` when the output is not wanted. — packages/katana_cli/lib/action/app/keystore.dart:244

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
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.

X17 · Uncapped recursion over a caller-supplied document2.0 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `filterAnyValue` is public and takes `dynamic value` from its caller, and it calls itself at line 270 (`filterAnyValue`) with a piece of `value` (and at line 272) — and nowhere in `filterAnyValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `filterAnyValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/masamune_model_firebase_data_connect/lib/adapter/firebase_data_connect_model_adapter.dart:270
  • `parse` is public and takes `Map<String, dynamic> values` from its caller, and it calls itself at line 53 (`parse`) with a piece of `values` — and nowhere in `parse` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `parse` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/katana_theme_builder/lib/value/asset_node.dart:53
  • `expandEnvironmentVariables` is public, takes a document from its caller (line 57) and hands it to `_expand`, which calls itself at line 96 (`_expand`) with a piece of `object` (and at line 99) — and nowhere in `_expand` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `_expand` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/katana_cli/lib/src/environment.dart:96
  • `modifize` is public and takes `dynamic object` from its caller, and it calls itself at line 696 (`modifize`) with a piece of `object` (and at line 702) — and nowhere in `modifize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `modifize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/katana_cli/lib/src/framework.dart:696

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness5.1 / 10Adequate✓ 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.

  • `_FormChipsField` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_focusNode` itself (line 425, `FocusNode`), which makes that instance its own. Nothing in the class releases it — no `_focusNode.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `FocusNode` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_focusNode.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_chips_field.dart:425
  • `_FormDateFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 468, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_date_field.dart:468
  • `_FormDateTimeFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 412, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_date_time_field.dart:412
  • `_FormDateTimeRangeFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 391, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_date_time_range_field.dart:391
  • `_FormDurationFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 420, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_duration_field.dart:420
  • `_FormEnumModalFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 354, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_enum_modal_field.dart:354
  • `_FormFocusNodeBuilderState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_focusNode` itself (line 145, `FocusNode`), which makes that instance its own. Nothing in the class releases it — no `_focusNode.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `FocusNode` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_focusNode.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_focus_node_builder.dart:145
  • `_FormMapModalFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 292, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_map_modal_field.dart:292
  • `_FormMonthModalFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 302, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_month_modal_field.dart:302
  • `_FormNumModalFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 272, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_num_modal_field.dart:272
  • `_PinInputTextFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_cursorBlinkOpacityController` itself (line 552, `AnimationController`), which makes that instance its own. Nothing in the class releases it — no `_cursorBlinkOpacityController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `AnimationController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_cursorBlinkOpacityController.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_pin_field.dart:552
  • `_FormTextEditingControllerBuilderState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 144, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`. — packages/katana_form/lib/form/form_text_editing_controller_builder.dart:144

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.
X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

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

  • Only 0/4 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `fetchAccessToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — packages/masamune_handover/tools/apple_user_migration/1_export_transfer_sub.ts:52, packages/masamune_handover/tools/apple_user_migration/2_exchange_and_update.ts:53
  • `fetchTransferSub` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/masamune_handover/tools/apple_user_migration/1_export_transfer_sub.ts:72
  • `exchangeTransferSub` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/masamune_handover/tools/apple_user_migration/2_exchange_and_update.ts:72

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

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

Other · Code Health — Whether a `for … in` loop leaves the `List`, `Map` or `Set` it is walking alone — Dart's collection iterators check that the collection has not changed since the loop began, so a body that adds to or removes from the very collection the loop is walking (or the map whose `keys`, `values` or `entries` it walks) makes the next step throw `ConcurrentModificationError` and the remaining elements are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements 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.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

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 handling5.8 / 10Adequate✓ 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.

  • `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×10) — packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:55, packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1722, packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:49, …
  • 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. (×5) — packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1968, packages/masamune_animate/lib/src/animate_controller.dart:175, packages/masamune_ai/lib/src/ai_content.dart:458, …
  • `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×17) — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:977, packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:118, packages/masamune_model_firebase_data_connect_builder/lib/generator/adapter_generator.dart:128, …
  • `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — packages/katana_cli/lib/action/cloudflare/pages.dart:389, packages/katana_cli/lib/action/cloudflare/pages.dart:444

What to do

  • Swallowed exception (caught, then discarded)
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 types9.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Dart's sound null safety is on and is not undermined by null assertions — a package whose `environment: sdk:` lower bound is 2.12 or above is null safe, so `String` cannot hold null and `String?` must be checked before use, and each postfix `!` is a run-time `Null check operator used on a null value` the author has told the analyzer cannot happen.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health61.9Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture94.1ExemplaryStrongest area.
Maturity63.5Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness43.1Weak — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security57.7Checked 4 of 9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 29 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 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.

  • C3 Audit Trail — Not assessed: this repository stores data through 'package:cloud_firestore' (packages/katana_model_firestore/lib/katana_model_firestore.dart:19) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'package:cloud_firestore' (packages/katana_model_firestore/lib/katana_model_firestore.dart:19) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'package:cloud_firestore' (packages/katana_model_firestore/lib/katana_model_firestore.dart:19) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • 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 — 55 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. Dart isolates share no mutable memory, so no two requests write one object at the same instant. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: this repository stores data through 'package:cloud_firestore' (packages/katana_model_firestore/lib/katana_model_firestore.dart:19) but declares no persisted model this check reads (Drift tables, Isar/ObjectBox/Floor/Hive entities, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
  • C2 Access Controls — Not assessed: this is a Flutter or Dart application whose data is served by a hosted backend ('package:firebase_storage', packages/katana_storage_firebase/lib/adapter/web/web.dart:8). Its access control is that backend's configuration — Supabase row-level security, Firebase security rules, Appwrite permissions — and this repository carries none of it that this check reads (no Supabase migration, no server code). A client-side route guard hides a page; it authorizes nothing. Whether access is authorized by default could not be established, and its absence is not scored.
  • D10 Test Quality — ~55458 lines of test source are present (.dart) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — no .dart test runner
  • D12 Dependency Hygiene — Not scored — 47 Maven/Gradle manifest(s) were read, stating a version for 23 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — 10 of 10 comment blocks were not judged (10 in a non-Latin script): redundancy is judged by word overlap with the code's identifiers, which cannot be measured across languages.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.dart), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Dart, JVM, JavaScript/TypeScript, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for classes extending benchmark_harness's `BenchmarkBase`, `AsyncBenchmarkBase` or `PerfBenchmarkBase` (directly or through a base of your own), `benchmark(…)` calls under the pub `benchmark` package, Flutter's `benchmarkWidgets`, `watchPerformance` or `traceAction` in a test importing flutter_test, integration_test or flutter_driver, or benchmark_harness, benchmark or web_benchmarks in a pubspec.yaml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — No web surface: 1361 Dart file(s) were read for weak hashes and ciphers, key material fixed in the source and disabled TLS certificate validation, and none was found. This repository serves no HTTP of its own — no server framework among its pubspec dependencies, no `HttpServer` bound and no shelf, dart_frog or serverpod import in its production source or `bin/`, no web build target — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
  • 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
  • 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
  • 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
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Dart was read, and it logs through none: package:logging, package:logger, talker and dart:developer take one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. Sentry's structured logs (`Sentry.logger`) would be judged.
  • X7 Silent fallback defaults — 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 — 25 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×5
  • Boundary-crossing change coupling: firestore_model_adapter.dart ↔ local_model_adapter.dart packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1 — `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart` (context katana_model_firestore) and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` (context katana_model_local) sit in DIFFERENT parts of the tree yet change together 83% of the time (15 of the 18 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 15 shared commits counted here, the most recent 3 are `54c8c57a` fix: The cache is now cleared.; `a15c4ee4` fix: Fixed a bug in the hash code.; `fec4d62d` feat: Changed implementation around Aggregate. — run `git show` on any of them.
  • Boundary-crossing change coupling: listenable_firestore_model_adapter.dart ↔ local_model_adapter.dart packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:1 — `packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart` (context katana_model_firestore) and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` (context katana_model_local) sit in DIFFERENT parts of the tree yet change together 78% of the time (14 of the 18 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 14 shared commits counted here, the most recent 3 are `a15c4ee4` fix: Fixed a bug in the hash code.; `fec4d62d` feat: Changed implementation around Aggregate.; `70d16a23` fix: Change count to aggregate. — run `git show` on any of them.
  • Boundary-crossing change coupling: runtime_model_adapter.dart ↔ local_model_adapter.dart packages/katana_model/lib/adapter/runtime_model_adapter.dart:1 — `packages/katana_model/lib/adapter/runtime_model_adapter.dart` (context katana_model) and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` (context katana_model_local) sit in DIFFERENT parts of the tree yet change together 78% of the time (14 of the 18 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 14 shared commits counted here, the most recent 3 are `54c8c57a` fix: The cache is now cleared.; `a15c4ee4` fix: Fixed a bug in the hash code.; `fec4d62d` feat: Changed implementation around Aggregate. — run `git show` on any of them.
  • Boundary-crossing change coupling: runtime_functions_adapter.dart ↔ firebase_functions_adapter.dart packages/katana_functions/lib/adapter/runtime_functions_adapter.dart:1 — `packages/katana_functions/lib/adapter/runtime_functions_adapter.dart` (context katana_functions) and `packages/katana_functions_firebase/lib/adapter/firebase_functions_adapter.dart` (context katana_functions_firebase) sit in DIFFERENT parts of the tree yet change together 70% of the time (7 of the 10 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 7 shared commits counted here, the most recent 3 are `a15c4ee4` fix: Fixed a bug in the hash code.; `ab991aa2` fix: Delete unnecessary Functions.; `f13e6877` feat: Added Functions for billing verification. — run `git show` on any of them.
  • Boundary-crossing change coupling: ai_chat.dart ↔ firebase_ai_masamune_adapter.dart packages/masamune_ai/lib/src/ai_chat.dart:1 — `packages/masamune_ai/lib/src/ai_chat.dart` (context masamune_ai) and `packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart` (context masamune_ai_firebase) sit in DIFFERENT parts of the tree yet change together 58% of the time (7 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) — 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 7 shared commits counted here, the most recent 3 are `1385329a` fix: Development of tools, including web search.; `e9e0a05f` chore: Eliminate MCP in AISingle and AIThread. (at that commit the file was still `packages/masamune_ai/lib/src/ai_thread.dart`); `80a16738` fix: Allowed specifying the AI's sorting part. (at that commit the file was still `packages/masamune_ai/lib/src/ai_thread.dart`) — run `git show` on any of them.
D28 · Secrets (history) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×4
  • Orphaned knowledge packages/masamune_markdown/lib/src/markdown_controller.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/masamune_ai/lib/src/ai_agent.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/masamune_painter/lib/src/painter_layer_list.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/masamune_markdown/lib/src/markdown_clipboard.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
Serious — 2178 finding(s)
D6 · Cohesion (LCOM4) · Low cohesion · ×201
  • Low cohesion: CollectionBase (LCOM4 69) packages/katana_model/lib/src/collection_base.dart:3 — CollectionBase's methods fall into 69 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 69 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: LocalAuthAdapter (LCOM4 27) packages/katana_auth/lib/adapter/local_auth_adapter.dart:7 — LocalAuthAdapter's methods fall into 27 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 27 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: RuntimeAuthAdapter (LCOM4 27) packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:5 — RuntimeAuthAdapter's methods fall into 27 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 27 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: Authentication (LCOM4 24) packages/katana_auth/lib/src/authentication.dart:3 — Authentication's methods fall into 24 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 24 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: FirebaseRemoteConfigModelAdapter (LCOM4 23) packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:3 — FirebaseRemoteConfigModelAdapter's methods fall into 23 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 23 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: MarkdownFieldState (LCOM4 23) packages/masamune_markdown/lib/src/markdown_field.dart:267 — MarkdownFieldState's methods fall into 23 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 23 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: CloudflareKVModelAdapter (LCOM4 22) packages/masamune_model_cloudflare_kv/lib/adapter/cloudflare_kv_model_adapter.dart:3 — CloudflareKVModelAdapter'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: FirebaseDataConnectModelAdapterBase (LCOM4 21) packages/masamune_model_firebase_data_connect/lib/adapter/firebase_data_connect_model_adapter.dart:3 — FirebaseDataConnectModelAdapterBase's methods fall into 21 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 21 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: TidbModelAdapter (LCOM4 21) packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:15 — TidbModelAdapter's methods fall into 21 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 21 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: RestApiModelAdapter (LCOM4 18) packages/katana_model/lib/adapter/rest_api_model_adapter.dart:3 — RestApiModelAdapter's methods fall into 18 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 18 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: GithubModelAdapter (LCOM4 18) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:908 — GithubModelAdapter's methods fall into 18 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 18 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: PlatformInfo (LCOM4 18) packages/katana_platform_info/lib/src/platform_info.dart:3 — PlatformInfo's methods fall into 18 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 18 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: CsvSourceModelAdapter (LCOM4 17) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:393 — CsvSourceModelAdapter's methods fall into 17 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 17 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: JsonSourceModelAdapter (LCOM4 17) packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:333 — JsonSourceModelAdapter's methods fall into 17 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 17 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: D1ModelAdapter (LCOM4 17) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:15 — D1ModelAdapter's methods fall into 17 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 17 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: FunctionsModelAdapter (LCOM4 17) packages/masamune_model_functions/lib/adapter/functions_model_adapter.dart:3 — FunctionsModelAdapter's methods fall into 17 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 17 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: DurableObjectModelAdapter (LCOM4 15) packages/masamune_model_do/lib/adapter/do_model_adapter.dart:15 — DurableObjectModelAdapter's methods fall into 15 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 15 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: _ChipsInputState (LCOM4 15) packages/katana_form/lib/form/form_chips_field.dart:803 — _ChipsInputState's methods fall into 15 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 15 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: TursoModelAdapter (LCOM4 14) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:673 — TursoModelAdapter's methods fall into 14 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 14 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ModelDate (LCOM4 12) packages/katana_model/lib/src/model_field_value.dart:1296 — ModelDate's methods fall into 12 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 12 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: ModelRefBase (LCOM4 12) packages/katana_model/lib/src/model_ref.dart:21 — ModelRefBase's methods fall into 12 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 12 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: MapController (LCOM4 12) packages/masamune_location_google/lib/src/map_controller.dart:3 — MapController's methods fall into 12 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 12 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: ModelTimestamp (LCOM4 11) packages/katana_model/lib/src/model_field_value.dart:881 — ModelTimestamp's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ModelTime (LCOM4 11) packages/katana_model/lib/src/model_field_value.dart:1678 — ModelTime's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FormPainterToolbarState (LCOM4 11) packages/masamune_painter/lib/src/form_painter_toolbar.dart:103 — FormPainterToolbarState's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • + 176 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×164
  • TodoComment packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:93 — // TODO: implement convertToMarkdown — 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 packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:94 — // TODO: implement convertToMarkdown — 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 packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:94 — // TODO: implement convertToMarkdown — 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 packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:94 — // TODO: implement convertToMarkdown — 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 packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:92 — // TODO: implement convertToMarkdown — 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 packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:94 — // TODO: implement convertToMarkdown — 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 packages/masamune_markdown/lib/tools/inline/font/underline_font_markdown_inline_tools.dart:95 — // TODO: implement convertToMarkdown — 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 packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:159 — // 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 packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:322 — // TODO: insert video — 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 packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:417 — // TODO: 状態を監視してUIを更新するようにする — 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 packages/masamune_markdown/lib/src/markdown_debug.dart:7 — // 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 packages/masamune/lib/src/masamune_app.dart:28 — // 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 packages/masamune/lib/src/masamune_app.dart:33 — // 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 packages/katana_router_builder/lib/common/router_class.dart:137 — // 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 packages/katana_theme/lib/src/app_theme_data.dart:1602 — // 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 packages/katana_router/lib/src/app_router.dart:513 — // 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 packages/katana_router/lib/src/app_router_delegate.dart:30 — // 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 packages/katana_router/lib/src/extensions.dart:202 — // 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 packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:76 — // TODO: Update to native Vector type when Firestore Dart SDK supports it. — 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 packages/katana_model/lib/src/document_base.dart:364 — // 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 packages/katana_model/lib/src/model_batch.dart:213 — // 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 packages/katana_model/lib/src/model_transaction.dart:215 — // 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 packages/katana_form/lib/src/form_media_value.dart:36 — // TODO: MapMixinが使えるようになったら置き換え — 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 packages/katana_form/lib/src/form_media_value.dart:173 — // TODO: MapMixinが使えるようになったら削除 — 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 packages/katana_form/example/lib/main.dart:181 — // TODO: Handle form submission — 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.
  • + 139 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×72
  • MethodTooLong: FirebaseInitCliAction.exec packages/katana_cli/lib/action/firebase/init.dart:476 — MethodTooLong — exec runs 808 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 708 over it, 8.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FirebaseAuthenticationCliAction.exec packages/katana_cli/lib/action/firebase/authentication.dart:45 — MethodTooLong — exec runs 527 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 427 over it, 5.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GithubModelAdapter.loadCollection packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1444 — MethodTooLong — loadCollection runs 466 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 366 over it, 4.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: AppThemeData.toThemeData packages/katana_theme/lib/src/app_theme_data.dart:1364 — MethodTooLong — toThemeData runs 439 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 339 over it, 4.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MarkdownController._replaceTextSingleField packages/masamune_markdown/lib/src/markdown_controller.dart:1000 — MethodTooLong — _replaceTextSingleField runs 385 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 285 over it, 3.85× 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: MobilePurchaseMasamuneAdapter.listenPurchase packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:94 — MethodTooLong — listenPurchase runs 370 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 270 over it, 3.70× 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: GithubTimelineEvent.toGithubIssueTimelineModelFromTimelineEvent packages/masamune_model_github/lib/src/github_timeline_event.dart:205 — MethodTooLong — toGithubIssueTimelineModelFromTimelineEvent runs 363 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 263 over it, 3.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GithubModelAdapter.loadDocument packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1018 — MethodTooLong — loadDocument runs 360 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 260 over it, 3.60× 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: MarkdownController._replaceTextMultiField packages/masamune_markdown/lib/src/markdown_controller.dart:1667 — MethodTooLong — _replaceTextMultiField runs 351 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 251 over it, 3.51× 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: StripeCliAction.exec packages/katana_cli/lib/action/stripe/stripe.dart:35 — MethodTooLong — exec 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: AppDeeplinkCliAction.exec packages/katana_cli/lib/action/app/deeplink.dart:34 — MethodTooLong — exec runs 298 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 198 over it, 2.98× 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: FirebaseMessagingCliAction.exec packages/katana_cli/lib/action/firebase/messaging.dart:93 — MethodTooLong — exec runs 282 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 182 over it, 2.82× 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: UniversalAppBar.build packages/masamune_universal_ui/lib/src/universal_app_bar.dart:521 — MethodTooLong — build runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _UniversalAvatarAppBarDelegate.build packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1561 — MethodTooLong — build runs 273 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 173 over it, 2.73× 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: CloudflareTidbCliAction._applyDirect packages/katana_cli/lib/action/cloudflare/tidb.dart:642 — MethodTooLong — _applyDirect runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× 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: GithubModelAdapter.saveDocument packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2014 — MethodTooLong — saveDocument runs 243 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 143 over it, 2.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppThemeData.copyWith packages/katana_theme/lib/src/app_theme_data.dart:1928 — MethodTooLong — copyWith runs 232 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 132 over it, 2.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NoSqlDatabase.notifyDocuments packages/katana_model/lib/src/no_sql_database.dart:1058 — MethodTooLong — notifyDocuments runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _MasamuneModelShouldShowIndicatorWhileLoading.run packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:13 — MethodTooLong — run runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppLocationCliAction.exec packages/katana_cli/lib/action/app/location.dart:37 — MethodTooLong — exec runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.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: PurchaseCliAction.exec packages/katana_cli/lib/action/purchase/purchase.dart:42 — MethodTooLong — exec runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StoreScreenshotCliCommand.exec packages/katana_cli/lib/command/store/screenshot.dart:85 — MethodTooLong — exec runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× 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: AgoraController._joinRoom packages/masamune_agora/lib/src/agora_controller.dart:528 — MethodTooLong — _joinRoom runs 206 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 106 over it, 2.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: FirebaseDynamicLinksCliAction.exec packages/katana_cli/lib/action/firebase/dynamic_links.dart:33 — MethodTooLong — exec runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× 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: CloudflareStorageCliAction.exec packages/katana_cli/lib/action/cloudflare/storage.dart:227 — MethodTooLong — exec runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× 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.
  • + 47 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×47
  • FileTooLong: command/create.dart packages/katana_cli/lib/command/create.dart — FileTooLong — 3028 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2528 over it, 6.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/markdown_field.dart packages/masamune_markdown/lib/src/markdown_field.dart — FileTooLong — 2806 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2306 over it, 5.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/app_theme_data.dart packages/katana_theme/lib/src/app_theme_data.dart — FileTooLong — 2501 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: AppThemeData (54-2305). The bar is 500 significant lines; this is 2001 over it, 5.00× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/markdown_controller.dart packages/masamune_markdown/lib/src/markdown_controller.dart — FileTooLong — 2464 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: MarkdownController (14-4468). The bar is 500 significant lines; this is 1964 over it, 4.93× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: adapter/github_model_adapter.dart packages/masamune_model_github/lib/adapter/github_model_adapter.dart — FileTooLong — 2095 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: GithubModelAdapter (916-2602). The bar is 500 significant lines; this is 1595 over it, 4.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/model_field_value.dart packages/katana_model/lib/src/model_field_value.dart — FileTooLong — 2000 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1500 over it, 4.00× 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: adapter/turso_model_adapter.dart packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart — FileTooLong — 1769 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1269 over it, 3.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/painter_controller.dart packages/masamune_painter/lib/src/painter_controller.dart — FileTooLong — 1541 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: PainterController (12-2245). The bar is 500 significant lines; this is 1041 over it, 3.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: firebase/init.dart packages/katana_cli/lib/action/firebase/init.dart — FileTooLong — 1493 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: FirebaseInitCliAction (323-1568). The bar is 500 significant lines; this is 993 over it, 2.99× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/ai_debug_overlay.dart packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart — FileTooLong — 1414 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: _AIDebugOverlayState (65-1865). The bar is 500 significant lines; this is 914 over it, 2.83× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/universal_app_bar.dart packages/masamune_universal_ui/lib/src/universal_app_bar.dart — FileTooLong — 1366 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 866 over it, 2.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/gradle.dart packages/katana_cli/lib/src/gradle.dart — FileTooLong — 1338 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 838 over it, 2.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: picker/picker.dart packages/katana_form/lib/src/picker/picker.dart — FileTooLong — 1336 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 836 over it, 2.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/xcode.dart packages/katana_cli/lib/src/xcode.dart — FileTooLong — 1096 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 596 over it, 2.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: cloudflare/storage.dart packages/katana_cli/lib/action/cloudflare/storage.dart — FileTooLong — 1028 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: CloudflareStorageCliAction (166-1385). The bar is 500 significant lines; this is 528 over it, 2.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/agora_controller.dart packages/masamune_agora/lib/src/agora_controller.dart — FileTooLong — 921 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: AgoraController (14-1540). The bar is 500 significant lines; this is 421 over it, 1.84× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: form/form_text_field.dart packages/katana_form/lib/form/form_text_field.dart — FileTooLong — 866 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 366 over it, 1.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/no_sql_database.dart packages/katana_model/lib/src/no_sql_database.dart — FileTooLong — 843 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: NoSqlDatabase (43-1354). The bar is 500 significant lines; this is 343 over it, 1.69× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/model_query.dart packages/katana_model/lib/src/model_query.dart — FileTooLong — 796 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 296 over it, 1.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: form/form_chips_field.dart packages/katana_form/lib/form/form_chips_field.dart — FileTooLong — 786 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 286 over it, 1.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/form_markdown_toolbar.dart packages/masamune_markdown/lib/src/form_markdown_toolbar.dart — FileTooLong — 766 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: FormMarkdownToolbarState (129-1042). The bar is 500 significant lines; this is 266 over it, 1.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: cloudflare/tidb.dart packages/katana_cli/lib/action/cloudflare/tidb.dart — FileTooLong — 758 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 258 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: adapter/firebase_auth_adapter.dart packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart — FileTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: FirebaseAuthAdapter (25-1153). The bar is 500 significant lines; this is 245 over it, 1.49× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/ai_debug_voice.dart packages/masamune_ai_debugger/lib/src/ai_debug_voice.dart — FileTooLong — 730 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 230 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/markdown_value.dart packages/masamune_markdown/lib/src/markdown_value.dart — FileTooLong — 723 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 223 over it, 1.45× 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.
  • + 22 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×36
  • Duplicated block (8 lines × 2) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:650 — packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:650-657 | packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:1014-1021 — both copies are in the same file, so extract the block into 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) packages/katana_model/lib/adapter/runtime_model_adapter.dart:163 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:163-170 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:167-174 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/adapter/runtime_model_adapter.dart:163` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:509 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:509-516 | packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:194-201 — before extracting anything, compare `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart` and `packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 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 `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:509` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:886 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:886-893 | packages/masamune_model_algolia/lib/adapter/algolia_model_adapter.dart:317-324 — 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 `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:886` it does not close everything it opens, so those exact lines 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) packages/katana_scoped/lib/src/scoped_value_ref.dart:185 — packages/katana_scoped/lib/src/scoped_value_ref.dart:185-192 | packages/katana_scoped/lib/src/scoped_value_ref.dart:245-252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_scoped/lib/src/scoped_value_ref.dart:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/masamune/lib/src/masamune_app.dart:760 — packages/masamune/lib/src/masamune_app.dart:760-767 | packages/masamune/lib/src/masamune_app.dart:797-805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune/lib/src/masamune_app.dart:760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) packages/masamune_builder/lib/generator/collection_model_generator.dart:37 — packages/masamune_builder/lib/generator/collection_model_generator.dart:37-44 | packages/masamune_builder/lib/generator/document_model_generator.dart:41-48 — before extracting anything, compare `packages/masamune_builder/lib/generator/collection_model_generator.dart` and `packages/masamune_builder/lib/generator/document_model_generator.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/masamune_functions_cloudflare/lib/adapter/cloudflare_functions_adapter.dart:116 — packages/masamune_functions_cloudflare/lib/adapter/cloudflare_functions_adapter.dart:116-123 | packages/masamune_functions_cloudflare/lib/adapter/cloudflare_functions_adapter.dart:126-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_functions_cloudflare/lib/adapter/cloudflare_functions_adapter.dart:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:130 — packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:130-137 | packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:159-166 — both copies are in the same file, so extract the block into 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) packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:227 — packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:227-234 | packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:241-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:227` it begins part-way through the construct above it, so those exact lines 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) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2045 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2045-2052 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2306-2313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2045` it begins part-way through the construct above it, so those exact lines 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) packages/katana_model_firestore/lib/converter/firestore_enum_converter.dart:39 — packages/katana_model_firestore/lib/converter/firestore_enum_converter.dart:39-46 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_enum_converter.dart:40-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model_firestore/lib/converter/firestore_enum_converter.dart:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:148 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:148-155 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:152-159 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:157 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:157-164 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:161-168 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:166 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:166-173 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:170-177 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:187 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:187-194 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:191-198 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:196 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:196-203 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:200-207 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:205 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:205-212 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:209-216 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/katana_cli/lib/action/cloudflare/authentication.dart:22 — packages/katana_cli/lib/action/cloudflare/authentication.dart:22-29 | packages/katana_cli/lib/action/cloudflare/firestore.dart:28-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) packages/katana_form/lib/form/form_pin_field.dart:326 — packages/katana_form/lib/form/form_pin_field.dart:326-333 | packages/katana_form/lib/form/form_text_field.dart:1492-1499 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) packages/katana_form/lib/form/form_pin_field.dart:411 — packages/katana_form/lib/form/form_pin_field.dart:411-418 | packages/katana_form/lib/form/form_text_field.dart:1571-1578 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart:71 — packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart:71-78 | packages/masamune_markdown/lib/tools/block/exchange/bulleted_list_exchange_markdown_block_tools.dart:82-89 — `packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/bulleted_list_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) packages/masamune_markdown/lib/tools/block/add/code_add_markdown_block_tools.dart:70 — packages/masamune_markdown/lib/tools/block/add/code_add_markdown_block_tools.dart:70-77 | packages/masamune_markdown/lib/tools/block/exchange/code_exchange_markdown_block_tools.dart:81-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart:70 — packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart:70-77 | packages/masamune_markdown/lib/tools/block/exchange/headline_1_exchange_markdown_block_tools.dart:81-88 — `packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/headline_1_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart:70 — packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart:70-77 | packages/masamune_markdown/lib/tools/block/exchange/headline_2_exchange_markdown_block_tools.dart:81-88 — `packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/headline_2_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • + 11 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×34
  • Duplicated block (10 lines × 2) packages/katana_cli/lib/action/cloudflare/kv.dart:343 — packages/katana_cli/lib/action/cloudflare/kv.dart:343-352 | packages/katana_cli/lib/action/cloudflare/storage.dart:1050-1059 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/action/cloudflare/storage.dart:1060` calls `indexOf`, `_objectNeedsLeadingComma` and `packages/katana_cli/lib/action/cloudflare/kv.dart:353` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) packages/katana_cli/lib/command/create.dart:225 — packages/katana_cli/lib/command/create.dart:225-234 | packages/katana_cli/lib/command/create.dart:679-688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/command/create.dart:677` calls `label`, `StoreYamlCliCode`, `generateFile` and `packages/katana_cli/lib/command/create.dart:224` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) packages/katana_cli/lib/command/doctor.dart:109 — packages/katana_cli/lib/command/doctor.dart:109-118 | packages/katana_cli/lib/command/doctor.dart:130-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/doctor.dart:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/katana_form/lib/form/form_chips_field.dart:933 — packages/katana_form/lib/form/form_chips_field.dart:933-942 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:596-605 — before extracting anything, compare `packages/katana_form/lib/form/form_chips_field.dart` and `packages/katana_form/lib/form/form_map_tag_dropdown_field.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 126 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 `packages/katana_form/lib/form/form_chips_field.dart:933` it does not close everything it opens, so those 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, `packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:594` calls `SuggestionStyle` and `packages/katana_form/lib/form/form_chips_field.dart:931` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) packages/katana_model/lib/src/model_ref.dart:880 — packages/katana_model/lib/src/model_ref.dart:880-889 | packages/katana_model/lib/src/model_ref.dart:1094-1103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/src/model_ref.dart:880` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/katana_model/lib/src/no_sql_database.dart:715 — packages/katana_model/lib/src/no_sql_database.dart:715-724 | packages/katana_model/lib/src/no_sql_database.dart:789-798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/src/no_sql_database.dart:715` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:686 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:686-695 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:614-623 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 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 `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:686` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:285 — packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:285-294 | packages/masamune_ai_openai/lib/adapter/openai_ai_masamune_adapter.dart:90-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:438 — packages/masamune_markdown/lib/src/markdown_controller.dart:438-447 | packages/masamune_markdown/lib/src/markdown_controller.dart:508-517 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart:438` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/src/markdown_field.dart:3013 — packages/masamune_markdown/lib/src/markdown_field.dart:3013-3022 | packages/masamune_markdown/lib/src/markdown_field.dart:3037-3046 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_field.dart:3013` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/masamune_model_firestore_builder/lib/src/builder.dart:22 — packages/masamune_model_firestore_builder/lib/src/builder.dart:22-31 | packages/masamune_model_firestore_builder/lib/src/builder.dart:37-46 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_firestore_builder/lib/src/builder.dart:22` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) packages/masamune_model_tidb_builder/lib/src/builder.dart:65 — packages/masamune_model_tidb_builder/lib/src/builder.dart:65-74 | packages/masamune_model_tidb_builder/lib/src/builder.dart:87-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_tidb_builder/lib/src/builder.dart:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/masamune_purchase/lib/actions/android_consumable_purchase_functions_action.dart:58 — packages/masamune_purchase/lib/actions/android_consumable_purchase_functions_action.dart:58-67 | packages/masamune_purchase/lib/actions/android_nonconsumable_purchase_functions_action.dart:53-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_purchase/lib/actions/android_consumable_purchase_functions_action.dart:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_purchase/lib/src/purchase_product.dart:492 — packages/masamune_purchase/lib/src/purchase_product.dart:492-501 | packages/masamune_purchase/lib/src/purchase_product.dart:634-643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:521 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:521-530 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2058-2067 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:521` it does not close everything it opens, so those 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, `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:519` calls `PlatformInfo` and `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2056` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2118 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2118-2127 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2184-2193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart:95 — packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart:95-104 | packages/masamune_markdown/lib/tools/block/exchange/bulleted_list_exchange_markdown_block_tools.dart:106-115 — `packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/bulleted_list_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/code_add_markdown_block_tools.dart:119 — packages/masamune_markdown/lib/tools/block/add/code_add_markdown_block_tools.dart:119-128 | packages/masamune_markdown/lib/tools/block/exchange/code_exchange_markdown_block_tools.dart:97-106 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart:94 — packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart:94-103 | packages/masamune_markdown/lib/tools/block/exchange/headline_1_exchange_markdown_block_tools.dart:105-114 — `packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/headline_1_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart:94 — packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart:94-103 | packages/masamune_markdown/lib/tools/block/exchange/headline_2_exchange_markdown_block_tools.dart:105-114 — `packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/headline_2_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/headline_3_add_markdown_block_tools.dart:94 — packages/masamune_markdown/lib/tools/block/add/headline_3_add_markdown_block_tools.dart:94-103 | packages/masamune_markdown/lib/tools/block/exchange/headline_3_exchange_markdown_block_tools.dart:105-114 — `packages/masamune_markdown/lib/tools/block/add/headline_3_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/headline_3_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/number_list_add_markdown_block_tools.dart:101 — packages/masamune_markdown/lib/tools/block/add/number_list_add_markdown_block_tools.dart:101-110 | packages/masamune_markdown/lib/tools/block/exchange/number_list_exchange_markdown_block_tools.dart:107-116 — `packages/masamune_markdown/lib/tools/block/add/number_list_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/number_list_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/quote_add_markdown_block_tools.dart:86 — packages/masamune_markdown/lib/tools/block/add/quote_add_markdown_block_tools.dart:86-95 | packages/masamune_markdown/lib/tools/block/exchange/quote_exchange_markdown_block_tools.dart:128-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/text_add_markdown_block_tools.dart:83 — packages/masamune_markdown/lib/tools/block/add/text_add_markdown_block_tools.dart:83-92 | packages/masamune_markdown/lib/tools/block/exchange/text_exchange_markdown_block_tools.dart:94-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/masamune_markdown/lib/tools/block/add/toggle_list_add_markdown_block_tools.dart:94 — packages/masamune_markdown/lib/tools/block/add/toggle_list_add_markdown_block_tools.dart:94-103 | packages/masamune_markdown/lib/tools/block/exchange/toggle_list_exchange_markdown_block_tools.dart:105-114 — `packages/masamune_markdown/lib/tools/block/add/toggle_list_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/toggle_list_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • + 9 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×29
  • Sync-over-async blocking packages/katana_cli/lib/action/app/icon.dart:89 — `exec` is async and calls readAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/app/keystore.dart:32 — `exec` is async and calls writeAsStringSync, readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/app/local_notification.dart:36 — `exec` is async and calls readAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/cloudflare/d1.dart:190 — `exec` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/cloudflare/deploy.dart:184 — `_deployPages` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/cloudflare/durable_object.dart:266 — `exec` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/cloudflare/pages.dart:394 — `_resolveAccountId` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/firebase/init.dart:367 — `validateLocal` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/firebase/init.dart:476 — `exec` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/firebase/messaging.dart:93 — `exec` is async and calls readAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/action/firebase/scheduler.dart:30 — `exec` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/command/code/dart_defines.dart:19 — `exec` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/command/create.dart:142 — `exec` is async and calls readAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/command/create.dart:581 — `exec` is async and calls readAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/command/create.dart:1040 — `exec` is async and calls deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/command/pub/version.dart:22 — `exec` is async and calls listSync, readAsStringSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/command/store/screenshot.dart:85 — `exec` is async and calls createSync, listSync, readAsBytesSync, writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_theme_builder/lib/generator/theme_generator.dart:14 — `generateForAnnotatedElement` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/src/native_environment.dart:359 — `apply` is async and calls readAsStringSync, runSync, createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_cli/lib/src/xcode.dart:642 — `removeMessageFromXCode` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/katana_localization_builder/lib/src/loader.dart:47 — `load` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/masamune_model_docs_builder/lib/src/builder.dart:18 — `_buildDocs` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:32 — `_buildSchemas` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:49 — `_buildQueries` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:67 — `_buildMutations` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • + 4 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×29
  • Swallowed exception (caught, then discarded) packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:55 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1722 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:49 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:434 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:977 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:118 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_firebase_data_connect_builder/lib/generator/adapter_generator.dart:128 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:50 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_do/lib/adapter/do_model_adapter.dart:450 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:50 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:442 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_handover/lib/src/handover_repository.dart:106 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_handover/lib/src/handover_repository.dart:138 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_ai_debugger/lib/src/ai_debug_post.dart:503 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/masamune_agora/lib/src/web/agora_permission.dart:48 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_model_local/lib/adapter/cached_rest_api_model_adapter.dart:59 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_model_local/lib/adapter/local_model_adapter.dart:100 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_logger/lib/adapter/local_logger_adapter.dart:55 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_form/lib/form/form_date_field.dart:927 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_form/lib/form/form_date_time_field.dart:874 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_form/lib/form/form_date_time_range_field.dart:851 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_form/lib/form/form_duration_field.dart:877 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_form/lib/form/form_month_modal_field.dart:761 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_form/lib/form/form_num_modal_field.dart:717 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/katana_cli/lib/src/cloudflare_environment.dart:500 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • + 4 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×28
  • ClassTooLong: MarkdownController packages/masamune_markdown/lib/src/markdown_controller.dart:3 — ClassTooLong — 2372 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 1972 over it, 5.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppThemeData packages/katana_theme/lib/src/app_theme_data.dart:28 — ClassTooLong — 1872 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 1472 over it, 4.68× 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: _AIDebugOverlayState packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:65 — ClassTooLong — 1362 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 400 significant lines; this is 962 over it, 3.41× 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: GithubModelAdapter packages/masamune_model_github/lib/adapter/github_model_adapter.dart:908 — ClassTooLong — 1356 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 956 over it, 3.39× 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: _RenderMarkdownEditor packages/masamune_markdown/lib/src/markdown_field.dart:2408 — ClassTooLong — 1326 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 926 over it, 3.32× 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: MarkdownFieldState packages/masamune_markdown/lib/src/markdown_field.dart:267 — ClassTooLong — 1187 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 787 over it, 2.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PainterController packages/masamune_painter/lib/src/painter_controller.dart:5 — ClassTooLong — 1157 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 757 over it, 2.89× 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: FirebaseInitCliAction packages/katana_cli/lib/action/firebase/init.dart:320 — ClassTooLong — 940 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 540 over it, 2.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CloudflareStorageCliAction packages/katana_cli/lib/action/cloudflare/storage.dart:163 — ClassTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 518 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AgoraController packages/masamune_agora/lib/src/agora_controller.dart:3 — ClassTooLong — 890 significant lines (blank, comment-only and punctuation-only lines excluded), 56 methods. The bar is 400 significant lines; this is 490 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NoSqlDatabase packages/katana_model/lib/src/no_sql_database.dart:6 — ClassTooLong — 786 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 386 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FirebaseAuthAdapter packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:9 — ClassTooLong — 738 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 338 over it, 1.85× 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: FirestoreModelAdapter packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:9 — ClassTooLong — 693 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 293 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AuthDatabase packages/katana_auth/lib/src/auth_database.dart:5 — ClassTooLong — 657 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 257 over it, 1.64× 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: FormMarkdownToolbarState packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:126 — ClassTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 242 over it, 1.61× 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: UniversalAppBar packages/masamune_universal_ui/lib/src/universal_app_bar.dart:16 — ClassTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 219 over it, 1.55× 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: FormPainterToolbarState packages/masamune_painter/lib/src/form_painter_toolbar.dart:103 — ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 185 over it, 1.46× 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: FirebaseAuthenticationCliAction packages/katana_cli/lib/action/firebase/authentication.dart:13 — ClassTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 149 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AIAgent packages/masamune_ai/lib/src/ai_agent.dart:155 — ClassTooLong — 500 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 100 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MobilePurchaseMasamuneAdapter packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:3 — ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 93 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _CalendarState packages/masamune_calendar/lib/src/calendar.dart:195 — ClassTooLong — 478 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 78 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _DateTimePickerAdapter packages/katana_form/lib/src/picker/picker.dart:1259 — ClassTooLong — 476 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 76 over it, 1.19× 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: CollectionBase packages/katana_model/lib/src/collection_base.dart:3 — ClassTooLong — 465 significant lines (blank, comment-only and punctuation-only lines excluded), 88 methods. The bar is 400 significant lines; this is 65 over it, 1.16× 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: FirebaseMessagingCliAction packages/katana_cli/lib/action/firebase/messaging.dart:72 — ClassTooLong — 447 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 47 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GithubTimelineEvent packages/masamune_model_github/lib/src/github_timeline_event.dart:3 — ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 30 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 3 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×27
  • TooManyMethods: CollectionBase packages/katana_model/lib/src/collection_base.dart:3 — TooManyMethods — 88 methods. The bar is 30 methods; this is 58 over it, 2.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TursoModelAdapter packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:673 — TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MarkdownController packages/masamune_markdown/lib/src/markdown_controller.dart:3 — TooManyMethods — 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _AIDebugOverlayState packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:65 — TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _RenderMarkdownEditor packages/masamune_markdown/lib/src/markdown_field.dart:2408 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MarkdownFieldState packages/masamune_markdown/lib/src/markdown_field.dart:267 — TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PainterController packages/masamune_painter/lib/src/painter_controller.dart:5 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AgoraController packages/masamune_agora/lib/src/agora_controller.dart:3 — TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _CalendarState packages/masamune_calendar/lib/src/calendar.dart:195 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: DurableObjectModelAdapter packages/masamune_model_do/lib/adapter/do_model_adapter.dart:15 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: D1ModelAdapter packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:15 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TidbModelAdapter packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:15 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FirestoreModelAdapter packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:9 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AIDebugController packages/masamune_ai_debugger/lib/src/ai_debug_controller.dart:3 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AppRouter packages/katana_router/lib/src/app_router.dart:3 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MapController packages/masamune_location_google/lib/src/map_controller.dart:3 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AuthDatabase packages/katana_auth/lib/src/auth_database.dart:5 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _ChipsInputState packages/katana_form/lib/form/form_chips_field.dart:803 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AIContent packages/masamune_ai/lib/src/ai_content.dart:3 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CloudflareStorageCliAction packages/katana_cli/lib/action/cloudflare/storage.dart:163 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Authentication packages/katana_auth/lib/src/authentication.dart:3 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FirebaseAuthAdapter packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:9 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FormPainterFieldState packages/masamune_painter/lib/src/form_painter_field.dart:265 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CollectionModelQuery packages/katana_model/lib/src/model_query.dart:127 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AlgoliaModelAdapter packages/masamune_model_algolia/lib/adapter/algolia_model_adapter.dart:3 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×24
  • Duplicated block (14 lines × 2) packages/katana_cli/lib/action/ecosystem/ecosystem.dart:60 — packages/katana_cli/lib/action/ecosystem/ecosystem.dart:60-73 | packages/katana_cli/lib/action/purchase/purchase.dart:49-62 — `packages/katana_cli/lib/action/ecosystem/ecosystem.dart` and `packages/katana_cli/lib/action/purchase/purchase.dart` 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 6 separate duplicated blocks between them, totalling at least 89 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.
  • Duplicated block (14 lines × 2) packages/katana_form/lib/form/form_enum_dropdown_field.dart:515 — packages/katana_form/lib/form/form_enum_dropdown_field.dart:515-528 | packages/katana_form/lib/form/form_map_dropdown_field.dart:445-458 — before extracting anything, compare `packages/katana_form/lib/form/form_enum_dropdown_field.dart` and `packages/katana_form/lib/form/form_map_dropdown_field.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) packages/katana_form/lib/form/form_future_field.dart:426 — packages/katana_form/lib/form/form_future_field.dart:426-439 | packages/katana_form/lib/form/form_future_field.dart:512-525 — both copies are in the same file, so extract the block into 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) packages/katana_form/lib/form/form_text_field.dart:996 — packages/katana_form/lib/form/form_text_field.dart:996-1009 | packages/katana_form/lib/form/form_text_field.dart:1203-1216 — both copies are in the same file, so extract the 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 `oldWidget` to `_SuggestionOverlayBuilder` in one and `_SuggestionOverlay` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) packages/katana_model/lib/src/model_ref.dart:891 — packages/katana_model/lib/src/model_ref.dart:891-904 | packages/katana_model/lib/src/model_ref.dart:1105-1118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/src/model_ref.dart:891` it begins part-way through the construct above it, so those exact lines 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) packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:141 — packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:141-154 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:142-155 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:141` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/katana_scoped/lib/src/scoped_value_listener.dart:64 — packages/katana_scoped/lib/src/scoped_value_listener.dart:64-77 | packages/katana_scoped/lib/src/scoped_value_listener.dart:96-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_scoped/lib/src/scoped_value_listener.dart:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1411 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1411-1424 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1511-1524 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1411` it does not close everything it opens, so those 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, `packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1509` calls `SizedBox` and `packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1409` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart:80 — packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart:80-93 | packages/masamune_markdown/lib/tools/block/exchange/bulleted_list_exchange_markdown_block_tools.dart:91-104 — `packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/bulleted_list_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart:79 — packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart:79-92 | packages/masamune_markdown/lib/tools/block/exchange/headline_1_exchange_markdown_block_tools.dart:90-103 — `packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/headline_1_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart:79 — packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart:79-92 | packages/masamune_markdown/lib/tools/block/exchange/headline_2_exchange_markdown_block_tools.dart:90-103 — `packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/headline_2_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_markdown/lib/tools/block/add/headline_3_add_markdown_block_tools.dart:79 — packages/masamune_markdown/lib/tools/block/add/headline_3_add_markdown_block_tools.dart:79-92 | packages/masamune_markdown/lib/tools/block/exchange/headline_3_exchange_markdown_block_tools.dart:90-103 — `packages/masamune_markdown/lib/tools/block/add/headline_3_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/headline_3_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_markdown/lib/tools/block/add/number_list_add_markdown_block_tools.dart:86 — packages/masamune_markdown/lib/tools/block/add/number_list_add_markdown_block_tools.dart:86-99 | packages/masamune_markdown/lib/tools/block/exchange/number_list_exchange_markdown_block_tools.dart:92-105 — `packages/masamune_markdown/lib/tools/block/add/number_list_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/number_list_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_markdown/lib/tools/block/add/toggle_list_add_markdown_block_tools.dart:79 — packages/masamune_markdown/lib/tools/block/add/toggle_list_add_markdown_block_tools.dart:79-92 | packages/masamune_markdown/lib/tools/block/exchange/toggle_list_exchange_markdown_block_tools.dart:90-103 — `packages/masamune_markdown/lib/tools/block/add/toggle_list_add_markdown_block_tools.dart` and `packages/masamune_markdown/lib/tools/block/exchange/toggle_list_exchange_markdown_block_tools.dart` 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 3 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:103 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:103-116 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:206-219 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 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 `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:103` it does not close everything it opens, so those exact lines 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:271 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:271-284 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:278-291 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:271` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:191 — packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:191-204 | packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart:166-179 — before extracting anything, compare `packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart` and `packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2340 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2340-2353 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2378-2391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) packages/masamune_painter/lib/tools/block/line/solid_10px_line_painter_block_tools.dart:78 — packages/masamune_painter/lib/tools/block/line/solid_10px_line_painter_block_tools.dart:78-91 | packages/masamune_painter/lib/tools/block/line/solid_1px_line_painter_block_tools.dart:78-91 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/line/solid_10px_line_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/line/solid_1px_line_painter_block_tools.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) packages/masamune_painter/lib/tools/block/text/style_bold_font_painter_block_tools.dart:51 — packages/masamune_painter/lib/tools/block/text/style_bold_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/style_normal_font_painter_block_tools.dart:51-64 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/text/style_bold_font_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/text/style_normal_font_painter_block_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:125 — packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:125-138 | packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:145-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:190 — packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:190-203 | packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:220-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) packages/masamune_universal_ui/lib/src/universal_grid_view.dart:444 — packages/masamune_universal_ui/lib/src/universal_grid_view.dart:444-457 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:474-487 — before extracting anything, compare `packages/masamune_universal_ui/lib/src/universal_grid_view.dart` and `packages/masamune_universal_ui/lib/src/universal_list_view.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_universal_ui/lib/src/universal_grid_view.dart:444` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/masamune_painter/lib/value/media_painting_value.dart:176 — packages/masamune_painter/lib/value/media_painting_value.dart:176-189 | packages/masamune_painter/lib/value/text_painting_value.dart:194-207 — before extracting anything, compare `packages/masamune_painter/lib/value/media_painting_value.dart` and `packages/masamune_painter/lib/value/text_painting_value.dart` 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. The matched lines also transfer control out of the body holding them, 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 (4 members, 50+ identical tokens) · ×22
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:280 — packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:280-302 | packages/katana_cli/lib/action/cloudflare/kv.dart:254-276 | packages/katana_cli/lib/action/cloudflare/storage.dart:744-769 | packages/katana_cli/lib/action/cloudflare/turso.dart:578-602 — 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) packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:304 — packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:304-345 | packages/katana_cli/lib/action/cloudflare/kv.dart:278-319 | packages/katana_cli/lib/action/cloudflare/storage.dart:771-812 | packages/katana_cli/lib/action/cloudflare/turso.dart:604-645 — 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) packages/katana_cli/lib/command/code/view/fixedform.dart:109 — packages/katana_cli/lib/command/code/view/fixedform.dart:109-209 | packages/katana_cli/lib/command/code/view/listform.dart:120-220 | packages/katana_cli/lib/command/code/view/navigation.dart:108-224 | packages/katana_cli/lib/command/code/view/tab.dart:108-206 — 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) packages/katana_cli/lib/command/flavor/dev.dart:19 — packages/katana_cli/lib/command/flavor/dev.dart:19-30 | packages/katana_cli/lib/command/flavor/prod.dart:19-30 | packages/katana_cli/lib/command/flavor/stg.dart:19-30 | packages/katana_cli/lib/command/flavor/test.dart:19-30 — 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) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:16 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:16-39 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:15-36 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:15-36 | packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:31-52 — 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) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:107 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:107-147 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:285-351 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:119-187 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:262-291 — 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) packages/katana_router_builder/lib/generator/router_generator.dart:17 — packages/katana_router_builder/lib/generator/router_generator.dart:17-145 | packages/masamune_model_docs_builder/lib/src/builder.dart:42-159 | packages/masamune_model_firebase_data_connect_builder/lib/generator/adapter_generator.dart:15-90 | packages/masamune_model_firestore_builder/lib/src/builder.dart:130-215 — 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) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:428 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:428-534 | packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:563-593 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:530-566 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:597-630 — 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) packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:98 — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:98-112 | packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:127-141 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:98-112 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:127-141 — 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:156 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:156-176 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:158-178 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:146-166 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:971-991 — 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:286 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:286-314 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:293-322 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:278-305 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1170-1199 — 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:316 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:316-338 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:324-346 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:307-329 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1201-1225 — 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:433 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:433-458 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:441-466 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:425-450 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1713-1743 — 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:494 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:494-513 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:502-521 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:486-505 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1844-1863 — 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) packages/masamune_model_d1/lib/src/d1_model_path.dart:37 — packages/masamune_model_d1/lib/src/d1_model_path.dart:37-70 | packages/masamune_model_do/lib/src/do_model_path.dart:39-72 | packages/masamune_model_tidb/lib/src/tidb_model_path.dart:37-64 | packages/masamune_model_turso/lib/src/turso_model_path.dart:38-65 — 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) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:16 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:16-33 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_search_converter.dart:16-33 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_token_converter.dart:16-33 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_vector_value_converter.dart:16-33 — 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) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:32 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:32-64 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:41-73 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:32-64 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:41-73 — 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) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1018 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1018-1442 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1444-2012 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2014-2296 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2298-2446 — 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) packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart:71 — packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart:71-84 | packages/masamune_painter/lib/tools/block/text/paragraph_align_justify_text_painter_block_tools.dart:71-84 | packages/masamune_painter/lib/tools/block/text/paragraph_align_left_text_painter_block_tools.dart:71-84 | packages/masamune_painter/lib/tools/block/text/paragraph_align_right_text_painter_block_tools.dart:71-84 — 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) packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:78 — packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:78-162 | packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart:62-147 | packages/masamune_painter/lib/tools/inline/property/line_property_painter_inline_tools.dart:64-110 | packages/masamune_painter/lib/tools/inline/property/paragraph_align_property_painter_inline_tools.dart:66-152 — 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) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:140 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:140-172 | packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:85-101 | packages/masamune_painter/lib/value/group_painting_value.dart:160-185 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:85-101 — 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) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:903 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:903-924 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:926-942 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2222-2243 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2245-2261 — 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 · Duplicated block (13 lines × 2) · ×22
  • Duplicated block (13 lines × 2) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:721 — packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:721-733 | packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:767-779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:780 — packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:780-792 | packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:915-927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) packages/katana_cli/lib/action/app/local_notification.dart:61 — packages/katana_cli/lib/action/app/local_notification.dart:61-73 | packages/katana_cli/lib/action/firebase/messaging.dart:146-158 — before extracting anything, compare `packages/katana_cli/lib/action/app/local_notification.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/local_notification.dart:59` calls `ensureMinimumJavaVersion` and `packages/katana_cli/lib/action/firebase/messaging.dart:145` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) packages/katana_cli/lib/action/cloudflare/storage.dart:932 — packages/katana_cli/lib/action/cloudflare/storage.dart:932-944 | packages/katana_cli/lib/action/cloudflare/storage.dart:981-993 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/cloudflare/storage.dart:932` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/action/cloudflare/storage.dart:945` calls `RegExp` and `packages/katana_cli/lib/action/cloudflare/storage.dart:994` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:145 — packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:145-157 | packages/katana_cli/lib/action/stripe/stripe.dart:503-515 — before extracting anything, compare `packages/katana_cli/lib/action/firebase/terms_and_privacy.dart` and `packages/katana_cli/lib/action/stripe/stripe.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/katana_cli/lib/src/app_info.dart:379 — packages/katana_cli/lib/src/app_info.dart:379-391 | packages/katana_cli/lib/src/app_info.dart:401-413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/src/app_info.dart:379` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/katana_form/lib/form/form_date_time_field.dart:403 — packages/katana_form/lib/form/form_date_time_field.dart:403-415 | packages/katana_form/lib/form/form_date_time_range_field.dart:382-394 — before extracting anything, compare `packages/katana_form/lib/form/form_date_time_field.dart` and `packages/katana_form/lib/form/form_date_time_range_field.dart` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) packages/katana_localization_builder/lib/value/localize_value.dart:151 — packages/katana_localization_builder/lib/value/localize_value.dart:151-163 | packages/katana_localization_builder/lib/value/localize_value.dart:178-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_localization_builder/lib/value/localize_value.dart:151` it begins part-way through the construct above it, so those exact lines 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) packages/katana_localization_builder/lib/value/localize_value.dart:145 — packages/katana_localization_builder/lib/value/localize_value.dart:145-157 | packages/katana_localization_builder/lib/value/localize_value.dart:202-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_localization_builder/lib/value/localize_value.dart:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/katana_scoped/lib/value/on.dart:124 — packages/katana_scoped/lib/value/on.dart:124-136 | packages/katana_scoped/lib/value/on.dart:142-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_scoped/lib/value/on.dart:124` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/katana_ui/lib/ui/message_box.dart:200 — packages/katana_ui/lib/ui/message_box.dart:200-212 | packages/katana_ui/lib/ui/message_box.dart:247-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 `packages/katana_ui/lib/ui/message_box.dart:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:50 — packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:50-62 | packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:68-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. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:50` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:162 — packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:162-174 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:168-180 — before extracting anything, compare `packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart` and `packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:162` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/masamune_model_tidb/lib/src/tidb_model_path.dart:52 — packages/masamune_model_tidb/lib/src/tidb_model_path.dart:52-64 | packages/masamune_model_turso/lib/src/turso_model_path.dart:53-65 — before extracting anything, compare `packages/masamune_model_tidb/lib/src/tidb_model_path.dart` and `packages/masamune_model_turso/lib/src/turso_model_path.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_tidb/lib/src/tidb_model_path.dart:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/masamune_painter/lib/value/group_painting_value.dart:107 — packages/masamune_painter/lib/value/group_painting_value.dart:107-119 | packages/masamune_painter/lib/value/group_painting_value.dart:136-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_painter/lib/value/group_painting_value.dart:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/masamune_painter/lib/value/media_painting_value.dart:151 — packages/masamune_painter/lib/value/media_painting_value.dart:151-163 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:132-144 — 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 `packages/masamune_painter/lib/value/media_painting_value.dart:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1186 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1186-1198 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1258-1270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/katana_cli/lib/command/code/code.dart:243 — packages/katana_cli/lib/command/code/code.dart:243-255 | packages/katana_cli/lib/command/code/log.dart:73-100 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, 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, `packages/katana_cli/lib/command/code/code.dart:241` calls `header` and `packages/katana_cli/lib/command/code/log.dart:71` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:97 — packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:97-109 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:103-115 — before extracting anything, compare `packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart` and `packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:124 — packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:124-136 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:130-142 — before extracting anything, compare `packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart` and `packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) packages/masamune_universal_ui/lib/src/universal_grid_view.dart:420 — packages/masamune_universal_ui/lib/src/universal_grid_view.dart:420-432 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:450-462 — before extracting anything, compare `packages/masamune_universal_ui/lib/src/universal_grid_view.dart` and `packages/masamune_universal_ui/lib/src/universal_list_view.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:146 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:146-158 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:146-158 — before extracting anything, compare `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart` and `packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×21
  • Duplicated block (7 lines × 2) packages/katana_cli/lib/action/app/keystore.dart:178 — packages/katana_cli/lib/action/app/keystore.dart:178-184 | packages/katana_cli/lib/action/firebase/messaging.dart:159-165 — 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 `packages/katana_cli/lib/action/app/keystore.dart:178` it does not close everything it opens, so those 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, `packages/katana_cli/lib/action/firebase/messaging.dart:158` calls `save` and `packages/katana_cli/lib/action/app/keystore.dart:177` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) packages/katana_cli/lib/action/firebase/algolia.dart:21 — packages/katana_cli/lib/action/firebase/algolia.dart:21-27 | packages/katana_cli/lib/action/firebase/authentication.dart:26-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/firebase/algolia.dart:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) packages/katana_cli/lib/action/firebase/dynamic_links.dart:69 — packages/katana_cli/lib/action/firebase/dynamic_links.dart:69-75 | packages/katana_cli/lib/action/firebase/messaging.dart:246-252 — before extracting anything, compare `packages/katana_cli/lib/action/firebase/dynamic_links.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 94 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 `packages/katana_cli/lib/action/firebase/dynamic_links.dart:69` it begins part-way through the construct above it, so those exact lines 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:535 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:535-541 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:545-551 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1076 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1076-1082 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2046-2052 — both copies are in the same file, so extract the block into 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) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1773 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1773-1780 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1829-1835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1773` 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 (7 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2081 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2081-2087 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2317-2323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2081` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2113 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2113-2119 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2333-2339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2144 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2144-2150 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2353-2359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2144` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2179 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2179-2185 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2371-2377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2179` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:214 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:214-220 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:218-224 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:222 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:222-228 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:226-232 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) packages/katana_cli/lib/src/android_signing.dart:92 — packages/katana_cli/lib/src/android_signing.dart:92-98 | packages/katana_cli/lib/src/native_environment.dart:88-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 both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/katana_form/lib/form/form_date_field.dart:924 — packages/katana_form/lib/form/form_date_field.dart:924-930 | packages/katana_form/lib/form/form_month_modal_field.dart:758-764 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_month_modal_field.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 376 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) packages/masamune_ai/lib/src/ai_agent.dart:996 — packages/masamune_ai/lib/src/ai_agent.dart:996-1002 | packages/masamune_ai/lib/src/ai_chat.dart:287-293 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) packages/masamune_location/lib/src/location_masamune_adapter.dart:136 — packages/masamune_location/lib/src/location_masamune_adapter.dart:136-142 | packages/masamune_location_background/lib/adapter/background_location_masamune_adapter.dart:103-109 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) packages/masamune_painter/lib/tools/inline/media_painter_inline_tools.dart:40 — packages/masamune_painter/lib/tools/inline/media_painter_inline_tools.dart:40-46 | packages/masamune_painter/lib/tools/primary/media_painter_primary_tools.dart:50-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/katana_form/lib/form/form_date_time_field.dart:871 — packages/katana_form/lib/form/form_date_time_field.dart:871-877 | packages/katana_form/lib/form/form_date_time_range_field.dart:848-854 — before extracting anything, compare `packages/katana_form/lib/form/form_date_time_field.dart` and `packages/katana_form/lib/form/form_date_time_range_field.dart` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 382 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) packages/katana_model/lib/src/model_batch.dart:149 — packages/katana_model/lib/src/model_batch.dart:149-155 | packages/katana_model/lib/src/model_transaction.dart:127-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/masamune_markdown/lib/src/markdown_value.dart:102 — packages/masamune_markdown/lib/src/markdown_value.dart:102-108 | packages/masamune_painter/lib/src/painting_value.dart:471-477 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:82 — packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:82-88 | packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:83-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×20
  • Duplicated block (12 lines × 2) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:588 — packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:588-599 | packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:614-625 — both copies are in the same file, so extract the block into 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) packages/katana_cli/lib/action/app/location.dart:125 — packages/katana_cli/lib/action/app/location.dart:125-136 | packages/katana_cli/lib/action/firebase/authentication.dart:627-638 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/location.dart:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/katana_cli/lib/action/firebase/authentication.dart:139 — packages/katana_cli/lib/action/firebase/authentication.dart:139-150 | packages/katana_cli/lib/action/firebase/authentication.dart:158-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) packages/katana_cli/lib/command/doctor.dart:79 — packages/katana_cli/lib/command/doctor.dart:79-90 | packages/katana_cli/lib/command/doctor.dart:93-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/doctor.dart:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/katana_form/lib/form/form_duration_field.dart:887 — packages/katana_form/lib/form/form_duration_field.dart:887-898 | packages/katana_form/lib/form/form_month_modal_field.dart:769-780 — before extracting anything, compare `packages/katana_form/lib/form/form_duration_field.dart` and `packages/katana_form/lib/form/form_month_modal_field.dart` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 348 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 `packages/katana_form/lib/form/form_duration_field.dart:887` it begins part-way through the construct above it, so those 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, `packages/katana_form/lib/form/form_duration_field.dart:885` calls `replaceAll` and `packages/katana_form/lib/form/form_month_modal_field.dart:768` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) packages/katana_localization_builder/lib/value/localize_value.dart:173 — packages/katana_localization_builder/lib/value/localize_value.dart:173-184 | packages/katana_localization_builder/lib/value/localize_value.dart:236-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_localization_builder/lib/value/localize_value.dart:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1123 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1123-1134 | packages/masamune_builder/lib/value/query_value.dart:99-110 — 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 `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1123` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `a` to `ModelQueryFilter` in one and `QueryConditionValue` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 2) packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:166 — packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:166-177 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:122-133 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 76 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 `packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:166` it begins part-way through the construct above it, so those exact lines 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) packages/masamune/lib/ui/list_builder.dart:288 — packages/masamune/lib/ui/list_builder.dart:288-299 | packages/masamune/lib/ui/reorderable_list_builder.dart:496-507 — 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 `packages/masamune/lib/ui/list_builder.dart:288` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:549 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:549-560 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:559-570 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:549` it begins part-way through the construct above it, so those exact lines 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) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1620 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1620-1631 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1666-1677 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1620` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:30 — packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:30-41 | packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart:36-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:102 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:102-113 | packages/masamune_painter/lib/value/group_painting_value.dart:103-114 — before extracting anything, compare `packages/masamune_painter/lib/value/clipping_group_painting_value.dart` and `packages/masamune_painter/lib/value/group_painting_value.dart` as WHOLE FILES: this scan already matched 6 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 `packages/masamune_painter/lib/value/clipping_group_painting_value.dart:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:72 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:72-83 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:72-83 — before extracting anything, compare `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart` and `packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) packages/masamune_purchase/lib/actions/ios_consumable_purchase_functions_action.dart:67 — packages/masamune_purchase/lib/actions/ios_consumable_purchase_functions_action.dart:67-78 | packages/masamune_purchase/lib/actions/ios_nonconsumable_purchase_functions_action.dart:61-72 — 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 `packages/masamune_purchase/lib/actions/ios_consumable_purchase_functions_action.dart: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. The matched lines also transfer control out of the body holding them, which cannot 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) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:593 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:593-604 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2120-2131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:593` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) packages/katana_cli/lib/command/code/collection.dart:76 — packages/katana_cli/lib/command/code/collection.dart:76-87 | packages/katana_cli/lib/command/code/document.dart:76-87 — before extracting anything, compare `packages/katana_cli/lib/command/code/collection.dart` and `packages/katana_cli/lib/command/code/document.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:820 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:820-831 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:748-759 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) packages/masamune_purchase_stripe/lib/models/stripe_payment.dart:75 — packages/masamune_purchase_stripe/lib/models/stripe_payment.dart:75-86 | packages/masamune_purchase_stripe/lib/models/stripe_purchase.dart:177-188 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) packages/katana_form/example/lib/main.dart:91 — packages/katana_form/example/lib/main.dart:91-102 | packages/katana_form/example/lib/main.dart:160-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_form/example/lib/main.dart:91` 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×19
  • Hotspot: packages/katana_cli/lib/action/firebase/init.dart packages/katana_cli/lib/action/firebase/init.dart:476 — packages/katana_cli/lib/action/firebase/init.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 134 in FirebaseInitCliAction.exec at line 476. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/firebase/init.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/action/cloudflare/tidb.dart packages/katana_cli/lib/action/cloudflare/tidb.dart:642 — packages/katana_cli/lib/action/cloudflare/tidb.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in CloudflareTidbCliAction._applyDirect at line 642. 2 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/cloudflare/tidb.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/command/apply.dart packages/katana_cli/lib/command/apply.dart:236 — packages/katana_cli/lib/command/apply.dart changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in ApplyCliCommand._apply at line 236. 2 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/command/apply.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/action/firebase/messaging.dart packages/katana_cli/lib/action/firebase/messaging.dart:93 — packages/katana_cli/lib/action/firebase/messaging.dart changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in FirebaseMessagingCliAction.exec at line 93. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/firebase/messaging.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/action/cloudflare/storage.dart packages/katana_cli/lib/action/cloudflare/storage.dart:227 — packages/katana_cli/lib/action/cloudflare/storage.dart changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in CloudflareStorageCliAction.exec at line 227. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/cloudflare/storage.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/action/cloudflare/turso.dart packages/katana_cli/lib/action/cloudflare/turso.dart:73 — packages/katana_cli/lib/action/cloudflare/turso.dart changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in CloudflareTursoCliAction.exec at line 73. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/cloudflare/turso.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/action/purchase/purchase.dart packages/katana_cli/lib/action/purchase/purchase.dart:42 — packages/katana_cli/lib/action/purchase/purchase.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in PurchaseCliAction.exec at line 42. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/purchase/purchase.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1062 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in _AIDebugOverlayState._buildPromptPanel at line 1062. 3 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/src/native_environment.dart packages/katana_cli/lib/src/native_environment.dart:359 — packages/katana_cli/lib/src/native_environment.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in NativeAppTarget.apply at line 359. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/src/native_environment.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/action/cloudflare/init.dart packages/katana_cli/lib/action/cloudflare/init.dart:60 — packages/katana_cli/lib/action/cloudflare/init.dart changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in CloudflareInitCliAction.exec at line 60. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/cloudflare/init.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:13 — packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in _MasamuneModelShouldShowIndicatorWhileLoading.run at line 13. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/command/create.dart packages/katana_cli/lib/command/create.dart:581 — packages/katana_cli/lib/command/create.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in ComposeCliCommand.exec at line 581. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/command/create.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/action/cloudflare/deploy.dart packages/katana_cli/lib/action/cloudflare/deploy.dart:73 — packages/katana_cli/lib/action/cloudflare/deploy.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in CloudflareDeployCliAction._deployWorkers at line 73. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/cloudflare/deploy.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/masamune_lints/lib/masamune/masamune_model_should_load.dart packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:12 — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in _MasamuneModelShouldLoad.run at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/masamune_lints/lib/masamune/masamune_model_should_load.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:70 — packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in FirebaseLoggerAdapter.send at line 70. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/katana_cli/lib/action/app/keystore.dart packages/katana_cli/lib/action/app/keystore.dart:32 — packages/katana_cli/lib/action/app/keystore.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in AppKeystoreCliAction.exec at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/katana_cli/lib/action/app/keystore.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/masamune_lints/lib/masamune/masamune_scoped_query_must_pass_to_appropriate_ref.dart packages/masamune_lints/lib/masamune/masamune_scoped_query_must_pass_to_appropriate_ref.dart:77 — packages/masamune_lints/lib/masamune/masamune_scoped_query_must_pass_to_appropriate_ref.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in _MasamuneScopedQueryMustPassToAppropriateRef.run at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/masamune_lints/lib/masamune/masamune_scoped_query_must_pass_to_appropriate_ref.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/masamune_lints/lib/masamune/masamune_collection_model_should_add_limit_query.dart packages/masamune_lints/lib/masamune/masamune_collection_model_should_add_limit_query.dart:13 — packages/masamune_lints/lib/masamune/masamune_collection_model_should_add_limit_query.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in _MasamuneCollectionModelShouldAddLimitQuery.run at line 13. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/masamune_lints/lib/masamune/masamune_collection_model_should_add_limit_query.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/masamune_model_tidb_builder/lib/src/builder.dart packages/masamune_model_tidb_builder/lib/src/builder.dart:12 — packages/masamune_model_tidb_builder/lib/src/builder.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in _MasamuneModelTidbBuilder.build at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 03:01:38 +09:00' --until='2026-11-17 03:01:38 +09:00' --full-history --no-merges -- packages/masamune_model_tidb_builder/lib/src/builder.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×18
  • Duplicated block (9 lines × 2) packages/katana_cli/lib/action/agora/agora.dart:151 — packages/katana_cli/lib/action/agora/agora.dart:151-159 | packages/katana_cli/lib/action/firebase/scheduler.dart:142-150 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) packages/katana_cli/lib/action/cloudflare/deploy.dart:47 — packages/katana_cli/lib/action/cloudflare/deploy.dart:47-55 | packages/katana_cli/lib/action/cloudflare/init.dart:25-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/katana_cli/lib/action/cloudflare/init.dart:174 — packages/katana_cli/lib/action/cloudflare/init.dart:174-182 | packages/katana_cli/lib/action/firebase/init.dart:1393-1401 — 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 `packages/katana_cli/lib/action/cloudflare/init.dart:174` it begins part-way through the construct above it, so those 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, `packages/katana_cli/lib/action/firebase/init.dart:1403` calls `label` and `packages/katana_cli/lib/action/cloudflare/init.dart:185` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) packages/katana_cli/lib/action/cloudflare/storage.dart:229 — packages/katana_cli/lib/action/cloudflare/storage.dart:229-237 | packages/katana_cli/lib/action/cloudflare/turso.dart:75-83 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/storage.dart` and `packages/katana_cli/lib/action/cloudflare/turso.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/action/cloudflare/turso.dart:85` calls `getAsMap` and `packages/katana_cli/lib/action/cloudflare/storage.dart:238` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) packages/katana_model/lib/adapter/rest_api_model_adapter.dart:504 — packages/katana_model/lib/adapter/rest_api_model_adapter.dart:504-512 | packages/katana_model/lib/adapter/rest_api_model_adapter.dart:655-663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/adapter/rest_api_model_adapter.dart:504` 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 `query` to `ModelAdapterCollectionQuery` in one and `ModelAdapterDocumentQuery` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) packages/masamune/lib/src/masamune_app.dart:739 — packages/masamune/lib/src/masamune_app.dart:739-747 | packages/masamune/lib/src/masamune_app.dart:782-790 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:2390 — packages/masamune_markdown/lib/src/markdown_controller.dart:2390-2398 | packages/masamune_markdown/lib/src/markdown_controller.dart:2642-2650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart:2390` it does not close everything it opens, so those exact lines 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) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1746 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1746-1754 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1803-1811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1746` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) packages/masamune_painter/lib/value/group_painting_value.dart:122 — packages/masamune_painter/lib/value/group_painting_value.dart:122-130 | packages/masamune_painter/lib/value/group_painting_value.dart:150-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_painter/lib/value/group_painting_value.dart:122` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) packages/masamune_painter/lib/value/media_painting_value.dart:71 — packages/masamune_painter/lib/value/media_painting_value.dart:71-79 | packages/masamune_painter/lib/value/media_painting_value.dart:85-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_painter/lib/value/media_painting_value.dart:71` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) packages/masamune_painter/lib/value/text_painting_value.dart:75 — packages/masamune_painter/lib/value/text_painting_value.dart:75-83 | packages/masamune_painter/lib/value/text_painting_value.dart:89-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_painter/lib/value/text_painting_value.dart:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:138 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:138-146 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:142-150 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/katana_form/lib/form/form_pin_field.dart:340 — packages/katana_form/lib/form/form_pin_field.dart:340-348 | packages/katana_form/lib/form/form_text_field.dart:1506-1514 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:643 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:643-651 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:656-664 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:89 — packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:89-97 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:90-98 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:353 — packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:353-361 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:295-303 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/masamune_purchase_stripe/lib/actions/stripe_action_capture_purchase.dart:44 — packages/masamune_purchase_stripe/lib/actions/stripe_action_capture_purchase.dart:44-52 | packages/masamune_purchase_stripe/lib/actions/stripe_action_create_purchase.dart:88-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/masamune_purchase_stripe/lib/actions/stripe_action_create_subscription.dart:65 — packages/masamune_purchase_stripe/lib/actions/stripe_action_create_subscription.dart:65-73 | packages/masamune_purchase_stripe/lib/actions/stripe_action_dashboard_account.dart:30-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×17
  • Duplicated block (11 lines × 2) packages/katana_cli/lib/action/cloudflare/storage.dart:948 — packages/katana_cli/lib/action/cloudflare/storage.dart:948-958 | packages/katana_cli/lib/action/cloudflare/storage.dart:994-1004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/cloudflare/storage.dart:948` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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, `packages/katana_cli/lib/action/cloudflare/storage.dart:945` calls `RegExp` and `packages/katana_cli/lib/action/cloudflare/storage.dart:993` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) packages/katana_cli/lib/action/purchase/purchase.dart:414 — packages/katana_cli/lib/action/purchase/purchase.dart:414-424 | packages/katana_cli/lib/action/purchase/purchase.dart:431-441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/purchase/purchase.dart:414` it does not close everything it opens, so those exact lines 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) packages/katana_localization_builder/lib/value/localize_value.dart:208 — packages/katana_localization_builder/lib/value/localize_value.dart:208-218 | packages/katana_localization_builder/lib/value/localize_value.dart:241-252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_localization_builder/lib/value/localize_value.dart:208` it begins part-way through the construct above it, so those 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) packages/katana_model/lib/adapter/runtime_model_adapter.dart:265 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:265-275 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:243-253 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/adapter/runtime_model_adapter.dart: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.
  • Duplicated block (11 lines × 2) packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:98 — packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:98-108 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:97-107 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 137 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 `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:98` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:161 — packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:161-171 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:168-178 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 137 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 `packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:161` it begins part-way through the construct above it, so those exact lines 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) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:242 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:242-252 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:287-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:242` it begins part-way through the construct above it, so those exact lines 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) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1446 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1446-1456 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1546-1556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1446` it begins part-way through the construct above it, so those exact lines 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) packages/masamune_logger_firebase/lib/loggable/firebase_analytics_purchased_loggable.dart:40 — packages/masamune_logger_firebase/lib/loggable/firebase_analytics_purchased_loggable.dart:40-50 | packages/masamune_logger_firebase/lib/loggable/firebase_analytics_refund_loggable.dart:40-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:418 — packages/masamune_markdown/lib/src/markdown_controller.dart:418-428 | packages/masamune_markdown/lib/src/markdown_controller.dart:442-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:413 — packages/masamune_markdown/lib/src/markdown_controller.dart:413-423 | packages/masamune_markdown/lib/src/markdown_controller.dart:483-493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart: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.
  • Duplicated block (11 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:488 — packages/masamune_markdown/lib/src/markdown_controller.dart:488-498 | packages/masamune_markdown/lib/src/markdown_controller.dart:512-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:184 — packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:184-194 | packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:191-201 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:60 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:60-70 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:60-70 — before extracting anything, compare `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart` and `packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 124 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 × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:126 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:126-136 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:130-140 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) packages/masamune_markdown/lib/src/markdown_value.dart:931 — packages/masamune_markdown/lib/src/markdown_value.dart:931-941 | packages/masamune_markdown/lib/value/markdown_image_block_value.dart:169-179 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) packages/masamune_painter/lib/value/media_painting_value.dart:191 — packages/masamune_painter/lib/value/media_painting_value.dart:191-201 | packages/masamune_painter/lib/value/text_painting_value.dart:209-219 — before extracting anything, compare `packages/masamune_painter/lib/value/media_painting_value.dart` and `packages/masamune_painter/lib/value/text_painting_value.dart` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×13
  • Duplicated block (16 lines × 2) packages/katana_cli/lib/action/app/location.dart:150 — packages/katana_cli/lib/action/app/location.dart:150-165 | packages/katana_cli/lib/action/firebase/authentication.dart:645-660 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/location.dart:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/katana_cli/lib/action/app/location.dart:211 — packages/katana_cli/lib/action/app/location.dart:211-226 | packages/katana_cli/lib/action/firebase/authentication.dart:764-779 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/location.dart:211` it does not close everything it opens, so those 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, `packages/katana_cli/lib/action/app/location.dart:210` calls `writeAsString` and `packages/katana_cli/lib/action/firebase/authentication.dart:763` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) packages/katana_model/lib/src/model_server_command.dart:139 — packages/katana_model/lib/src/model_server_command.dart:139-154 | packages/katana_model/lib/src/model_server_command.dart:177-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/src/model_server_command.dart:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:886 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:886-901 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:806-821 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:903 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:903-918 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:831-846 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) packages/katana_theme/lib/src/others/text_provider.dart:55 — packages/katana_theme/lib/src/others/text_provider.dart:55-70 | packages/katana_theme/lib/src/text_provider.dart:164-179 — 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 `packages/katana_theme/lib/src/others/text_provider.dart:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:617 — packages/masamune_markdown/lib/src/markdown_controller.dart:617-632 | packages/masamune_markdown/lib/src/markdown_controller.dart:686-701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart:617` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (16 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2129 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2129-2144 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2195-2210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (16 lines × 2) packages/masamune_painter/lib/src/painter_layer_list.dart:288 — packages/masamune_painter/lib/src/painter_layer_list.dart:288-303 | packages/masamune_painter/lib/src/painter_layer_list.dart:346-361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_painter/lib/src/painter_layer_list.dart:288` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:206 — packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:206-221 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:267-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:206` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:398 — packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:398-413 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:459-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:398` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) packages/masamune_location_google/lib/adapter/google_mobile_location_masamune_adapter.dart:27 — packages/masamune_location_google/lib/adapter/google_mobile_location_masamune_adapter.dart:27-42 | packages/masamune_location_google/lib/adapter/google_mock_location_masamune_adapter.dart:24-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) packages/masamune_painter/lib/value/media_painting_value.dart:203 — packages/masamune_painter/lib/value/media_painting_value.dart:203-218 | packages/masamune_painter/lib/value/text_painting_value.dart:221-236 — before extracting anything, compare `packages/masamune_painter/lib/value/media_painting_value.dart` and `packages/masamune_painter/lib/value/text_painting_value.dart` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×12
  • Edited copy of a member (14 corresponding lines) packages/masamune_notification/lib/src/notification_target_query.dart:253 — packages/masamune_notification/lib/src/notification_target_query.dart:253-266 | packages/masamune_scheduler/lib/src/model_server_command_delete_documents_schedule.dart:120-137 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/katana_model_firestore/lib/converter/firestore_enum_converter.dart:33 — packages/katana_model_firestore/lib/converter/firestore_enum_converter.dart:33-46 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_enum_converter.dart:34-47 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1121 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1121-1134 | packages/masamune_builder/lib/value/query_value.dart:97-110 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/masamune/lib/ui/list_builder.dart:286 — packages/masamune/lib/ui/list_builder.dart:286-299 | packages/masamune/lib/ui/reorderable_list_builder.dart:494-507 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/katana_model/lib/src/model_server_command.dart:438 — packages/katana_model/lib/src/model_server_command.dart:438-453 | packages/katana_model/lib/src/model_server_command.dart:539-552 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:30 — packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:30-44 | packages/masamune_painter/lib/tools/inline/property/line_property_painter_inline_tools.dart:41-54 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/katana_model_firestore/lib/converter/firestore_enum_converter.dart:48 — packages/katana_model_firestore/lib/converter/firestore_enum_converter.dart:48-61 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_enum_converter.dart:49-62 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/katana_form/lib/src/picker/picker.dart:1160 — packages/katana_form/lib/src/picker/picker.dart:1160-1176 | packages/katana_form/lib/src/picker/picker.dart:1526-1539 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/katana_form/lib/form/form_date_time_field.dart:879 — packages/katana_form/lib/form/form_date_time_field.dart:879-892 | packages/katana_form/lib/form/form_date_time_range_field.dart:856-872 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/masamune_purchase/lib/src/purchase_functions_action.dart:31 — packages/masamune_purchase/lib/src/purchase_functions_action.dart:31-44 | packages/masamune_purchase_stripe/lib/src/stripe_functions_action.dart:30-43 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/katana_auth/lib/src/auth_database.dart:1057 — packages/katana_auth/lib/src/auth_database.dart:1057-1070 | packages/katana_model/lib/src/no_sql_database.dart:638-655 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/katana_form/lib/form/form_pin_field.dart:350 — packages/katana_form/lib/form/form_pin_field.dart:350-366 | packages/katana_form/lib/form/form_text_field.dart:1516-1529 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×12
  • Duplicated block (15 lines × 2) packages/katana_cli/lib/action/app/deeplink.dart:128 — packages/katana_cli/lib/action/app/deeplink.dart:128-142 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:75-89 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/dynamic_links.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 379 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:128` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) packages/katana_cli/lib/action/cloudflare/kv.dart:227 — packages/katana_cli/lib/action/cloudflare/kv.dart:227-241 | packages/katana_cli/lib/action/cloudflare/storage.dart:717-731 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) packages/katana_cli/lib/command/code/server/call.dart:243 — packages/katana_cli/lib/command/code/server/call.dart:243-257 | packages/katana_cli/lib/command/code/server/worker.dart:189-203 — before extracting anything, compare `packages/katana_cli/lib/command/code/server/call.dart` and `packages/katana_cli/lib/command/code/server/worker.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 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 `packages/katana_cli/lib/command/code/server/call.dart:243` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) packages/katana_logger/lib/adapter/local_logger_adapter.dart:77 — packages/katana_logger/lib/adapter/local_logger_adapter.dart:77-91 | packages/katana_logger/lib/adapter/runtime_logger_adapter.dart:91-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) packages/katana_model/lib/adapter/runtime_model_adapter.dart:183 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:183-197 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:184-198 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:647 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:647-661 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:575-589 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) packages/katana_storage/lib/adapter/local_storage_adapter.dart:54 — packages/katana_storage/lib/adapter/local_storage_adapter.dart:54-68 | packages/katana_storage/lib/adapter/runtime_storage_adapter.dart:95-109 — before extracting anything, compare `packages/katana_storage/lib/adapter/local_storage_adapter.dart` and `packages/katana_storage/lib/adapter/runtime_storage_adapter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_storage/lib/adapter/local_storage_adapter.dart:54` 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, `packages/katana_storage/lib/adapter/local_storage_adapter.dart:53` calls `fetchURI` and `packages/katana_storage/lib/adapter/runtime_storage_adapter.dart:94` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1430 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1430-1444 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1530-1544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:158 — packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:158-172 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:254-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) packages/masamune_painter/lib/tools/inline/property/layer_backward_property_painter_inline_tools.dart:51 — packages/masamune_painter/lib/tools/inline/property/layer_backward_property_painter_inline_tools.dart:51-65 | packages/masamune_painter/lib/tools/inline/property/layer_forward_property_painter_inline_tools.dart:50-64 — 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 `packages/masamune_painter/lib/tools/inline/property/layer_backward_property_painter_inline_tools.dart:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:581 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:581-595 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:699-713 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:581` it does not close everything it opens, so those 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, `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:714` calls `_DynamicExtentForegroundColor` and `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:596` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:171 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:171-185 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:171-185 — before extracting anything, compare `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart` and `packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×12
  • Duplicated block (8 lines × 3) packages/katana_cli/lib/action/app/deeplink.dart:125 — packages/katana_cli/lib/action/app/deeplink.dart:125-132 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:72-79 | packages/katana_cli/lib/action/stripe/stripe.dart:128-135 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/dynamic_links.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 379 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) packages/katana_cli/lib/action/cloudflare/init.dart:60 — packages/katana_cli/lib/action/cloudflare/init.dart:60-67 | packages/katana_cli/lib/action/cloudflare/storage.dart:227-234 | packages/katana_cli/lib/action/cloudflare/turso.dart:73-80 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/storage.dart` and `packages/katana_cli/lib/action/cloudflare/turso.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 110 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 `packages/katana_cli/lib/action/cloudflare/init.dart:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) packages/katana_model/lib/adapter/runtime_model_adapter.dart:424 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:424-431 | packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1148-1155 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:403-410 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:16 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:16-23 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:16-23 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:16-23 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 103 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1300 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1300-1307 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2212-2219 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2393-2400 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:128 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:128-135 | packages/masamune_painter/lib/value/group_painting_value.dart:121-128 | packages/masamune_painter/lib/value/group_painting_value.dart:149-156 — before extracting anything, compare `packages/masamune_painter/lib/value/clipping_group_painting_value.dart` and `packages/masamune_painter/lib/value/group_painting_value.dart` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (8 lines × 3) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:74 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:74-81 | packages/masamune_painter/lib/value/group_painting_value.dart:147-154 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:74-81 — before extracting anything, compare `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart` and `packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 124 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 `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:524 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:524-531 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:946-953 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2061-2068 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) packages/katana_logger/lib/adapter/console_logger_adapter.dart:71 — packages/katana_logger/lib/adapter/console_logger_adapter.dart:71-78 | packages/katana_logger/lib/adapter/local_logger_adapter.dart:100-107 | packages/katana_logger/lib/adapter/runtime_logger_adapter.dart:114-121 — 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 (8 lines × 3) packages/masamune_model_docs_builder/lib/src/builder.dart:161 — packages/masamune_model_docs_builder/lib/src/builder.dart:161-168 | packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:166-173 | packages/masamune_model_firestore_builder/lib/src/builder.dart:217-224 — before extracting anything, compare `packages/masamune_model_docs_builder/lib/src/builder.dart` and `packages/masamune_model_firestore_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:340 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:340-347 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:348-355 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:331-338 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:364 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:364-371 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:372-379 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:356-363 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×12
  • Duplicated block (5 lines × 2) packages/katana_cli/lib/action/cloudflare/kv.dart:35 — packages/katana_cli/lib/action/cloudflare/kv.dart:35-39 | packages/katana_cli/lib/action/cloudflare/storage.dart:236-240 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/cloudflare/storage.dart:234` calls `get` and `packages/katana_cli/lib/action/cloudflare/kv.dart:34` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) packages/katana_cli/lib/action/cloudflare/kv.dart:34 — packages/katana_cli/lib/action/cloudflare/kv.dart:34-38 | packages/katana_cli/lib/action/cloudflare/short_link.dart:35-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/cloudflare/short_link.dart:34` calls `get` and `packages/katana_cli/lib/action/cloudflare/kv.dart:33` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) packages/katana_cli/lib/action/firebase/authentication.dart:58 — packages/katana_cli/lib/action/firebase/authentication.dart:58-62 | packages/katana_cli/lib/action/firebase/init.dart:510-515 — before extracting anything, compare `packages/katana_cli/lib/action/firebase/authentication.dart` and `packages/katana_cli/lib/action/firebase/init.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/katana_cli/lib/action/firebase/deploy.dart:21 — packages/katana_cli/lib/action/firebase/deploy.dart:21-25 | packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:46-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/firebase/deploy.dart:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `packages/katana_cli/lib/action/firebase/deploy.dart:25` calls `getAsMap`, `get` and `packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:51` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) packages/katana_model/lib/adapter/rest_api_model_adapter.dart:917 — packages/katana_model/lib/adapter/rest_api_model_adapter.dart:917-922 | packages/katana_model/lib/adapter/rest_api_model_adapter.dart:1040-1044 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/adapter/rest_api_model_adapter.dart:917` it does not close everything it opens, so those 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 (5 lines × 2) packages/katana_auth/lib/adapter/local_auth_adapter.dart:113 — packages/katana_auth/lib/adapter/local_auth_adapter.dart:113-117 | packages/katana_auth/lib/adapter/runtime_auth_adapter.dart:117-121 — before extracting anything, compare `packages/katana_auth/lib/adapter/local_auth_adapter.dart` and `packages/katana_auth/lib/adapter/runtime_auth_adapter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:152 — packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:152-156 | packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart:127-131 — before extracting anything, compare `packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart` and `packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/masamune_painter/lib/tools/inline/media_painter_inline_tools.dart:67 — packages/masamune_painter/lib/tools/inline/media_painter_inline_tools.dart:67-71 | packages/masamune_painter/lib/tools/inline/text_painter_inline_tools.dart:67-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) packages/masamune_painter/lib/tools/inline/select_painter_inline_tools.dart:68 — packages/masamune_painter/lib/tools/inline/select_painter_inline_tools.dart:68-72 | packages/masamune_painter/lib/tools/inline/shape_painter_inline_tools.dart:101-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) packages/masamune_painter/lib/tools/inline/shape/ellipse_shape_painter_inline_tools.dart:69 — packages/masamune_painter/lib/tools/inline/shape/ellipse_shape_painter_inline_tools.dart:69-73 | packages/masamune_painter/lib/tools/inline/shape/rectangle_shape_painter_inline_tools.dart:69-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:527 — packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:527-531 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1983-1987 — before extracting anything, compare `packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart` and `packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 168 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/katana_cli/lib/command/code/function.dart:103 — packages/katana_cli/lib/command/code/function.dart:103-107 | packages/katana_cli/lib/command/code/server/call.dart:280-284 — 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 `packages/katana_cli/lib/command/code/function.dart:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X18 · Disposal-pattern correctness · Owned disposable field is never released · ×12
  • Owned disposable field is never released packages/katana_form/lib/form/form_chips_field.dart:425 — `_FormChipsField` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_focusNode` itself (line 425, `FocusNode`), which makes that instance its own. Nothing in the class releases it — no `_focusNode.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `FocusNode` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_focusNode.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_date_field.dart:468 — `_FormDateFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 468, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_date_time_field.dart:412 — `_FormDateTimeFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 412, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_date_time_range_field.dart:391 — `_FormDateTimeRangeFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 391, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_duration_field.dart:420 — `_FormDurationFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 420, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_enum_modal_field.dart:354 — `_FormEnumModalFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 354, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_focus_node_builder.dart:145 — `_FormFocusNodeBuilderState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_focusNode` itself (line 145, `FocusNode`), which makes that instance its own. Nothing in the class releases it — no `_focusNode.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `FocusNode` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_focusNode.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_map_modal_field.dart:292 — `_FormMapModalFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 292, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_month_modal_field.dart:302 — `_FormMonthModalFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 302, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_num_modal_field.dart:272 — `_FormNumModalFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 272, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_pin_field.dart:552 — `_PinInputTextFieldState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_cursorBlinkOpacityController` itself (line 552, `AnimationController`), which makes that instance its own. Nothing in the class releases it — no `_cursorBlinkOpacityController.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `AnimationController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_cursorBlinkOpacityController.dispose();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/katana_form/lib/form/form_text_editing_controller_builder.dart:144 — `_FormTextEditingControllerBuilderState` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_controller` itself (line 144, `TextEditingController`), which makes that instance its own. Nothing in the class releases it — no `_controller.dispose()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `TextEditingController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_controller.dispose();` in `dispose()` before `super.dispose()`.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×11
  • Duplicated block (7 lines × 3) packages/katana_cli/lib/action/agora/agora.dart:165 — packages/katana_cli/lib/action/agora/agora.dart:165-172 | packages/katana_cli/lib/action/app/geocoding.dart:88-94 | packages/katana_cli/lib/action/mail/send_grid.dart:87-93 — before extracting anything, compare `packages/katana_cli/lib/action/agora/agora.dart` and `packages/katana_cli/lib/action/app/geocoding.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/agora/agora.dart:165` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 3) packages/katana_cli/lib/command/create.dart:512 — packages/katana_cli/lib/command/create.dart:512-518 | packages/katana_cli/lib/command/create.dart:965-971 | packages/katana_cli/lib/command/create.dart:1126-1132 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) packages/katana_cli/lib/command/git/commit.dart:28 — packages/katana_cli/lib/command/git/commit.dart:28-35 | packages/katana_cli/lib/command/git/pull_request.dart:61-67 | packages/katana_cli/lib/command/git/pull_request_comment.dart:54-61 — before extracting anything, compare `packages/katana_cli/lib/command/git/commit.dart` and `packages/katana_cli/lib/command/git/pull_request_comment.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 3) packages/katana_cli/lib/src/gradle.dart:572 — packages/katana_cli/lib/src/gradle.dart:572-578 | packages/katana_cli/lib/src/gradle.dart:592-598 | packages/katana_cli/lib/src/gradle.dart:603-609 — 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 `packages/katana_cli/lib/src/gradle.dart:572` it does not close everything it opens, so those 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, `packages/katana_cli/lib/src/gradle.dart:591` calls `contains` and `packages/katana_cli/lib/src/gradle.dart:571` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) packages/katana_model/lib/src/model_ref.dart:679 — packages/katana_model/lib/src/model_ref.dart:679-685 | packages/katana_model/lib/src/model_ref.dart:883-889 | packages/katana_model/lib/src/model_ref.dart:1097-1103 — 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 `packages/katana_model/lib/src/model_ref.dart:679` it does not close everything it opens, so those exact lines 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) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:512 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:512-518 | packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:125-131 | packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:197-203 — before extracting anything, compare `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart` and `packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:205` calls `toList`, `wait` and `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:519` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:77 — packages/masamune_model_d1_builder/lib/src/builder.dart:77-83 | packages/masamune_model_do_builder/lib/src/builder.dart:75-81 | packages/masamune_model_tidb_builder/lib/src/builder.dart:82-88 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/masamune_model_d1_builder/lib/src/builder.dart:76` calls `_readVectors`, `read` and `packages/masamune_model_do_builder/lib/src/builder.dart:74` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) packages/katana_storage_firebase/lib/adapter/others/firebase_storage_adapter.dart:296 — packages/katana_storage_firebase/lib/adapter/others/firebase_storage_adapter.dart:296-302 | packages/masamune_storage_cloudflare/lib/adapter/others/cloudflare_storage_adapter.dart:171-177 | packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:238-244 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) packages/masamune_model_d1/lib/actions/d1_delete_model_functions_action.dart:67 — packages/masamune_model_d1/lib/actions/d1_delete_model_functions_action.dart:67-73 | packages/masamune_model_do/lib/actions/do_delete_model_functions_action.dart:68-74 | packages/masamune_model_tidb/lib/actions/tidb_delete_model_functions_action.dart:66-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) packages/masamune_speech_to_text/lib/adapter/speech_to_text_masamune_adapter.dart:113 — packages/masamune_speech_to_text/lib/adapter/speech_to_text_masamune_adapter.dart:113-119 | packages/masamune_speech_to_text_google/lib/adapter/google_speech_to_text_masamune_adapter.dart:194-200 | packages/masamune_speech_to_text_mobile/lib/adapter/mobile_speech_to_text_masamune_adapter.dart:129-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) packages/masamune_markdown/lib/adapter/markdown_masamune_adapter.dart:175 — packages/masamune_markdown/lib/adapter/markdown_masamune_adapter.dart:175-181 | packages/masamune_painter/lib/adapter/painter_masamune_adapter.dart:281-287 | packages/masamune_picker/lib/adapter/picker_masamune_adapter.dart:271-277 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D35 · Change Coupling · Change coupling · ×10
  • Change coupling: others.dart ↔ web.dart packages/katana_theme/lib/src/others/others.dart:1 — `packages/katana_theme/lib/src/others/others.dart` and `packages/katana_theme/lib/src/web/web.dart` change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `e8541d6a` chore: Import sorter.; `3ef1f4a5` feat: Svg support; `0b94a2c2` chore: Apply import sorter. — run `git show` on any of them.
  • Change coupling: csr.dart ↔ keystore.dart packages/katana_cli/lib/action/app/csr.dart:1 — `packages/katana_cli/lib/action/app/csr.dart` and `packages/katana_cli/lib/action/app/keystore.dart` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `b9805dd4` fix: Modify to report error termination; `afd66698` fix: Enable git->ignore_secure_file; `da3e54ce` feat: Consolidate commands such as APP into APPLY. — run `git show` on any of them.
  • Change coupling: form_painter_field.dart ↔ rectangle_shape_painter_inline_tools.dart packages/masamune_painter/lib/src/form_painter_field.dart:1 — `packages/masamune_painter/lib/src/form_painter_field.dart` and `packages/masamune_painter/lib/tools/inline/shape/rectangle_shape_painter_inline_tools.dart` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `29a136bf` chore: Image placement; `bca5f71b` chore: Fixed a bug where an error occurred on the iOS simulator.; `54f6f883` chore: Up to the verification of all individual behaviors and operati… — run `git show` on any of them.
  • Change coupling: init.dart ↔ scheduler.dart packages/katana_cli/lib/action/firebase/init.dart:1 — `packages/katana_cli/lib/action/firebase/init.dart` and `packages/katana_cli/lib/action/firebase/scheduler.dart` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `a9802c37` feat(katana_cli): add option to apply Firebase settings without deploy; `7298f1a2` feat(katana_cli): register Firebase Functions secrets in REDACTED Manag…; `d26a33c7` fix: Skip if no package is available. — run `git show` on any of them.
  • Change coupling: searchable_document_mixin.dart ↔ model_query.dart packages/katana_model/lib/extension/searchable_document_mixin.dart:1 — `packages/katana_model/lib/extension/searchable_document_mixin.dart` and `packages/katana_model/lib/src/model_query.dart` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `901f9cf3` fix: Integrate removeOnlyEmoji method across searchable mixins and mo…; `f844931b` fix: Slight change in search algorithm.; `0267612f` fix: Fixed a bug when the character . Fixed a bug when the character . — run `git show` on any of them.
  • Change coupling: screenshot.dart ↔ config.dart packages/katana_cli/lib/command/store/screenshot.dart:1 — `packages/katana_cli/lib/command/store/screenshot.dart` and `packages/katana_cli/lib/config.dart` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `37ab4b40` fix: Added the ability to specify the location of text for simple icons.; `0e7bb4b1` fix: Added the ability to automatically create icons.; `1907a431` fix: Agora's authorization measures. — run `git show` on any of them.
  • Change coupling: init.dart ↔ katana.dart packages/katana_cli/lib/action/cloudflare/init.dart:1 — `packages/katana_cli/lib/action/cloudflare/init.dart` and `packages/katana_cli/lib/katana.dart` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `ecfea50d` feat(katana_cli): add custom domains, R2 bucket provisioning, and Pag…; `9b9b8295` fix(cloudflare): add smart placement option for Cloudflare Workers; `f39666df` feat(android): synchronize AndroidManifest placeholders with Gradle c… — run `git show` on any of them.
  • Change coupling: terms_and_privacy.dart ↔ config.dart packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:1 — `packages/katana_cli/lib/action/firebase/terms_and_privacy.dart` and `packages/katana_cli/lib/config.dart` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `8016e49c` fix: Added the ability to add index pages to TermsAndPolicy.; `f0dfeb98` fix: Added a page on how to delete.; `8b12caf1` fix: Terms of Use and Privacy Policy can be written without spreadshe… — run `git show` on any of them.
  • Change coupling: katana.dart ↔ csr.dart packages/katana_cli/bin/katana.dart:1 — `packages/katana_cli/bin/katana.dart` and `packages/katana_cli/lib/action/app/csr.dart` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `84f106cc` chore: Addressed the remaining issues.; `da3e54ce` feat: Consolidate commands such as APP into APPLY.; `58200ee8` feat: Add githook. (at that commit the file was still `packages/katana_cli/lib/command/app/csr.dart`) — run `git show` on any of them.
  • Change coupling: painter_controller.dart ↔ rectangle_shape_painter_inline_tools.dart packages/masamune_painter/lib/src/painter_controller.dart:1 — `packages/masamune_painter/lib/src/painter_controller.dart` and `packages/masamune_painter/lib/tools/inline/shape/rectangle_shape_painter_inline_tools.dart` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `a93c47fb` chore: Add Layer Screen; `29a136bf` chore: Image placement; `e33545f8` chore: Color settings. — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×10
  • Edited copy of a member (13 corresponding lines) packages/masamune_storage_cloudflare/lib/src/cloudflare_storage_functions_action.dart:106 — packages/masamune_storage_cloudflare/lib/src/cloudflare_storage_functions_action.dart:106-118 | packages/masamune_storage_functions/lib/actions/storage_functions_action.dart:66-78 — 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) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:58 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:58-70 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:58-70 — 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) packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:224 — packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:224-236 | packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:238-250 — 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) packages/masamune_notification_firebase/lib/adapter/firebase_remote_notification_masamune_adapter.dart:225 — packages/masamune_notification_firebase/lib/adapter/firebase_remote_notification_masamune_adapter.dart:225-237 | packages/masamune_notification_firebase/lib/adapter/firebase_remote_notification_masamune_adapter.dart:239-253 — 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) packages/masamune_painter/lib/value/media_painting_value.dart:81 — packages/masamune_painter/lib/value/media_painting_value.dart:81-93 | packages/masamune_painter/lib/value/text_painting_value.dart:85-97 — 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) packages/katana_form/lib/form/form_future_field.dart:311 — packages/katana_form/lib/form/form_future_field.dart:311-323 | packages/katana_form/lib/form/form_list_builder.dart:297-309 — 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) packages/katana_model/lib/adapter/runtime_model_adapter.dart:342 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:342-357 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:320-332 — 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) packages/masamune_auth_github_firebase/lib/provider/firebase_github_auth_query.dart:76 — packages/masamune_auth_github_firebase/lib/provider/firebase_github_auth_query.dart:76-88 | packages/masamune_auth_github_firebase/lib/provider/firebase_github_auth_query.dart:115-127 — 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) packages/katana_scoped/lib/value/watch.dart:134 — packages/katana_scoped/lib/value/watch.dart:134-148 | packages/katana_scoped/lib/value/watch.dart:150-162 — 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) packages/katana_logger/example/lib/main.dart:20 — packages/katana_logger/example/lib/main.dart:20-32 | packages/katana_scoped/example/lib/main.dart:19-31 — 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 · Duplicated block (15 lines × 3) · ×10
  • Duplicated block (15 lines × 3) packages/katana_cli/lib/action/app/icon.dart:125 — packages/katana_cli/lib/action/app/icon.dart:125-139 | packages/katana_cli/lib/action/app/icon.dart:162-176 | packages/katana_cli/lib/action/app/icon.dart:188-202 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/icon.dart:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 3) packages/katana_cli/lib/action/app/icon.dart:213 — packages/katana_cli/lib/action/app/icon.dart:213-227 | packages/katana_cli/lib/command/create.dart:314-328 | packages/katana_cli/lib/command/create.dart:767-781 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (15 lines × 3) packages/katana_cli/lib/action/app/location.dart:175 — packages/katana_cli/lib/action/app/location.dart:175-189 | packages/katana_cli/lib/action/firebase/init.dart:1344-1358 | packages/katana_cli/lib/action/purchase/purchase.dart:197-211 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/firebase/init.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:82 — packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:82-96 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:81-95 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:83-97 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 137 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 `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 3) packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:67 — packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:67-81 | packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:95-109 | packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:123-137 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:67` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 3) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:70 — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:70-84 | packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:96-110 | packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:137-151 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15 lines × 3) packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:63 — packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:63-77 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:89-103 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:130-144 — 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 (15 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:300 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:300-314 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:308-322 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:291-305 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:300` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (15 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:257 — packages/masamune_model_d1_builder/lib/src/builder.dart:257-271 | packages/masamune_model_do_builder/lib/src/builder.dart:244-258 | packages/masamune_model_tidb_builder/lib/src/builder.dart:257-271 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1_builder/lib/src/builder.dart:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/masamune_model_do_builder/lib/src/builder.dart:259` calls `ArgumentError` and `packages/masamune_model_d1_builder/lib/src/builder.dart:272` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:271 — packages/masamune_model_d1_builder/lib/src/builder.dart:271-285 | packages/masamune_model_do_builder/lib/src/builder.dart:261-275 | packages/masamune_model_tidb_builder/lib/src/builder.dart:271-285 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1_builder/lib/src/builder.dart:271` 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 · Edited copy of a member (10 corresponding lines) · ×9
  • Edited copy of a member (10 corresponding lines) packages/katana_form/lib/src/form_media_value.dart:220 — packages/katana_form/lib/src/form_media_value.dart:220-229 | packages/katana_model/lib/src/model_field_value.dart:438-451 — 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) packages/masamune_camera/lib/adapter/mobile_camera_masamune_adapter.dart:42 — packages/masamune_camera/lib/adapter/mobile_camera_masamune_adapter.dart:42-51 | packages/masamune_camera/lib/adapter/mobile_camera_masamune_adapter.dart:53-62 — 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) packages/katana_cli/lib/action/app/icon.dart:78 — packages/katana_cli/lib/action/app/icon.dart:78-87 | packages/katana_cli/lib/action/app/info.dart:20-33 — 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) packages/masamune_location_background/lib/src/others/background_location_repository.dart:89 — packages/masamune_location_background/lib/src/others/background_location_repository.dart:89-98 | packages/masamune_location_background/lib/src/others/background_location_repository.dart:183-192 — 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) packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:268 — packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:268-280 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:282-291 — 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) packages/masamune_model_do/lib/adapters/listenable_durable_object.dart:34 — packages/masamune_model_do/lib/adapters/listenable_durable_object.dart:34-43 | packages/masamune_model_do/lib/adapters/listenable_durable_object.dart:45-55 — 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) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:2658 — packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:2658-2667 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:2669-2680 — 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) packages/masamune_model_functions/lib/actions/collection_model_functions_action.dart:62 — packages/masamune_model_functions/lib/actions/collection_model_functions_action.dart:62-71 | packages/masamune_model_functions/lib/actions/document_model_functions_action.dart:62-71 — 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) packages/katana_model/lib/src/collection_base.dart:681 — packages/katana_model/lib/src/collection_base.dart:681-692 | packages/katana_model/lib/src/document_base.dart:614-623 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×9
  • Duplicated block (9 lines × 3) packages/katana_model/lib/adapter/runtime_model_adapter.dart:414 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:414-422 | packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:968-976 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:334-342 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:127 — packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:127-135 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:127-135 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:127-135 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 136 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 `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:127` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:53 — packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:53-61 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:52-60 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:53-61 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 107 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 `packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:53` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:423 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:423-431 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:431-439 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:415-423 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:423` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:16 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:16-24 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:16-24 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:16-24 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) packages/katana_cli/lib/command/analytics/appstore.dart:12 — packages/katana_cli/lib/command/analytics/appstore.dart:12-20 | packages/katana_cli/lib/command/analytics/firebase.dart:12-20 | packages/katana_cli/lib/command/analytics/googleplay.dart:12-20 — 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:524 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:524-532 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:533-541 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:517-525 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:698 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:698-706 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:711-719 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:659-667 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `adapter` to `D1ModelAdapter` in one and `DurableObjectModelAdapter` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 3) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:116 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:116-124 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:116-124 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:116-124 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×9
  • Duplicated block (6 lines × 2) packages/katana_cli/lib/action/firebase/deploy.dart:45 — packages/katana_cli/lib/action/firebase/deploy.dart:45-50 | packages/katana_cli/lib/action/firebase/scheduler.dart:30-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/firebase/deploy.dart: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 (6 lines × 2) packages/katana_cli/lib/action/firebase/init.dart:476 — packages/katana_cli/lib/action/firebase/init.dart:476-481 | packages/katana_cli/lib/command/pub/upgrade.dart:18-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/firebase/init.dart:476` it does not close everything it opens, so those exact lines 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) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1372 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1372-1377 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1404-1409 — both copies are in the same file, so extract the block into 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) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:164 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:164-169 | packages/masamune_painter/lib/value/group_painting_value.dart:178-183 — before extracting anything, compare `packages/masamune_painter/lib/value/clipping_group_painting_value.dart` and `packages/masamune_painter/lib/value/group_painting_value.dart` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (6 lines × 2) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:96 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:96-101 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:96-101 — before extracting anything, compare `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart` and `packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 124 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 `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:96` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) packages/katana_cli/lib/command/pub/version.dart:58 — packages/katana_cli/lib/command/pub/version.dart:58-63 | packages/katana_cli/lib/command/pub/version.dart:107-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/pub/version.dart:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/command/pub/version.dart:57` calls `tryParse`, `group` and `packages/katana_cli/lib/command/pub/version.dart:106` 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) packages/masamune_notification/lib/src/local_notification.dart:328 — packages/masamune_notification/lib/src/local_notification.dart:328-333 | packages/masamune_notification/lib/src/remote_notification.dart:451-456 — 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) packages/katana_scoped/lib/src/scoped.dart:386 — packages/katana_scoped/lib/src/scoped.dart:386-391 | packages/katana_scoped/lib/src/scoped_scope.dart:45-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) packages/masamune_markdown/lib/src/markdown_tools.dart:130 — packages/masamune_markdown/lib/src/markdown_tools.dart:130-135 | packages/masamune_painter/lib/src/painter_tools.dart:63-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D5 · Coupling · Off the main sequence · ×9
  • Off the main sequence: katana — katana: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 90 project(s), so it's rigid to change.
  • Off the main sequence: masamune_workflow — masamune_workflow: abstractness 1.00, instability 1.00, distance 1.00 — zone of uselessness — abstract and unstable, so it's likely unused.
  • Off the main sequence: katana_firebase — katana_firebase: abstractness 0.00, instability 0.08, distance 0.92 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
  • Off the main sequence: masamune_annotation — masamune_annotation: abstractness 0.14, instability 0.08, distance 0.77 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
  • Off the main sequence: katana_platform_info — katana_platform_info: abstractness 0.17, instability 0.08, distance 0.76 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
  • Off the main sequence: katana_localization_annotation — katana_localization_annotation: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: katana_router_annotation — katana_router_annotation: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: katana_theme_annotation — katana_theme_annotation: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: masamune_model_github — masamune_model_github: abstractness 0.75, instability 1.00, distance 0.75 — zone of uselessness — abstract and unstable, so it's likely unused.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×8
  • Duplicated block (17 lines × 2) packages/katana_cli/lib/command/store/screenshot.dart:144 — packages/katana_cli/lib/command/store/screenshot.dart:144-160 | packages/katana_cli/lib/command/store/screenshot.dart:180-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/store/screenshot.dart:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/katana_storage/lib/adapter/local_storage_adapter.dart:101 — packages/katana_storage/lib/adapter/local_storage_adapter.dart:101-117 | packages/katana_storage/lib/adapter/runtime_storage_adapter.dart:133-149 — before extracting anything, compare `packages/katana_storage/lib/adapter/local_storage_adapter.dart` and `packages/katana_storage/lib/adapter/runtime_storage_adapter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) packages/katana_theme/lib/src/app_theme_data.dart:2009 — packages/katana_theme/lib/src/app_theme_data.dart:2009-2025 | packages/katana_theme/lib/src/app_theme_data.dart:3514-3530 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:61 — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:61-77 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:54-70 — before extracting anything, compare `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart` and `packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:2574 — packages/masamune_markdown/lib/src/markdown_controller.dart:2574-2590 | packages/masamune_markdown/lib/src/markdown_controller.dart:2805-2821 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart:2574` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:206 — packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:206-222 | packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart:181-197 — before extracting anything, compare `packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart` and `packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:926 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:926-942 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2245-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1172 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1172-1188 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1193-1209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×8
  • Duplicated block (12 lines × 4) packages/katana_cli/lib/command/flavor/dev.dart:19 — packages/katana_cli/lib/command/flavor/dev.dart:19-30 | packages/katana_cli/lib/command/flavor/prod.dart:19-30 | packages/katana_cli/lib/command/flavor/stg.dart:19-30 | packages/katana_cli/lib/command/flavor/test.dart:19-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (12 lines × 4) packages/katana_cli/lib/command/git/commit.dart:21 — packages/katana_cli/lib/command/git/commit.dart:21-32 | packages/katana_cli/lib/command/git/pull_request.dart:24-35 | packages/katana_cli/lib/command/git/pull_request_comment.dart:25-36 | packages/katana_cli/lib/command/git/remove.dart:21-32 — before extracting anything, compare `packages/katana_cli/lib/command/git/commit.dart` and `packages/katana_cli/lib/command/git/pull_request_comment.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/command/git/pull_request.dart:23` calls `get` and `packages/katana_cli/lib/command/git/commit.dart:20` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 4) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:68 — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:68-79 | packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:94-105 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:61-72 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:87-98 — before extracting anything, compare `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart` and `packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:445 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:445-456 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:453-464 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:437-448 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1726-1737 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:445` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:16 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:16-27 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_search_converter.dart:16-27 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_token_converter.dart:16-27 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_vector_value_converter.dart:16-27 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_search_converter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 4) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1104 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1104-1115 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1145-1156 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1646-1657 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2575-2586 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 4) packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:114 — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:114-125 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:114-125 | packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:111-122 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:117-128 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 4) packages/katana_model/lib/adapter/runtime_model_adapter.dart:329 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:329-340 | packages/katana_model/lib/adapter/runtime_model_adapter.dart:371-382 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:307-318 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:364-375 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `ref` to `ModelTransactionRef` in one and `ModelBatchRef` 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 (12 lines × 3) · ×8
  • Duplicated block (12 lines × 3) packages/katana_cli/lib/action/app/geocoding.dart:76 — packages/katana_cli/lib/action/app/geocoding.dart:76-87 | packages/katana_cli/lib/action/firebase/algolia.dart:71-82 | packages/katana_cli/lib/action/mail/send_grid.dart:75-86 — before extracting anything, compare `packages/katana_cli/lib/action/app/geocoding.dart` and `packages/katana_cli/lib/action/mail/send_grid.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/geocoding.dart:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:174 — packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:174-185 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:174-185 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:175-186 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 136 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 `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:174` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:104 — packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:104-115 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:103-114 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:104-115 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 107 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 `packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:57 — packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:57-68 | packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart:41-52 | packages/masamune_painter/lib/tools/inline/property/paragraph_align_property_painter_inline_tools.dart:44-55 — before extracting anything, compare `packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart` and `packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) packages/masamune_model_d1/lib/actions/d1_delete_model_functions_action.dart:54 — packages/masamune_model_d1/lib/actions/d1_delete_model_functions_action.dart:54-65 | packages/masamune_model_d1/lib/actions/d1_post_model_functions_action.dart:54-65 | packages/masamune_model_d1/lib/actions/d1_put_model_functions_action.dart:60-71 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) packages/masamune_model_do/lib/actions/do_delete_model_functions_action.dart:55 — packages/masamune_model_do/lib/actions/do_delete_model_functions_action.dart:55-66 | packages/masamune_model_do/lib/actions/do_post_model_functions_action.dart:54-65 | packages/masamune_model_do/lib/actions/do_put_model_functions_action.dart:60-71 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) packages/masamune_model_tidb/lib/actions/tidb_delete_model_functions_action.dart:53 — packages/masamune_model_tidb/lib/actions/tidb_delete_model_functions_action.dart:53-64 | packages/masamune_model_tidb/lib/actions/tidb_post_model_functions_action.dart:53-64 | packages/masamune_model_tidb/lib/actions/tidb_put_model_functions_action.dart:59-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) packages/masamune_model_turso/lib/actions/turso_delete_model_functions_action.dart:58 — packages/masamune_model_turso/lib/actions/turso_delete_model_functions_action.dart:58-69 | packages/masamune_model_turso/lib/actions/turso_post_model_functions_action.dart:58-69 | packages/masamune_model_turso/lib/actions/turso_put_model_functions_action.dart:64-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, 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 (6 lines × 4) · ×8
  • Duplicated block (6 lines × 4) packages/katana_cli/lib/action/app/deeplink.dart:124 — packages/katana_cli/lib/action/app/deeplink.dart:124-129 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:71-76 | packages/katana_cli/lib/action/firebase/messaging.dart:248-253 | packages/katana_cli/lib/action/stripe/stripe.dart:127-132 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/dynamic_links.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 379 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) packages/katana_cli/lib/action/cloudflare/pages.dart:119 — packages/katana_cli/lib/action/cloudflare/pages.dart:119-124 | packages/katana_cli/lib/action/git/review.dart:30-35 | packages/katana_cli/lib/command/git/commit.dart:18-23 | packages/katana_cli/lib/command/git/remove.dart:18-23 — before extracting anything, compare `packages/katana_cli/lib/command/git/commit.dart` and `packages/katana_cli/lib/command/git/remove.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/action/cloudflare/pages.dart: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 (6 lines × 4) packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:144 — packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:144-149 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:67-72 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:68-73 | packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:77-82 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:144` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 4) packages/katana_cli/lib/action/cloudflare/kv.dart:23 — packages/katana_cli/lib/action/cloudflare/kv.dart:23-28 | packages/katana_cli/lib/action/cloudflare/pages.dart:68-73 | packages/katana_cli/lib/action/cloudflare/short_link.dart:23-28 | packages/katana_cli/lib/action/cloudflare/storage.dart:176-181 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:202 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:202-207 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:204-209 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:192-197 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1017-1022 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) packages/masamune_model_d1/lib/src/d1_model_path.dart:87 — packages/masamune_model_d1/lib/src/d1_model_path.dart:87-92 | packages/masamune_model_do/lib/src/do_model_path.dart:89-94 | packages/masamune_model_tidb/lib/src/tidb_model_path.dart:81-86 | packages/masamune_model_turso/lib/src/turso_model_path.dart:82-87 — before extracting anything, compare `packages/masamune_model_d1/lib/src/d1_model_path.dart` and `packages/masamune_model_do/lib/src/do_model_path.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 4) packages/masamune_model_d1/lib/src/d1_model_path.dart:94 — packages/masamune_model_d1/lib/src/d1_model_path.dart:94-99 | packages/masamune_model_do/lib/src/do_model_path.dart:96-101 | packages/masamune_model_tidb/lib/src/tidb_model_path.dart:88-93 | packages/masamune_model_turso/lib/src/turso_model_path.dart:89-94 — before extracting anything, compare `packages/masamune_model_d1/lib/src/d1_model_path.dart` and `packages/masamune_model_do/lib/src/do_model_path.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 4) packages/masamune_model_d1/lib/src/d1_model_path.dart:101 — packages/masamune_model_d1/lib/src/d1_model_path.dart:101-106 | packages/masamune_model_do/lib/src/do_model_path.dart:103-108 | packages/masamune_model_tidb/lib/src/tidb_model_path.dart:95-100 | packages/masamune_model_turso/lib/src/turso_model_path.dart:96-101 — before extracting anything, compare `packages/masamune_model_d1/lib/src/d1_model_path.dart` and `packages/masamune_model_do/lib/src/do_model_path.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×8
  • Duplicated block (5 lines × 3) packages/katana_cli/lib/action/app/csr.dart:134 — packages/katana_cli/lib/action/app/csr.dart:134-139 | packages/katana_cli/lib/action/app/keystore.dart:396-400 | packages/katana_cli/lib/action/app/p12.dart:149-154 — before extracting anything, compare `packages/katana_cli/lib/action/app/csr.dart` and `packages/katana_cli/lib/action/app/keystore.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/action/app/csr.dart:134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) packages/katana_cli/lib/action/cloudflare/d1.dart:162 — packages/katana_cli/lib/action/cloudflare/d1.dart:162-171 | packages/katana_cli/lib/action/cloudflare/durable_object.dart:128-133 | packages/katana_cli/lib/action/cloudflare/tidb.dart:198-202 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/d1.dart` and `packages/katana_cli/lib/action/cloudflare/durable_object.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/cloudflare/d1.dart:162` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/cloudflare/durable_object.dart:128` calls `require`, `setEncoding`, `on` and `packages/katana_cli/lib/action/cloudflare/d1.dart:161` 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.
  • Duplicated block (5 lines × 3) packages/katana_cli/lib/action/cloudflare/turso.dart:83 — packages/katana_cli/lib/action/cloudflare/turso.dart:83-87 | packages/katana_cli/lib/action/ecosystem/ecosystem.dart:53-58 | packages/katana_cli/lib/action/purchase/purchase.dart:46-50 — `packages/katana_cli/lib/action/ecosystem/ecosystem.dart` and `packages/katana_cli/lib/action/purchase/purchase.dart` 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 6 separate duplicated blocks between them, totalling at least 89 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 after the matched lines, `packages/katana_cli/lib/action/cloudflare/turso.dart:88` calls `parseTursoGroups`, `get` and `packages/katana_cli/lib/action/purchase/purchase.dart:51` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) packages/katana_cli/lib/action/ecosystem/ecosystem.dart:68 — packages/katana_cli/lib/action/ecosystem/ecosystem.dart:68-72 | packages/katana_cli/lib/action/firebase/init.dart:497-504 | packages/katana_cli/lib/action/purchase/purchase.dart:56-60 — `packages/katana_cli/lib/action/ecosystem/ecosystem.dart` and `packages/katana_cli/lib/action/purchase/purchase.dart` 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 6 separate duplicated blocks between them, totalling at least 89 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.
  • Duplicated block (5 lines × 3) packages/katana_form/lib/form/form_date_field.dart:944 — packages/katana_form/lib/form/form_date_field.dart:944-948 | packages/katana_form/lib/form/form_duration_field.dart:901-905 | packages/katana_form/lib/form/form_month_modal_field.dart:777-781 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_duration_field.dart` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) packages/katana_auth/lib/src/authentication.dart:569 — packages/katana_auth/lib/src/authentication.dart:569-573 | packages/katana_router/lib/src/app_router.dart:593-597 | packages/masamune_agora/lib/src/agora_controller.dart:1523-1527 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (5 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:601 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:601-605 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:612-616 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:563-567 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) packages/masamune_model_d1_builder/lib/src/schema_spec.dart:177 — packages/masamune_model_d1_builder/lib/src/schema_spec.dart:177-181 | packages/masamune_model_do_builder/lib/src/schema_spec.dart:161-165 | packages/masamune_model_tidb_builder/lib/src/schema_spec.dart:207-211 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×7
  • Edited copy of a member (8 corresponding lines) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:2604 — packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:2604-2611 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:2613-2622 — 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) packages/katana_indicator/lib/src/progress_indicator.dart:382 — packages/katana_indicator/lib/src/progress_indicator.dart:382-389 | packages/katana_model/lib/src/listenable_listener.dart:80-87 — 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) packages/katana_form/lib/form/form_chips_field.dart:1297 — packages/katana_form/lib/form/form_chips_field.dart:1297-1304 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:1249-1259 — 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) packages/katana_form/lib/form/form_chips_field.dart:1306 — packages/katana_form/lib/form/form_chips_field.dart:1306-1313 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:1261-1271 — 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) packages/masamune_purchase_stripe/lib/actions/stripe_action_create_customer_and_payment.dart:35 — packages/masamune_purchase_stripe/lib/actions/stripe_action_create_customer_and_payment.dart:35-42 | packages/masamune_purchase_stripe/lib/actions/stripe_action_create_subscription.dart:53-63 — 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) packages/masamune_markdown/lib/src/markdown_value.dart:659 — packages/masamune_markdown/lib/src/markdown_value.dart:659-666 | packages/masamune_markdown/lib/value/markdown_image_block_value.dart:137-145 — 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) packages/masamune_purchase_stripe/lib/actions/stripe_action_capture_purchase.dart:35 — packages/masamune_purchase_stripe/lib/actions/stripe_action_capture_purchase.dart:35-42 | packages/masamune_purchase_stripe/lib/actions/stripe_action_refund_purchase.dart:35-42 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×7
  • Duplicated block (23 lines × 2) packages/katana_cli/lib/action/cloudflare/storage.dart:290 — packages/katana_cli/lib/action/cloudflare/storage.dart:290-312 | packages/katana_cli/lib/action/firebase/algolia.dart:41-63 — 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 `packages/katana_cli/lib/action/cloudflare/storage.dart:290` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:81 — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:81-103 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:74-96 — before extracting anything, compare `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart` and `packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:539 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:539-561 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:572-594 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:539` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:571 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:571-593 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:608-630 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:571` 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 (23 lines × 2) packages/masamune_model_functions/lib/actions/collection_model_functions_action.dart:38 — packages/masamune_model_functions/lib/actions/collection_model_functions_action.dart:38-60 | packages/masamune_model_functions/lib/actions/document_model_functions_action.dart:38-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) packages/masamune_painter/lib/tools/block/line/solid_10px_line_painter_block_tools.dart:48 — packages/masamune_painter/lib/tools/block/line/solid_10px_line_painter_block_tools.dart:48-70 | packages/masamune_painter/lib/tools/block/line/solid_1px_line_painter_block_tools.dart:48-70 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/line/solid_10px_line_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/line/solid_1px_line_painter_block_tools.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) packages/katana_cli/lib/command/code/collection.dart:155 — packages/katana_cli/lib/command/code/collection.dart:155-177 | packages/katana_cli/lib/command/code/document.dart:147-169 — before extracting anything, compare `packages/katana_cli/lib/command/code/collection.dart` and `packages/katana_cli/lib/command/code/document.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/command/code/collection.dart:136` calls `ModelCollectionQuery` and `packages/katana_cli/lib/command/code/document.dart:128` 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 × 2) · ×7
  • Duplicated block (21 lines × 2) packages/katana_auth/lib/src/auth_database.dart:256 — packages/katana_auth/lib/src/auth_database.dart:256-276 | packages/katana_model/lib/src/no_sql_database.dart:151-171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (21 lines × 2) packages/katana_cli/lib/action/firebase/authentication.dart:524 — packages/katana_cli/lib/action/firebase/authentication.dart:524-544 | packages/katana_cli/lib/action/firebase/authentication.dart:558-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/firebase/authentication.dart:524` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) packages/katana_cli/lib/command/deploy.dart:33 — packages/katana_cli/lib/command/deploy.dart:33-53 | packages/katana_cli/lib/command/git/update.dart:30-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (21 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:569 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:569-589 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:509-529 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 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 `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:569` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) packages/katana_storage/lib/adapter/local_storage_adapter.dart:79 — packages/katana_storage/lib/adapter/local_storage_adapter.dart:79-99 | packages/katana_storage/lib/adapter/runtime_storage_adapter.dart:111-131 — before extracting anything, compare `packages/katana_storage/lib/adapter/local_storage_adapter.dart` and `packages/katana_storage/lib/adapter/runtime_storage_adapter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) packages/masamune_builder/lib/generator/controller_generator.dart:12 — packages/masamune_builder/lib/generator/controller_generator.dart:12-32 | packages/masamune_builder/lib/generator/controller_group_generator.dart:12-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_builder/lib/generator/controller_generator.dart:12` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) packages/katana_cli/lib/command/code/server/schedule.dart:242 — packages/katana_cli/lib/command/code/server/schedule.dart:242-262 | packages/katana_cli/lib/command/code/server/worker.dart:24-44 — before extracting anything, compare `packages/katana_cli/lib/command/code/server/schedule.dart` and `packages/katana_cli/lib/command/code/server/worker.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 111 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 `packages/katana_cli/lib/command/code/server/schedule.dart:242` it does not close everything it opens, so those 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) · ×7
  • Duplicated block (18 lines × 2) packages/katana_cli/lib/action/cloudflare/kv.dart:62 — packages/katana_cli/lib/action/cloudflare/kv.dart:62-79 | packages/katana_cli/lib/action/cloudflare/storage.dart:331-348 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 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 `packages/katana_cli/lib/action/cloudflare/kv.dart:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/katana_cli/lib/action/cloudflare/kv.dart:169 — packages/katana_cli/lib/action/cloudflare/kv.dart:169-186 | packages/katana_cli/lib/action/cloudflare/storage.dart:618-635 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 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 `packages/katana_cli/lib/action/cloudflare/kv.dart:169` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/katana_cli/lib/command/git/pull_request.dart:178 — packages/katana_cli/lib/command/git/pull_request.dart:178-195 | packages/katana_cli/lib/command/git/pull_request_comment.dart:152-169 — before extracting anything, compare `packages/katana_cli/lib/command/git/pull_request.dart` and `packages/katana_cli/lib/command/git/pull_request_comment.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/git/pull_request.dart:178` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:1042 — packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:1042-1059 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:1175-1192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:1042` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:353 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:353-370 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:293-310 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:967 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:967-984 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:926-943 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:967` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/katana_cli/lib/command/code/cache.dart:73 — packages/katana_cli/lib/command/code/cache.dart:73-90 | packages/katana_cli/lib/command/code/query.dart:73-90 — before extracting anything, compare `packages/katana_cli/lib/command/code/cache.dart` and `packages/katana_cli/lib/command/code/query.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×7
  • Duplicated block (14 lines × 3) packages/katana_auth/lib/src/auth_database.dart:261 — packages/katana_auth/lib/src/auth_database.dart:261-274 | packages/katana_logger/lib/src/logger_database.dart:73-86 | packages/katana_model/lib/src/no_sql_database.dart:156-169 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_auth/lib/src/auth_database.dart:261` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) packages/katana_cli/lib/action/app/location.dart:150 — packages/katana_cli/lib/action/app/location.dart:150-163 | packages/katana_cli/lib/action/firebase/authentication.dart:645-658 | packages/katana_cli/lib/action/firebase/messaging.dart:105-118 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/location.dart:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:155 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:155-168 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:156-169 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:157-170 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart: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.
  • Duplicated block (14 lines × 3) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:707 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:707-720 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:635-648 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:187-200 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 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 `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:707` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:221 — packages/masamune_model_d1_builder/lib/src/builder.dart:221-234 | packages/masamune_model_do_builder/lib/src/builder.dart:218-231 | packages/masamune_model_tidb_builder/lib/src/builder.dart:228-241 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1341 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1341-1354 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2248-2261 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2410-2423 — 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 (14 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:105 — packages/masamune_model_d1_builder/lib/src/builder.dart:105-118 | packages/masamune_model_do_builder/lib/src/builder.dart:103-116 | packages/masamune_model_tidb_builder/lib/src/builder.dart:117-130 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×7
  • Duplicated block (13 lines × 3) packages/katana_cli/lib/action/app/deeplink.dart:270 — packages/katana_cli/lib/action/app/deeplink.dart:270-282 | packages/katana_cli/lib/action/firebase/authentication.dart:829-841 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:187-199 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:270` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) packages/katana_cli/lib/command/create.dart:474 — packages/katana_cli/lib/command/create.dart:474-486 | packages/katana_cli/lib/command/create.dart:927-939 | packages/katana_cli/lib/command/create.dart:1116-1128 — 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 (13 lines × 3) packages/katana_cli/lib/command/git/pull_request.dart:29 — packages/katana_cli/lib/command/git/pull_request.dart:29-41 | packages/katana_cli/lib/command/git/pull_request_comment.dart:30-42 | packages/katana_cli/lib/command/git/remove.dart:26-38 — before extracting anything, compare `packages/katana_cli/lib/command/git/pull_request.dart` and `packages/katana_cli/lib/command/git/pull_request_comment.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) packages/katana_form/lib/form/form_date_field.dart:459 — packages/katana_form/lib/form/form_date_field.dart:459-471 | packages/katana_form/lib/form/form_duration_field.dart:411-423 | packages/katana_form/lib/form/form_month_modal_field.dart:293-305 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_duration_field.dart` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) packages/katana_form/lib/form/form_enum_modal_field.dart:345 — packages/katana_form/lib/form/form_enum_modal_field.dart:345-357 | packages/katana_form/lib/form/form_map_modal_field.dart:283-295 | packages/katana_form/lib/form/form_num_modal_field.dart:263-275 — before extracting anything, compare `packages/katana_form/lib/form/form_enum_modal_field.dart` and `packages/katana_form/lib/form/form_map_modal_field.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 318 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:106 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:106-118 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:109-121 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:110-122 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) packages/masamune_painter/lib/tools/inline/shape/ellipse_shape_painter_inline_tools.dart:83 — packages/masamune_painter/lib/tools/inline/shape/ellipse_shape_painter_inline_tools.dart:83-95 | packages/masamune_painter/lib/tools/inline/shape/rectangle_shape_painter_inline_tools.dart:83-95 | packages/masamune_painter/lib/tools/primary/text_painter_primary_tools.dart:78-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×7
  • Duplicated block (11 lines × 4) packages/katana_cli/lib/action/app/csr.dart:94 — packages/katana_cli/lib/action/app/csr.dart:94-104 | packages/katana_cli/lib/action/app/keystore.dart:361-371 | packages/katana_cli/lib/action/app/p12.dart:105-115 | packages/katana_cli/lib/action/cloudflare/init.dart:167-177 — before extracting anything, compare `packages/katana_cli/lib/action/app/csr.dart` and `packages/katana_cli/lib/action/app/keystore.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/action/app/csr.dart:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) packages/katana_model/lib/adapter/runtime_model_adapter.dart:224 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:224-234 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:737-747 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:665-675 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:219-229 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/adapter/runtime_model_adapter.dart:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1110 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1110-1120 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1151-1161 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1606-1616 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1652-1662 — 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 `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:907 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:907-917 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:930-940 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2226-2236 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2249-2259 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:178 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:178-188 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:180-190 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:168-178 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:993-1003 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:190 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:190-200 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:192-202 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:180-190 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1005-1015 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 4) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:808 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:808-818 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:852-862 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:736-746 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:780-790 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `ref` to `ModelTransactionRef` in one and `ModelBatchRef` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×7
  • Duplicated block (10 lines × 3) packages/katana_cli/lib/action/app/icon.dart:112 — packages/katana_cli/lib/action/app/icon.dart:112-121 | packages/katana_cli/lib/action/app/local_notification.dart:76-85 | packages/katana_cli/lib/action/firebase/messaging.dart:174-183 — before extracting anything, compare `packages/katana_cli/lib/action/app/icon.dart` and `packages/katana_cli/lib/action/app/local_notification.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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, `packages/katana_cli/lib/action/app/local_notification.dart:73` calls `save` and `packages/katana_cli/lib/action/firebase/messaging.dart:171` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) packages/katana_cli/lib/action/app/location.dart:148 — packages/katana_cli/lib/action/app/location.dart:148-157 | packages/katana_cli/lib/action/app/text_to_speech.dart:53-62 | packages/katana_cli/lib/action/firebase/authentication.dart:643-652 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/app/text_to_speech.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 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 `packages/katana_cli/lib/action/app/location.dart:148` it begins part-way through the construct above it, so those exact lines 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) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:246 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:246-255 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:268-277 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:291-300 — 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 `packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:246` 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, `packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:245` calls `clear` and `packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:267` 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) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:437 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:437-446 | packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:477-486 | packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:509-518 — 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 `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:437` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:203 — packages/masamune_model_d1_builder/lib/src/builder.dart:203-212 | packages/masamune_model_do_builder/lib/src/builder.dart:200-209 | packages/masamune_model_tidb_builder/lib/src/builder.dart:210-219 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:391 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:391-400 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:383-392 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1630-1639 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 272 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:185 — packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:185-194 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:202-211 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:214-223 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
GD1 · Unfinished & placeholder code · Unfinished stub · ×7
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:93 — `convertToMarkdown` is a shipped member whose whole body still throws UnimplementedError — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:93 — `convertToMarkdown` is a shipped member whose whole body still throws UnimplementedError — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:93 — `convertToMarkdown` is a shipped member whose whole body still throws UnimplementedError — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:91 — `convertToMarkdown` is a shipped member whose whole body still throws UnimplementedError — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:93 — `convertToMarkdown` is a shipped member whose whole body still throws UnimplementedError — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/underline_font_markdown_inline_tools.dart:94 — `convertToMarkdown` is a shipped member whose whole body still throws UnimplementedError — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:92 — `convertToMarkdown` is a shipped member whose whole body still throws UnimplementedError — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Unfinished stub · ×7
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:93 — `convertToMarkdown` is a shipped member whose whole body throws UnimplementedError — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:93 — `convertToMarkdown` is a shipped member whose whole body throws UnimplementedError — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:93 — `convertToMarkdown` is a shipped member whose whole body throws UnimplementedError — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:91 — `convertToMarkdown` is a shipped member whose whole body throws UnimplementedError — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:93 — `convertToMarkdown` is a shipped member whose whole body throws UnimplementedError — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/inline/font/underline_font_markdown_inline_tools.dart:94 — `convertToMarkdown` is a shipped member whose whole body throws UnimplementedError — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws UnimplementedError packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:92 — `convertToMarkdown` is a shipped member whose whole body throws UnimplementedError — scaffolding that was never completed. Implement it or remove the dead surface.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×6
  • Edited copy of a member (20 corresponding lines) packages/katana_storage/lib/adapter/local_storage_adapter.dart:48 — packages/katana_storage/lib/adapter/local_storage_adapter.dart:48-68 | packages/katana_storage/lib/adapter/runtime_storage_adapter.dart:90-109 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:80 — packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:80-99 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:106-125 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/katana_model/lib/extension/vector_document_mixin.dart:99 — packages/katana_model/lib/extension/vector_document_mixin.dart:99-121 | packages/katana_model/lib/extension/vector_document_mixin.dart:123-142 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/katana_cli/lib/command/create.dart:3043 — packages/katana_cli/lib/command/create.dart:3043-3066 | packages/katana_cli/lib/command/module.dart:158-177 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/katana_cli/lib/command/code/server/schedule.dart:312 — packages/katana_cli/lib/command/code/server/schedule.dart:312-353 | packages/katana_cli/lib/command/module.dart:290-309 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/katana_indicator/example/lib/main.dart:41 — packages/katana_indicator/example/lib/main.dart:41-60 | packages/katana_shorten/example/lib/main.dart:33-53 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×6
  • Edited copy of a member (9 corresponding lines) packages/katana_form/lib/src/form_media_value.dart:243 — packages/katana_form/lib/src/form_media_value.dart:243-251 | packages/katana_model/lib/src/model_field_value.dart:465-475 — 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) packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:61 — packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:61-69 | packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:71-79 — 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) packages/masamune_markdown/lib/src/markdown_value.dart:819 — packages/masamune_markdown/lib/src/markdown_value.dart:819-827 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:92-101 — 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) packages/katana_form/lib/src/form_media_value.dart:202 — packages/katana_form/lib/src/form_media_value.dart:202-210 | packages/katana_model/lib/src/model_field_value.dart:420-428 — 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) packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:209 — packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:209-217 | packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:99-107 — 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) packages/masamune_model_algolia/lib/adapter/algolia_model_adapter.dart:237 — packages/masamune_model_algolia/lib/adapter/algolia_model_adapter.dart:237-245 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2532-2540 — 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 · Edited copy of a member (15 corresponding lines) · ×6
  • Edited copy of a member (15 corresponding lines) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:347 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:347-361 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:409-424 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/masamune_location_google/lib/src/marker.dart:325 — packages/masamune_location_google/lib/src/marker.dart:325-339 | packages/masamune_location_google/lib/src/marker.dart:341-356 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/masamune_painter/lib/tools/inline/shape/ellipse_shape_painter_inline_tools.dart:44 — packages/masamune_painter/lib/tools/inline/shape/ellipse_shape_painter_inline_tools.dart:44-58 | packages/masamune_painter/lib/tools/inline/shape/rectangle_shape_painter_inline_tools.dart:44-58 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:181 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:181-199 | packages/masamune_painter/lib/value/group_painting_value.dart:204-218 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/katana_cli/lib/command/store/build.dart:19 — packages/katana_cli/lib/command/store/build.dart:19-33 | packages/katana_cli/lib/command/git/submodule.dart:19-33 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/katana_router/example/lib/main.dart:176 — packages/katana_router/example/lib/main.dart:176-190 | packages/katana_router/example/lib/main.dart:217-231 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×6
  • Edited copy of a member (11 corresponding lines) packages/masamune_markdown/lib/src/markdown_value.dart:843 — packages/masamune_markdown/lib/src/markdown_value.dart:843-859 | packages/masamune_markdown/lib/src/markdown_value.dart:1196-1206 — 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) packages/katana_form/lib/src/picker/picker.dart:155 — packages/katana_form/lib/src/picker/picker.dart:155-165 | packages/katana_form/lib/src/picker/picker.dart:167-177 — 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) packages/masamune_agora/lib/src/agora_controller.dart:343 — packages/masamune_agora/lib/src/agora_controller.dart:343-353 | packages/masamune_agora/lib/src/agora_controller.dart:367-377 — 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) packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:96 — packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:96-106 | packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:97-112 — 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) packages/masamune_speech_to_text_google/lib/adapter/google_speech_to_text_masamune_adapter.dart:140 — packages/masamune_speech_to_text_google/lib/adapter/google_speech_to_text_masamune_adapter.dart:140-150 | packages/masamune_speech_to_text_google/lib/adapter/google_speech_to_text_masamune_adapter.dart:152-162 — 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) packages/katana_scoped/lib/value/query.dart:164 — packages/katana_scoped/lib/value/query.dart:164-177 | packages/katana_scoped/lib/value/watch.dart:164-174 — 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 (12 corresponding lines) · ×6
  • Edited copy of a member (12 corresponding lines) packages/katana_form/lib/form/form_list_builder.dart:253 — packages/katana_form/lib/form/form_list_builder.dart:253-264 | packages/katana_form/lib/form/form_list_builder.dart:277-289 — 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) packages/masamune_purchase/lib/actions/android_consumable_purchase_functions_action.dart:58 — packages/masamune_purchase/lib/actions/android_consumable_purchase_functions_action.dart:58-70 | packages/masamune_purchase/lib/actions/android_nonconsumable_purchase_functions_action.dart:53-64 — 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) packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:147 — packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:147-158 | packages/masamune_markdown/lib/tools/inline/font/underline_font_markdown_inline_tools.dart:148-159 — 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) packages/masamune/lib/ui/grid_builder.dart:300 — packages/masamune/lib/ui/grid_builder.dart:300-314 | packages/masamune/lib/ui/list_builder.dart:301-312 — 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) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:83 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:83-94 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:114-125 — 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) packages/katana_cli/lib/action/cloudflare/kv.dart:360 — packages/katana_cli/lib/action/cloudflare/kv.dart:360-371 | packages/katana_cli/lib/action/cloudflare/storage.dart:1070-1081 — 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 · Duplicated block (19 lines × 2) · ×6
  • Duplicated block (19 lines × 2) packages/katana_cli/lib/action/agora/agora.dart:169 — packages/katana_cli/lib/action/agora/agora.dart:169-187 | packages/katana_cli/lib/action/firebase/algolia.dart:86-104 — before extracting anything, compare `packages/katana_cli/lib/action/agora/agora.dart` and `packages/katana_cli/lib/action/firebase/algolia.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/agora/agora.dart:169` 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) packages/katana_cli/lib/action/app/location.dart:174 — packages/katana_cli/lib/action/app/location.dart:174-192 | packages/katana_cli/lib/action/purchase/purchase.dart:196-214 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/purchase/purchase.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/location.dart:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:432 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:432-450 | packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:683-701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:432` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (19 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:581 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:581-599 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:602-620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:581` it begins part-way through the construct above it, so those 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) packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:139 — packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:139-157 | packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:168-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) packages/masamune_universal_ui/lib/src/universal_grid_view.dart:378 — packages/masamune_universal_ui/lib/src/universal_grid_view.dart:378-396 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:408-426 — before extracting anything, compare `packages/masamune_universal_ui/lib/src/universal_grid_view.dart` and `packages/masamune_universal_ui/lib/src/universal_list_view.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (17 lines × 3) · ×6
  • Duplicated block (17 lines × 3) packages/katana_auth/lib/src/others/auth_exporter.dart:109 — packages/katana_auth/lib/src/others/auth_exporter.dart:109-125 | packages/katana_logger/lib/src/others/logger_exporter.dart:112-128 | packages/katana_model_local/lib/src/others/database_exporter.dart:109-125 — before extracting anything, compare `packages/katana_auth/lib/src/others/auth_exporter.dart` and `packages/katana_logger/lib/src/others/logger_exporter.dart` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 3) packages/katana_cli/lib/action/app/deeplink.dart:426 — packages/katana_cli/lib/action/app/deeplink.dart:426-442 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:311-327 | packages/katana_cli/lib/action/stripe/stripe.dart:262-278 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/dynamic_links.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 379 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:426` it begins part-way through the construct above it, so those exact lines 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 × 3) packages/katana_model/lib/src/model_ref.dart:662 — packages/katana_model/lib/src/model_ref.dart:662-678 | packages/katana_model/lib/src/model_ref.dart:861-877 | packages/katana_model/lib/src/model_ref.dart:1073-1089 — 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 `packages/katana_model/lib/src/model_ref.dart:662` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:442 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:442-458 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:450-466 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:434-450 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:442` it begins part-way through the construct above it, so those exact lines 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 × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:84 — packages/masamune_model_d1_builder/lib/src/builder.dart:84-100 | packages/masamune_model_do_builder/lib/src/builder.dart:82-98 | packages/masamune_model_tidb_builder/lib/src/builder.dart:96-112 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1_builder/lib/src/builder.dart:84` it begins part-way through the construct above it, so those exact lines 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 × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:137 — packages/masamune_model_d1_builder/lib/src/builder.dart:137-153 | packages/masamune_model_do_builder/lib/src/builder.dart:134-150 | packages/masamune_model_tidb_builder/lib/src/builder.dart:149-165 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×6
  • Duplicated block (11 lines × 3) packages/katana_cli/lib/action/firebase/authentication.dart:271 — packages/katana_cli/lib/action/firebase/authentication.dart:271-281 | packages/katana_cli/lib/action/firebase/authentication.dart:326-336 | packages/katana_cli/lib/action/firebase/authentication.dart:381-391 — 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 `packages/katana_cli/lib/action/firebase/authentication.dart:271` it begins part-way through the construct above it, so those exact lines 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) packages/katana_model/lib/src/model_ref.dart:689 — packages/katana_model/lib/src/model_ref.dart:689-699 | packages/katana_model/lib/src/model_ref.dart:894-904 | packages/katana_model/lib/src/model_ref.dart:1108-1118 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_model/lib/src/model_ref.dart:905` calls `add` and `packages/katana_model/lib/src/model_ref.dart:700` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:408 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:408-418 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:416-426 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:400-410 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:408` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:57 — packages/masamune_model_d1_builder/lib/src/builder.dart:57-67 | packages/masamune_model_do_builder/lib/src/builder.dart:56-66 | packages/masamune_model_tidb_builder/lib/src/builder.dart:56-66 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/masamune_model_d1_builder/lib/src/builder.dart:56` calls `_readVectors`, `read` and `packages/masamune_model_do_builder/lib/src/builder.dart:55` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 3) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:105 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:105-115 | packages/masamune_painter/lib/value/group_painting_value.dart:106-116 | packages/masamune_painter/lib/value/group_painting_value.dart:135-145 — before extracting anything, compare `packages/masamune_painter/lib/value/clipping_group_painting_value.dart` and `packages/masamune_painter/lib/value/group_painting_value.dart` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (11 lines × 3) packages/katana_model/lib/adapter/runtime_model_adapter.dart:308 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:308-318 | packages/katana_model/lib/adapter/runtime_model_adapter.dart:359-369 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:286-296 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (6 members, 50+ identical tokens) packages/katana_cli/lib/command/code/view/fixedform.dart:109 — packages/katana_cli/lib/command/code/view/fixedform.dart:109-209 | packages/katana_cli/lib/command/code/view/fixedform_add.dart:97-155 | packages/katana_cli/lib/command/code/view/fixedform_edit.dart:97-156 | packages/katana_cli/lib/command/code/view/listform.dart:120-220 | packages/katana_cli/lib/command/code/view/listform_add.dart:108-166 | packages/katana_cli/lib/command/code/view/listform_edit.dart:108-167 — 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) packages/katana_form/lib/form/form_date_field.dart:956 — packages/katana_form/lib/form/form_date_field.dart:956-968 | packages/katana_form/lib/form/form_duration_field.dart:914-926 | packages/katana_form/lib/form/form_enum_modal_field.dart:808-820 | packages/katana_form/lib/form/form_map_modal_field.dart:739-751 | packages/katana_form/lib/form/form_month_modal_field.dart:789-801 | packages/katana_form/lib/form/form_num_modal_field.dart:730-742 — 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) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:16 — packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:16-107 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:16-107 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:16-107 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:16-33 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:16-33 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:16-33 — 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) packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:160 — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:160-174 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:160-174 | packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:206-222 | packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart:181-197 | packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:155-174 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:161-180 — 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) packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart:71 — packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart:71-81 | packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:173-183 | packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart:158-168 | packages/masamune_painter/lib/tools/inline/property/group_property_painter_inline_tools.dart:70-80 | packages/masamune_painter/lib/tools/inline/property/line_property_painter_inline_tools.dart:121-131 | packages/masamune_painter/lib/tools/inline/property/paragraph_align_property_painter_inline_tools.dart:163-173 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/masamune_model_d1_builder/lib/src/builder.dart:246 — packages/masamune_model_d1_builder/lib/src/builder.dart:246-255 | packages/masamune_model_do_builder/lib/src/builder.dart:233-242 | packages/masamune_model_tidb_builder/lib/src/builder.dart:243-255 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:571 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:571-580 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:581-591 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:533-542 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/katana_router/lib/src/app_router.dart:546 — packages/katana_router/lib/src/app_router.dart:546-555 | packages/katana_router/lib/src/app_router.dart:557-566 | packages/katana_router/lib/src/app_router.dart:575-584 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/katana_cli/lib/src/xcode.dart:1283 — packages/katana_cli/lib/src/xcode.dart:1283-1292 | packages/katana_cli/lib/src/xcode.dart:1434-1444 | packages/katana_cli/lib/src/xcode.dart:1885-1895 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/masamune_purchase_stripe/lib/actions/stripe_action_authorization.dart:75 — packages/masamune_purchase_stripe/lib/actions/stripe_action_authorization.dart:75-85 | packages/masamune_purchase_stripe/lib/actions/stripe_action_confirm_purchase.dart:69-79 | packages/masamune_purchase_stripe/lib/actions/stripe_action_create_customer_and_payment.dart:44-53 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×5
  • Duplicated block (35 lines × 2) packages/katana_cli/lib/command/code/collection.dart:95 — packages/katana_cli/lib/command/code/collection.dart:95-129 | packages/katana_cli/lib/command/code/document.dart:99-133 — before extracting anything, compare `packages/katana_cli/lib/command/code/collection.dart` and `packages/katana_cli/lib/command/code/document.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/command/code/collection.dart:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/command/code/collection.dart:136` calls `ModelCollectionQuery` and `packages/katana_cli/lib/command/code/document.dart:136` 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.
  • Duplicated block (35 lines × 2) packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:158 — packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:158-192 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:193-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (35 lines × 2) packages/katana_cli/lib/command/code/view/fixedform.dart:111 — packages/katana_cli/lib/command/code/view/fixedform.dart:111-145 | packages/katana_cli/lib/command/code/view/listform.dart:122-156 — before extracting anything, compare `packages/katana_cli/lib/command/code/view/fixedform.dart` and `packages/katana_cli/lib/command/code/view/listform.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 146 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 `packages/katana_cli/lib/command/code/view/fixedform.dart: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 (35 lines × 2) packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:172 — packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:172-206 | packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:175-209 — before extracting anything, compare `packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart` and `packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (35 lines × 2) packages/masamune_markdown/lib/tools/primary/add_markdown_primary_tools.dart:47 — packages/masamune_markdown/lib/tools/primary/add_markdown_primary_tools.dart:47-81 | packages/masamune_markdown/lib/tools/primary/exchange_markdown_primary_tools.dart:43-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×5
  • Duplicated block (24 lines × 2) packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:391 — packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:391-414 | packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:441-464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:391` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) packages/masamune_location_background/lib/src/others/background_location_repository.dart:32 — packages/masamune_location_background/lib/src/others/background_location_repository.dart:32-55 | packages/masamune_location_background/lib/src/others/background_location_repository.dart:126-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24 lines × 2) packages/masamune_model_d1_builder/lib/src/builder.dart:259 — packages/masamune_model_d1_builder/lib/src/builder.dart:259-282 | packages/masamune_model_tidb_builder/lib/src/builder.dart:259-282 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_tidb_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 216 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1_builder/lib/src/builder.dart:259` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) packages/masamune_model_firestore_builder/lib/src/builder.dart:147 — packages/masamune_model_firestore_builder/lib/src/builder.dart:147-170 | packages/masamune_model_firestore_builder/lib/src/builder.dart:177-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_firestore_builder/lib/src/builder.dart:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) packages/katana_cli/lib/command/pub/version.dart:33 — packages/katana_cli/lib/command/pub/version.dart:33-56 | packages/katana_cli/lib/command/pub/version.dart:82-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/pub/version.dart:33` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×5
  • Duplicated block (20 lines × 2) packages/katana_cli/lib/action/cloudflare/kv.dart:206 — packages/katana_cli/lib/action/cloudflare/kv.dart:206-225 | packages/katana_cli/lib/action/cloudflare/storage.dart:696-715 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:35 — packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:35-54 | packages/katana_localization_builder/lib/generator/yaml_localize_generator.dart:33-52 — 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 `packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) packages/masamune_location_background/lib/src/others/background_location_repository.dart:57 — packages/masamune_location_background/lib/src/others/background_location_repository.dart:57-76 | packages/masamune_location_background/lib/src/others/background_location_repository.dart:151-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:82 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:82-101 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:103-122 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) packages/masamune_universal_ui/lib/src/universal_column.dart:433 — packages/masamune_universal_ui/lib/src/universal_column.dart:433-452 | packages/masamune_universal_ui/lib/src/universal_container.dart:325-344 — before extracting anything, compare `packages/masamune_universal_ui/lib/src/universal_column.dart` and `packages/masamune_universal_ui/lib/src/universal_container.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×5
  • Duplicated block (14 lines × 4) packages/katana_cli/lib/action/firebase/init.dart:783 — packages/katana_cli/lib/action/firebase/init.dart:783-796 | packages/katana_cli/lib/action/firebase/init.dart:890-903 | packages/katana_cli/lib/action/firebase/init.dart:1019-1032 | packages/katana_cli/lib/action/firebase/init.dart:1103-1116 — 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 `packages/katana_cli/lib/action/firebase/init.dart:783` 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 × 4) packages/katana_model/lib/adapter/runtime_model_adapter.dart:204 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:204-217 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:721-734 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:649-662 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:202-215 — before extracting anything, compare `packages/katana_model/lib/adapter/runtime_model_adapter.dart` and `packages/katana_model_local/lib/adapter/local_model_adapter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/adapter/runtime_model_adapter.dart:204` it begins part-way through the construct above it, so those 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, `packages/katana_model/lib/adapter/runtime_model_adapter.dart:219` calls `delayed` and `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:735` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 4) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:122 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:122-135 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:310-323 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:166-179 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:274-287 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 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 `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:122` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 4) packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart:71 — packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart:71-84 | packages/masamune_painter/lib/tools/block/text/paragraph_align_justify_text_painter_block_tools.dart:71-84 | packages/masamune_painter/lib/tools/block/text/paragraph_align_left_text_painter_block_tools.dart:71-84 | packages/masamune_painter/lib/tools/block/text/paragraph_align_right_text_painter_block_tools.dart:71-84 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/text/paragraph_align_justify_text_painter_block_tools.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:460 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:460-473 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:468-481 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:452-465 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1805-1818 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:460` it does not close everything it opens, so those 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 (13 lines × 4) · ×5
  • Duplicated block (13 lines × 4) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:16 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:16-28 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:15-27 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:15-27 | packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:31-43 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 4) packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:100 — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:100-112 | packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:129-141 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:100-112 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:129-141 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:100` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 4) packages/masamune_model_d1/lib/src/d1_model_path.dart:38 — packages/masamune_model_d1/lib/src/d1_model_path.dart:38-50 | packages/masamune_model_do/lib/src/do_model_path.dart:40-52 | packages/masamune_model_tidb/lib/src/tidb_model_path.dart:38-50 | packages/masamune_model_turso/lib/src/turso_model_path.dart:39-51 — before extracting anything, compare `packages/masamune_model_d1/lib/src/d1_model_path.dart` and `packages/masamune_model_do/lib/src/do_model_path.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/src/d1_model_path.dart:38` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 4) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:191 — packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:191-203 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:251-263 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:383-395 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:443-455 — 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 `packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart: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 (13 lines × 4) packages/katana_auth/example/lib/main.dart:20 — packages/katana_auth/example/lib/main.dart:20-32 | packages/katana_functions/example/lib/main.dart:69-81 | packages/katana_model/example/lib/main.dart:54-66 | packages/katana_storage/example/lib/main.dart:19-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, 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) · ×5
  • Duplicated block (9 lines × 8) packages/katana_cli/lib/action/app/csr.dart:102 — packages/katana_cli/lib/action/app/csr.dart:102-110 | packages/katana_cli/lib/action/app/keystore.dart:369-377 | packages/katana_cli/lib/action/app/p12.dart:113-121 | packages/katana_cli/lib/command/create.dart:481-489 | packages/katana_cli/lib/command/create.dart:497-505 | packages/katana_cli/lib/command/create.dart:934-942 | packages/katana_cli/lib/command/create.dart:950-958 | packages/katana_cli/lib/command/create.dart:1123-1131 — before extracting anything, compare `packages/katana_cli/lib/action/app/csr.dart` and `packages/katana_cli/lib/action/app/keystore.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/csr.dart:101` calls `getAsMap`, `get` and `packages/katana_cli/lib/command/create.dart:1122` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 8) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:126 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:126-135 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:182-190 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:125-133 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:125-133 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:125-133 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:121-129 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:136-144 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:151-160 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_code_block_value.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:126` it begins part-way through the construct above it, so those exact lines 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 × 8) packages/katana_form/lib/form/form_date_field.dart:900 — packages/katana_form/lib/form/form_date_field.dart:900-908 | packages/katana_form/lib/form/form_date_time_field.dart:846-854 | packages/katana_form/lib/form/form_date_time_range_field.dart:823-831 | packages/katana_form/lib/form/form_duration_field.dart:850-858 | packages/katana_form/lib/form/form_enum_modal_field.dart:775-783 | packages/katana_form/lib/form/form_map_modal_field.dart:711-719 | packages/katana_form/lib/form/form_month_modal_field.dart:734-742 | packages/katana_form/lib/form/form_num_modal_field.dart:690-698 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 8) packages/katana_form/lib/form/form_date_field.dart:970 — packages/katana_form/lib/form/form_date_field.dart:970-978 | packages/katana_form/lib/form/form_date_time_field.dart:894-902 | packages/katana_form/lib/form/form_date_time_range_field.dart:874-882 | packages/katana_form/lib/form/form_duration_field.dart:928-936 | packages/katana_form/lib/form/form_enum_modal_field.dart:822-830 | packages/katana_form/lib/form/form_map_modal_field.dart:753-761 | packages/katana_form/lib/form/form_month_modal_field.dart:803-811 | packages/katana_form/lib/form/form_num_modal_field.dart:744-752 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 8) packages/katana_form/lib/form/form_date_field.dart:989 — packages/katana_form/lib/form/form_date_field.dart:989-997 | packages/katana_form/lib/form/form_date_time_field.dart:913-921 | packages/katana_form/lib/form/form_date_time_range_field.dart:893-901 | packages/katana_form/lib/form/form_duration_field.dart:947-955 | packages/katana_form/lib/form/form_enum_modal_field.dart:841-849 | packages/katana_form/lib/form/form_map_modal_field.dart:772-780 | packages/katana_form/lib/form/form_month_modal_field.dart:822-830 | packages/katana_form/lib/form/form_num_modal_field.dart:763-771 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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 (6 lines × 3) · ×5
  • Duplicated block (6 lines × 3) packages/katana_cli/lib/command/create.dart:1040 — packages/katana_cli/lib/command/create.dart:1040-1046 | packages/katana_cli/lib/command/module.dart:22-28 | packages/katana_cli/lib/command/pub/add.dart:18-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/create.dart:1040` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 3) packages/katana_form/lib/form/form_date_field.dart:943 — packages/katana_form/lib/form/form_date_field.dart:943-948 | packages/katana_form/lib/form/form_duration_field.dart:894-899 | packages/katana_form/lib/form/form_month_modal_field.dart:776-781 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_duration_field.dart` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_form/lib/form/form_date_field.dart:942` calls `now` and `packages/katana_form/lib/form/form_duration_field.dart:893` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) packages/katana_cli/lib/command/code/generate.dart:19 — packages/katana_cli/lib/command/code/generate.dart:19-24 | packages/katana_cli/lib/command/create.dart:142-147 | packages/katana_cli/lib/command/create.dart:581-586 — 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 `packages/katana_cli/lib/command/code/generate.dart:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) packages/katana_form/lib/form/form_date_field.dart:893 — packages/katana_form/lib/form/form_date_field.dart:893-898 | packages/katana_form/lib/form/form_date_time_field.dart:839-844 | packages/katana_form/lib/form/form_month_modal_field.dart:727-732 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:25 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:25-30 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:25-30 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:25-30 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X3 · Exception handling · Swallowed exception (empty catch) · ×5
  • Swallowed exception (empty catch) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1968 — 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) packages/masamune_animate/lib/src/animate_controller.dart:175 — 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) packages/masamune_ai/lib/src/ai_content.dart:458 — 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) packages/katana/lib/src/functions.dart:123 — 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) packages/katana/lib/src/functions.dart:141 — 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.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×4
  • Edited copy of a member (22 corresponding lines) packages/katana_cli/lib/action/firebase/deploy.dart:21 — packages/katana_cli/lib/action/firebase/deploy.dart:21-43 | packages/katana_cli/lib/action/firebase/init.dart:333-365 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/katana_model/lib/adapter/rest_api_model_adapter.dart:501 — packages/katana_model/lib/adapter/rest_api_model_adapter.dart:501-522 | packages/katana_model/lib/adapter/rest_api_model_adapter.dart:652-673 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/katana_form/lib/form/form_date_field.dart:932 — packages/katana_form/lib/form/form_date_field.dart:932-954 | packages/katana_form/lib/form/form_month_modal_field.dart:766-787 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/katana_cli/lib/src/android_signing.dart:107 — packages/katana_cli/lib/src/android_signing.dart:107-129 | packages/katana_cli/lib/src/android_signing.dart:131-152 — 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 (29 corresponding lines) · ×4
  • Edited copy of a member (29 corresponding lines) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:422 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:422-450 | packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:667-701 — 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) packages/katana_cli/lib/command/code/exception.dart:31 — packages/katana_cli/lib/command/code/exception.dart:31-59 | packages/katana_cli/lib/command/code/log.dart:31-59 — 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) packages/masamune_lints/lib/buttons/masamune_button_add_icon.dart:19 — packages/masamune_lints/lib/buttons/masamune_button_add_icon.dart:19-61 | packages/masamune_lints/lib/buttons/masamune_button_remove_icon.dart:19-47 — 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) packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:168 — packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:168-203 | packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:205-233 — 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 (21 corresponding lines) · ×4
  • Edited copy of a member (21 corresponding lines) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:886 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:886-907 | packages/masamune_model_algolia/lib/adapter/algolia_model_adapter.dart:317-337 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/masamune_painter/lib/tools/inline/property/layer_backward_property_painter_inline_tools.dart:51 — packages/masamune_painter/lib/tools/inline/property/layer_backward_property_painter_inline_tools.dart:51-71 | packages/masamune_painter/lib/tools/inline/property/layer_forward_property_painter_inline_tools.dart:50-70 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/katana_scoped/lib/src/scoped_value_listener.dart:64 — packages/katana_scoped/lib/src/scoped_value_listener.dart:64-84 | packages/katana_scoped/lib/src/scoped_value_listener.dart:96-116 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/katana_theme/lib/src/app_theme_data.dart:3738 — packages/katana_theme/lib/src/app_theme_data.dart:3738-3758 | packages/katana_theme/lib/src/app_theme_data.dart:3794-3814 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) packages/masamune_purchase/lib/actions/ios_consumable_purchase_functions_action.dart:67 — packages/masamune_purchase/lib/actions/ios_consumable_purchase_functions_action.dart:67-84 | packages/masamune_purchase/lib/actions/ios_nonconsumable_purchase_functions_action.dart:61-77 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/katana_theme/lib/src/text_provider.dart:93 — packages/katana_theme/lib/src/text_provider.dart:93-109 | packages/katana_theme/lib/src/text_provider.dart:158-179 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/masamune_model_algolia/lib/adapter/algolia_model_adapter.dart:155 — packages/masamune_model_algolia/lib/adapter/algolia_model_adapter.dart:155-171 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2458-2474 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/katana_model/lib/src/document_base.dart:594 — packages/katana_model/lib/src/document_base.dart:594-610 | packages/masamune_experiment/lib/src/experiment.dart:146-163 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 8+ corresponding lines) packages/katana_cli/lib/action/firebase/algolia.dart:21 — packages/katana_cli/lib/action/firebase/algolia.dart:21-30 | packages/katana_cli/lib/action/firebase/firestore.dart:21-28 | packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:46-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) packages/katana_model/lib/adapter/runtime_model_adapter.dart:244 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:244-251 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:231-239 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:241-253 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) packages/masamune_model_d1/lib/actions/d1_put_model_functions_action.dart:73 — packages/masamune_model_d1/lib/actions/d1_put_model_functions_action.dart:73-80 | packages/masamune_model_do/lib/actions/do_put_model_functions_action.dart:73-80 | packages/masamune_model_tidb/lib/actions/tidb_put_model_functions_action.dart:72-79 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) packages/masamune_model_turso/lib/actions/turso_delete_model_functions_action.dart:71 — packages/masamune_model_turso/lib/actions/turso_delete_model_functions_action.dart:71-78 | packages/masamune_model_turso/lib/actions/turso_post_model_functions_action.dart:71-78 | packages/masamune_model_turso/lib/actions/turso_put_model_functions_action.dart:77-85 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×4
  • Edited copy of a member (7 corresponding lines) packages/katana_form/lib/form/form_duration_field.dart:874 — packages/katana_form/lib/form/form_duration_field.dart:874-880 | packages/katana_form/lib/form/form_num_modal_field.dart:714-720 — 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) packages/masamune_deeplink/lib/adapter/deeplink_masamune_adapter.dart:65 — packages/masamune_deeplink/lib/adapter/deeplink_masamune_adapter.dart:65-71 | packages/masamune_notification/lib/src/local_notification_masamune_adapter.dart:169-175 — 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) packages/masamune_purchase/lib/src/purchase_masamune_adapter.dart:101 — packages/masamune_purchase/lib/src/purchase_masamune_adapter.dart:101-107 | packages/masamune_text_to_speech/lib/adapter/text_to_speech_masamune_adapter.dart:109-115 — 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) packages/masamune_ai/lib/adapter/runtime_ai_masamune_adapter.dart:47 — packages/masamune_ai/lib/adapter/runtime_ai_masamune_adapter.dart:47-53 | packages/masamune_ai_openai/lib/adapter/openai_ai_masamune_adapter.dart:39-46 — 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 (29 lines × 2) · ×4
  • Duplicated block (29 lines × 2) packages/katana_cli/lib/src/cloudflare_environment.dart:557 — packages/katana_cli/lib/src/cloudflare_environment.dart:557-585 | packages/katana_cli/lib/src/cloudflare_environment.dart:588-616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (29 lines × 2) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:894 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:894-922 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:776-804 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (29 lines × 2) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:947 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:947-975 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2062-2090 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_universal_ui/lib/src/universal_app_bar.dart:947` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) packages/katana_cli/lib/command/code/view/fixedform.dart:211 — packages/katana_cli/lib/command/code/view/fixedform.dart:211-239 | packages/katana_cli/lib/command/code/view/listform.dart:222-250 — before extracting anything, compare `packages/katana_cli/lib/command/code/view/fixedform.dart` and `packages/katana_cli/lib/command/code/view/listform.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×4
  • Duplicated block (13–14 lines × 2) packages/katana_cli/lib/command/git/commit.dart:28 — packages/katana_cli/lib/command/git/commit.dart:28-40 | packages/katana_cli/lib/command/git/pull_request_comment.dart:54-67 — before extracting anything, compare `packages/katana_cli/lib/command/git/commit.dart` and `packages/katana_cli/lib/command/git/pull_request_comment.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13–14 lines × 2) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:34 — packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:34-46 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:20-33 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13–14 lines × 2) packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:34 — packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:34-46 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:20-33 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13–14 lines × 2) packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:34 — packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:34-46 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:20-33 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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 lines × 4) · ×4
  • Duplicated block (9 lines × 4) packages/katana_cli/lib/action/firebase/init.dart:829 — packages/katana_cli/lib/action/firebase/init.dart:829-839 | packages/katana_cli/lib/action/firebase/init.dart:906-914 | packages/katana_cli/lib/action/firebase/init.dart:1034-1044 | packages/katana_cli/lib/action/firebase/init.dart:1118-1128 — 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 `packages/katana_cli/lib/action/firebase/init.dart:829` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:55 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:55-63 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:88-96 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:87-95 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:89-97 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:55` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 4) packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:160 — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:160-168 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:160-168 | packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:155-163 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:161-169 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:125 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:125-133 | packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:60-68 | packages/masamune_painter/lib/value/group_painting_value.dart:118-126 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:60-68 — before extracting anything, compare `packages/masamune_painter/lib/value/clipping_group_painting_value.dart` and `packages/masamune_painter/lib/value/group_painting_value.dart` as WHOLE FILES: this scan already matched 6 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 `packages/masamune_painter/lib/value/clipping_group_painting_value.dart:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×4
  • Duplicated block (8 lines × 4) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:82 — packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:82-89 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:58-65 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:82-89 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:82-89 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:82` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 4) packages/masamune_model_d1_builder/lib/src/builder.dart:62 — packages/masamune_model_d1_builder/lib/src/builder.dart:62-69 | packages/masamune_model_do_builder/lib/src/builder.dart:61-68 | packages/masamune_model_tidb_builder/lib/src/builder.dart:68-75 | packages/masamune_model_tidb_builder/lib/src/builder.dart:90-97 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1_builder/lib/src/builder.dart:62` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 4) packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart:37 — packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart:37-44 | packages/masamune_painter/lib/tools/block/text/paragraph_align_justify_text_painter_block_tools.dart:37-44 | packages/masamune_painter/lib/tools/block/text/paragraph_align_left_text_painter_block_tools.dart:37-44 | packages/masamune_painter/lib/tools/block/text/paragraph_align_right_text_painter_block_tools.dart:37-44 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/text/paragraph_align_justify_text_painter_block_tools.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) packages/masamune_painter/lib/tools/inline/shape/ellipse_shape_painter_inline_tools.dart:97 — packages/masamune_painter/lib/tools/inline/shape/ellipse_shape_painter_inline_tools.dart:97-104 | packages/masamune_painter/lib/tools/inline/shape/rectangle_shape_painter_inline_tools.dart:97-104 | packages/masamune_painter/lib/tools/primary/media_painter_primary_tools.dart:93-100 | packages/masamune_painter/lib/tools/primary/text_painter_primary_tools.dart:92-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×4
  • Duplicated block (7 lines × 4) packages/katana_cli/lib/action/cloudflare/init.dart:174 — packages/katana_cli/lib/action/cloudflare/init.dart:174-180 | packages/katana_cli/lib/action/firebase/init.dart:1393-1399 | packages/katana_cli/lib/command/create.dart:490-496 | packages/katana_cli/lib/command/create.dart:943-949 — before extracting anything, compare `packages/katana_cli/lib/action/firebase/init.dart` and `packages/katana_cli/lib/command/create.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) packages/katana_cli/lib/action/firebase/dynamic_links.dart:24 — packages/katana_cli/lib/action/firebase/dynamic_links.dart:24-31 | packages/katana_cli/lib/action/firebase/messaging.dart:85-91 | packages/katana_cli/lib/action/firebase/scheduler.dart:22-28 | packages/katana_cli/lib/action/firebase/workflow.dart:19-25 — before extracting anything, compare `packages/katana_cli/lib/action/firebase/dynamic_links.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 4) packages/masamune_purchase/lib/actions/android_consumable_purchase_functions_action.dart:72 — packages/masamune_purchase/lib/actions/android_consumable_purchase_functions_action.dart:72-78 | packages/masamune_purchase/lib/actions/android_nonconsumable_purchase_functions_action.dart:66-72 | packages/masamune_purchase/lib/actions/ios_consumable_purchase_functions_action.dart:86-92 | packages/masamune_purchase/lib/actions/ios_nonconsumable_purchase_functions_action.dart:79-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:349 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:349-355 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:357-363 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:340-346 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1284-1290 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×4
  • Duplicated block (5 lines × 4) packages/katana_cli/lib/action/cloudflare/init.dart:65 — packages/katana_cli/lib/action/cloudflare/init.dart:65-69 | packages/katana_cli/lib/action/cloudflare/short_link.dart:33-37 | packages/katana_cli/lib/command/git/pull_request.dart:22-26 | packages/katana_cli/lib/command/git/pull_request_comment.dart:23-27 — before extracting anything, compare `packages/katana_cli/lib/command/git/pull_request.dart` and `packages/katana_cli/lib/command/git/pull_request_comment.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/cloudflare/init.dart:63` calls `validateLocal` and `packages/katana_cli/lib/command/git/pull_request.dart:21` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 4) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1343 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1343-1347 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1902-1906 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2250-2254 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2412-2416 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1348` calls `split` and `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1907` 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 × 4) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:163 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:163-167 | packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:95-99 | packages/masamune_painter/lib/value/group_painting_value.dart:177-181 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:95-99 — before extracting anything, compare `packages/masamune_painter/lib/value/clipping_group_painting_value.dart` and `packages/masamune_painter/lib/value/group_painting_value.dart` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (5 lines × 4) packages/masamune_model_cloudflare_kv/lib/adapter/cloudflare_kv_model_adapter.dart:161 — packages/masamune_model_cloudflare_kv/lib/adapter/cloudflare_kv_model_adapter.dart:161-165 | packages/masamune_model_firebase_data_connect/lib/adapter/firebase_data_connect_model_adapter.dart:386-390 | packages/masamune_model_firebase_remote_config/lib/adapter/firebase_remote_config_model_adapter.dart:321-325 | packages/masamune_model_functions/lib/adapter/functions_model_adapter.dart:232-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `ref` to `ModelTransactionRef` in one and `ModelBatchRef` 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 (6 lines × 8) · ×4
  • Duplicated block (6 lines × 8) packages/katana_form/lib/form/form_date_field.dart:489 — packages/katana_form/lib/form/form_date_field.dart:489-494 | packages/katana_form/lib/form/form_date_time_field.dart:433-438 | packages/katana_form/lib/form/form_date_time_range_field.dart:412-417 | packages/katana_form/lib/form/form_duration_field.dart:441-446 | packages/katana_form/lib/form/form_enum_modal_field.dart:375-380 | packages/katana_form/lib/form/form_map_modal_field.dart:313-318 | packages/katana_form/lib/form/form_month_modal_field.dart:323-328 | packages/katana_form/lib/form/form_num_modal_field.dart:293-298 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 8) packages/katana_form/lib/form/form_date_field.dart:496 — packages/katana_form/lib/form/form_date_field.dart:496-501 | packages/katana_form/lib/form/form_date_time_field.dart:440-445 | packages/katana_form/lib/form/form_date_time_range_field.dart:419-424 | packages/katana_form/lib/form/form_duration_field.dart:448-453 | packages/katana_form/lib/form/form_enum_modal_field.dart:382-387 | packages/katana_form/lib/form/form_map_modal_field.dart:320-325 | packages/katana_form/lib/form/form_month_modal_field.dart:330-335 | packages/katana_form/lib/form/form_num_modal_field.dart:300-305 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 8) packages/katana_form/lib/form/form_date_field.dart:503 — packages/katana_form/lib/form/form_date_field.dart:503-508 | packages/katana_form/lib/form/form_date_time_field.dart:447-452 | packages/katana_form/lib/form/form_date_time_range_field.dart:426-431 | packages/katana_form/lib/form/form_duration_field.dart:455-460 | packages/katana_form/lib/form/form_enum_modal_field.dart:389-394 | packages/katana_form/lib/form/form_map_modal_field.dart:327-332 | packages/katana_form/lib/form/form_month_modal_field.dart:337-342 | packages/katana_form/lib/form/form_num_modal_field.dart:307-312 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 8) packages/katana_form/lib/form/form_date_field.dart:910 — packages/katana_form/lib/form/form_date_field.dart:910-915 | packages/katana_form/lib/form/form_date_time_field.dart:856-861 | packages/katana_form/lib/form/form_date_time_range_field.dart:833-838 | packages/katana_form/lib/form/form_duration_field.dart:860-865 | packages/katana_form/lib/form/form_enum_modal_field.dart:785-790 | packages/katana_form/lib/form/form_map_modal_field.dart:721-726 | packages/katana_form/lib/form/form_month_modal_field.dart:744-749 | packages/katana_form/lib/form/form_num_modal_field.dart:700-705 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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.
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×4
  • Redirected process stream is never drained (deadlock) packages/katana_cli/lib/action/app/csr.dart:65 — `Process.start` always pipes both `stdout` and `stderr`, and here `process.stdout` is read while the child's end is awaited — but nothing in this scope ever reads `process.stderr`. Dart reads a process stream only while something listens to it, and the API's own documentation says every byte of both must be read: once the child writes more than the pipe holds to stderr (measured with Dart 3.12 on Linux: 60 KB hangs every time, and less on a box short of pipe pages), it blocks on the write, never exits, and the `exitCode` or end of stream this code awaits never comes. Nothing fails loudly: the future never completes and the stuck child holds its resources until something kills it. Consume both streams (`process.stderr.drain<void>()` to discard it, or listen to it), use `Process.run`, which collects both, or start it with `mode: ProcessStartMode.inheritStdio` when the output is not wanted.
  • Redirected process stream is never drained (deadlock) packages/katana_cli/lib/action/app/keystore.dart:227 — `Process.start` always pipes both `stdout` and `stderr`, and here `keytoolResult.stdout` is read while the child's end is awaited — but nothing in this scope ever reads `keytoolResult.stderr`. Dart reads a process stream only while something listens to it, and the API's own documentation says every byte of both must be read: once the child writes more than the pipe holds to stderr (measured with Dart 3.12 on Linux: 60 KB hangs every time, and less on a box short of pipe pages), it blocks on the write, never exits, and the `exitCode` or end of stream this code awaits never comes. Nothing fails loudly: the future never completes and the stuck child holds its resources until something kills it. Consume both streams (`keytoolResult.stderr.drain<void>()` to discard it, or listen to it), use `Process.run`, which collects both, or start it with `mode: ProcessStartMode.inheritStdio` when the output is not wanted.
  • Redirected process stream is never drained (deadlock) packages/katana_cli/lib/action/app/keystore.dart:237 — `Process.start` always pipes both `stdout` and `stderr`, and here `openSslSha1Restul.stdout` is read while the child's end is awaited — but nothing in this scope ever reads `openSslSha1Restul.stderr`. Dart reads a process stream only while something listens to it, and the API's own documentation says every byte of both must be read: once the child writes more than the pipe holds to stderr (measured with Dart 3.12 on Linux: 60 KB hangs every time, and less on a box short of pipe pages), it blocks on the write, never exits, and the `exitCode` or end of stream this code awaits never comes. Nothing fails loudly: the future never completes and the stuck child holds its resources until something kills it. Consume both streams (`openSslSha1Restul.stderr.drain<void>()` to discard it, or listen to it), use `Process.run`, which collects both, or start it with `mode: ProcessStartMode.inheritStdio` when the output is not wanted.
  • Redirected process stream is never drained (deadlock) packages/katana_cli/lib/action/app/keystore.dart:244 — `Process.start` always pipes both `stdout` and `stderr`, and here `openSslBase64Result.stdout` is read while the child's end is awaited — but nothing in this scope ever reads `openSslBase64Result.stderr`. Dart reads a process stream only while something listens to it, and the API's own documentation says every byte of both must be read: once the child writes more than the pipe holds to stderr (measured with Dart 3.12 on Linux: 60 KB hangs every time, and less on a box short of pipe pages), it blocks on the write, never exits, and the `exitCode` or end of stream this code awaits never comes. Nothing fails loudly: the future never completes and the stuck child holds its resources until something kills it. Consume both streams (`openSslBase64Result.stderr.drain<void>()` to discard it, or listen to it), use `Process.run`, which collects both, or start it with `mode: ProcessStartMode.inheritStdio` when the output is not wanted.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×4
  • Recursive walk over a caller-supplied document has no depth cap packages/masamune_model_firebase_data_connect/lib/adapter/firebase_data_connect_model_adapter.dart:270 — `filterAnyValue` is public and takes `dynamic value` from its caller, and it calls itself at line 270 (`filterAnyValue`) with a piece of `value` (and at line 272) — and nowhere in `filterAnyValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `filterAnyValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap packages/katana_theme_builder/lib/value/asset_node.dart:53 — `parse` is public and takes `Map<String, dynamic> values` from its caller, and it calls itself at line 53 (`parse`) with a piece of `values` — and nowhere in `parse` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `parse` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap packages/katana_cli/lib/src/environment.dart:96 — `expandEnvironmentVariables` is public, takes a document from its caller (line 57) and hands it to `_expand`, which calls itself at line 96 (`_expand`) with a piece of `object` (and at line 99) — and nowhere in `_expand` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `_expand` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap packages/katana_cli/lib/src/framework.dart:696 — `modifize` is public and takes `dynamic object` from its caller, and it calls itself at line 696 (`modifize`) with a piece of `object` (and at line 702) — and nowhere in `modifize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `modifize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X2 · Cancellation propagation · Async function without AbortSignal · ×4
  • Async function without AbortSignal: fetchAccessToken packages/masamune_handover/tools/apple_user_migration/1_export_transfer_sub.ts:52 — `fetchAccessToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchTransferSub packages/masamune_handover/tools/apple_user_migration/1_export_transfer_sub.ts:72 — `fetchTransferSub` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchAccessToken packages/masamune_handover/tools/apple_user_migration/2_exchange_and_update.ts:53 — `fetchAccessToken` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: exchangeTransferSub packages/masamune_handover/tools/apple_user_migration/2_exchange_and_update.ts:72 — `exchangeTransferSub` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (9 members, 50+ identical tokens) packages/katana_cli/lib/action/app/att.dart:28 — packages/katana_cli/lib/action/app/att.dart:28-54 | packages/katana_cli/lib/action/app/csr.dart:31-139 | packages/katana_cli/lib/action/app/icon.dart:89-228 | packages/katana_cli/lib/action/app/info.dart:35-71 | packages/katana_cli/lib/action/app/keystore.dart:32-259 | packages/katana_cli/lib/action/app/local_notification.dart:36-284 | packages/katana_cli/lib/action/app/picker.dart:27-79 | packages/katana_cli/lib/action/app/privacy_manifests.dart:27-58 | packages/katana_cli/lib/action/app/spread_sheet.dart:64-145 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) packages/katana_form/lib/form/form_builder.dart:335 — packages/katana_form/lib/form/form_builder.dart:335-346 | packages/katana_form/lib/form/form_checkbox.dart:465-476 | packages/katana_form/lib/form/form_chips_field.dart:440-455 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:320-331 | packages/katana_form/lib/form/form_map_dropdown_field.dart:247-258 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:347-363 | packages/katana_form/lib/form/form_media.dart:260-271 | packages/katana_form/lib/form/form_multi_media.dart:258-269 | packages/katana_form/lib/form/form_switch.dart:396-407 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
  • Members sharing a duplicated core (9 members, 50+ identical tokens) packages/katana_form/lib/form/form_date_field.dart:844 — packages/katana_form/lib/form/form_date_field.dart:844-891 | packages/katana_form/lib/form/form_date_time_field.dart:790-837 | packages/katana_form/lib/form/form_date_time_range_field.dart:767-814 | packages/katana_form/lib/form/form_duration_field.dart:794-841 | packages/katana_form/lib/form/form_enum_modal_field.dart:724-766 | packages/katana_form/lib/form/form_map_modal_field.dart:660-702 | packages/katana_form/lib/form/form_month_modal_field.dart:678-725 | packages/katana_form/lib/form/form_num_modal_field.dart:639-681 | packages/katana_form/lib/form/form_rating_bar.dart:371-399 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (8 members, 50+ identical tokens) packages/katana_form/lib/form/form_date_field.dart:473 — packages/katana_form/lib/form/form_date_field.dart:473-487 | packages/katana_form/lib/form/form_date_time_field.dart:417-431 | packages/katana_form/lib/form/form_date_time_range_field.dart:396-410 | packages/katana_form/lib/form/form_duration_field.dart:425-439 | packages/katana_form/lib/form/form_enum_modal_field.dart:359-373 | packages/katana_form/lib/form/form_map_modal_field.dart:297-311 | packages/katana_form/lib/form/form_month_modal_field.dart:307-321 | packages/katana_form/lib/form/form_num_modal_field.dart:277-291 — 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) packages/katana_form/lib/form/form_date_field.dart:825 — packages/katana_form/lib/form/form_date_field.dart:825-842 | packages/katana_form/lib/form/form_date_time_field.dart:771-788 | packages/katana_form/lib/form/form_date_time_range_field.dart:748-765 | packages/katana_form/lib/form/form_duration_field.dart:775-792 | packages/katana_form/lib/form/form_enum_modal_field.dart:705-722 | packages/katana_form/lib/form/form_map_modal_field.dart:641-658 | packages/katana_form/lib/form/form_month_modal_field.dart:659-676 | packages/katana_form/lib/form/form_num_modal_field.dart:620-637 — 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) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:47 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:47-83 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:39-75 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:35-71 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:38-74 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:33-69 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:32-68 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:35-71 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:35-71 — 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 (5 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (5 members, 50+ identical tokens) packages/katana_cli/lib/command/code/page.dart:107 — packages/katana_cli/lib/command/code/page.dart:107-147 | packages/katana_cli/lib/command/code/view/fixedview.dart:97-148 | packages/katana_cli/lib/command/code/view/gridview.dart:108-160 | packages/katana_cli/lib/command/code/view/listview.dart:108-159 | packages/katana_cli/lib/command/code/view/page.dart:107-147 — 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) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:460 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:460-492 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:468-500 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:452-484 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1745-1803 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1805-1842 — 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) packages/masamune_universal_ui/lib/src/universal_column.dart:395 — packages/masamune_universal_ui/lib/src/universal_column.dart:395-418 | packages/masamune_universal_ui/lib/src/universal_container.dart:291-310 | packages/masamune_universal_ui/lib/src/universal_grid_view.dart:434-457 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:464-487 | packages/masamune_universal_ui/lib/src/universal_padding.dart:97-120 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×3
  • Edited copy of a member (25 corresponding lines) packages/katana_router/lib/src/app_page_route.dart:99 — packages/katana_router/lib/src/app_page_route.dart:99-126 | packages/katana_router/lib/src/app_page_route.dart:141-165 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/masamune_camera/lib/src/camera.dart:281 — packages/masamune_camera/lib/src/camera.dart:281-305 | packages/masamune_camera/lib/src/camera.dart:334-358 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/katana_cli/lib/command/code/document.dart:272 — packages/katana_cli/lib/command/code/document.dart:272-296 | packages/katana_cli/lib/command/code/redirect_query.dart:76-115 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 14+ corresponding lines) packages/masamune_notification/lib/src/local_notification.dart:310 — packages/masamune_notification/lib/src/local_notification.dart:310-326 | packages/masamune_notification/lib/src/remote_notification.dart:421-434 | packages/masamune_notification/lib/src/remote_notification.dart:436-449 — 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) packages/masamune_markdown/lib/value/markdown_code_block_value.dart:248 — packages/masamune_markdown/lib/value/markdown_code_block_value.dart:248-261 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:325-338 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:267-280 — 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) packages/katana_model/lib/src/model_ref.dart:703 — packages/katana_model/lib/src/model_ref.dart:703-716 | packages/katana_model/lib/src/model_ref.dart:910-928 | packages/katana_model/lib/src/model_ref.dart:1124-1142 — 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 (16 corresponding lines) · ×3
  • Edited copy of a member (16 corresponding lines) packages/katana_scoped/lib/value/on.dart:121 — packages/katana_scoped/lib/value/on.dart:121-136 | packages/katana_scoped/lib/value/on.dart:138-155 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/masamune_painter/lib/tools/inline/shape_painter_inline_tools.dart:40 — packages/masamune_painter/lib/tools/inline/shape_painter_inline_tools.dart:40-60 | packages/masamune_painter/lib/tools/primary/shape_painter_primary_tools.dart:48-63 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/masamune_camera/lib/adapter/mobile_camera_masamune_adapter.dart:64 — packages/masamune_camera/lib/adapter/mobile_camera_masamune_adapter.dart:64-82 | packages/masamune_camera/lib/adapter/mobile_camera_masamune_adapter.dart:91-106 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 12+ corresponding lines) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:420 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:420-431 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:428-439 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:412-423 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1695-1711 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) packages/katana_model/lib/adapter/runtime_model_adapter.dart:136 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:136-150 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:663-676 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:591-604 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:146-157 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) packages/katana/lib/src/api_multipart_file.dart:94 — packages/katana/lib/src/api_multipart_file.dart:94-105 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:263-274 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:340-351 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:282-293 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 13+ corresponding lines) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:16 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:16-30 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:16-28 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:16-28 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:16-28 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 13+ corresponding lines) packages/masamune_model_functions/lib/adapter/functions_model_adapter.dart:75 — packages/masamune_model_functions/lib/adapter/functions_model_adapter.dart:75-91 | packages/masamune_model_functions/lib/adapter/functions_model_adapter.dart:93-109 | packages/masamune_model_functions/lib/adapter/functions_model_adapter.dart:111-125 | packages/masamune_model_functions/lib/adapter/functions_model_adapter.dart:127-139 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 13+ corresponding lines) packages/katana_model/lib/adapter/runtime_model_adapter.dart:384 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:384-400 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:864-876 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:792-804 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:377-390 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 4+ corresponding lines) · ×3
  • Edited copies of one member (5 members, 4+ corresponding lines) packages/katana_model/lib/src/model_field_value.dart:788 — packages/katana_model/lib/src/model_field_value.dart:788-791 | packages/katana_model/lib/src/model_geo_value.dart:201-204 | packages/katana_model/lib/src/model_locale.dart:752-755 | packages/katana_model/lib/src/model_ref.dart:357-360 | packages/katana_model/lib/src/model_server_command.dart:264-267 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 4+ corresponding lines) packages/katana_localization_builder/lib/value/localize_value.dart:306 — packages/katana_localization_builder/lib/value/localize_value.dart:306-309 | packages/katana_router_builder/lib/value/annotation_value.dart:135-138 | packages/katana_router_builder/lib/value/class_value.dart:45-48 | packages/masamune_builder/lib/value/class_value.dart:54-57 | packages/masamune_builder/lib/value/query_value.dart:68-71 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 4+ corresponding lines) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:77 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:77-80 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:77-80 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:77-80 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:77-80 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:80-83 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×3
  • Duplicated block (47 lines × 2) packages/katana_form/lib/form/form_date_time_field.dart:579 — packages/katana_form/lib/form/form_date_time_field.dart:579-625 | packages/katana_form/lib/form/form_date_time_range_field.dart:558-604 — before extracting anything, compare `packages/katana_form/lib/form/form_date_time_field.dart` and `packages/katana_form/lib/form/form_date_time_range_field.dart` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 382 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 `packages/katana_form/lib/form/form_date_time_field.dart:579` 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 (47 lines × 2) packages/masamune_ads_google/lib/src/others/google_ad_interstitial.dart:100 — packages/masamune_ads_google/lib/src/others/google_ad_interstitial.dart:100-146 | packages/masamune_ads_google/lib/src/others/google_ad_rewarded.dart:101-147 — before extracting anything, compare `packages/masamune_ads_google/lib/src/others/google_ad_interstitial.dart` and `packages/masamune_ads_google/lib/src/others/google_ad_rewarded.dart` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_ads_google/lib/src/others/google_ad_interstitial.dart:100` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/masamune_ads_google/lib/src/others/google_ad_rewarded.dart:161` calls `Function` and `packages/masamune_ads_google/lib/src/others/google_ad_interstitial.dart:156` 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 (47 lines × 2) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:228 — packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:228-274 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:420-466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:228` it begins part-way through the construct above it, so those 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 (42 lines × 2) · ×3
  • Duplicated block (42 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:703 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:703-744 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:631-672 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 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 `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:703` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (42 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:569 — packages/masamune_markdown/lib/src/markdown_controller.dart:569-610 | packages/masamune_markdown/lib/src/markdown_controller.dart:639-680 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (42 lines × 2) packages/masamune_universal_ui/lib/src/universal_column.dart:350 — packages/masamune_universal_ui/lib/src/universal_column.dart:350-391 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:354-395 — before extracting anything, compare `packages/masamune_universal_ui/lib/src/universal_column.dart` and `packages/masamune_universal_ui/lib/src/universal_list_view.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 67 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 (36 lines × 2) · ×3
  • Duplicated block (36 lines × 2) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:111 — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:111-146 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:104-139 — before extracting anything, compare `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart` and `packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:111` 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 (36 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:740 — packages/masamune_markdown/lib/src/markdown_controller.dart:740-775 | packages/masamune_markdown/lib/src/markdown_controller.dart:789-824 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (36 lines × 2) packages/masamune_model_docs_builder/lib/src/builder.dart:68 — packages/masamune_model_docs_builder/lib/src/builder.dart:68-103 | packages/masamune_model_docs_builder/lib/src/builder.dart:116-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_docs_builder/lib/src/builder.dart:68` 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 (31 lines × 2) · ×3
  • Duplicated block (31 lines × 2) packages/katana_ui/lib/ui/line_tile.dart:221 — packages/katana_ui/lib/ui/line_tile.dart:221-251 | packages/katana_ui/lib/ui/line_tile.dart:261-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_ui/lib/ui/line_tile.dart:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (31 lines × 2) packages/masamune_universal_ui/lib/src/universal_grid_view.dart:315 — packages/masamune_universal_ui/lib/src/universal_grid_view.dart:315-345 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:293-323 — before extracting anything, compare `packages/masamune_universal_ui/lib/src/universal_grid_view.dart` and `packages/masamune_universal_ui/lib/src/universal_list_view.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_universal_ui/lib/src/universal_grid_view.dart:315` it does not close everything it opens, so those 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, `packages/masamune_universal_ui/lib/src/universal_list_view.dart:291` calls `_createRows` and `packages/masamune_universal_ui/lib/src/universal_grid_view.dart:314` 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 (31 lines × 2) packages/masamune_painter/lib/tools/block/media/image_from_camera_media_painter_block_tools.dart:34 — packages/masamune_painter/lib/tools/block/media/image_from_camera_media_painter_block_tools.dart:34-64 | packages/masamune_painter/lib/tools/block/media/image_from_library_media_painter_block_tools.dart:34-64 — 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 (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) packages/katana_cli/lib/command/git/pull_request.dart:33 — packages/katana_cli/lib/command/git/pull_request.dart:33-54 | packages/katana_cli/lib/command/git/pull_request_comment.dart:34-55 — before extracting anything, compare `packages/katana_cli/lib/command/git/pull_request.dart` and `packages/katana_cli/lib/command/git/pull_request_comment.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (22 lines × 2) packages/katana_ui/lib/ui/sns_image.dart:188 — packages/katana_ui/lib/ui/sns_image.dart:188-209 | packages/katana_ui/lib/ui/sns_image.dart:219-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. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_ui/lib/ui/sns_image.dart:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:903 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:903-924 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2222-2243 — both copies are in the same file, so extract the 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 (20 lines × 4) · ×3
  • Duplicated block (20 lines × 4) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:62 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:62-81 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:68-87 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:69-88 | packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:78-97 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:494 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:494-513 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:502-521 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:486-505 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1844-1863 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 4) packages/masamune_painter/lib/src/painting_value.dart:252 — packages/masamune_painter/lib/src/painting_value.dart:252-271 | packages/masamune_painter/lib/src/painting_value.dart:284-303 | packages/masamune_painter/lib/src/painting_value.dart:316-335 | packages/masamune_painter/lib/src/painting_value.dart:351-370 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18 lines × 8) · ×3
  • Duplicated block (18 lines × 8) packages/katana_cli/lib/action/app/deeplink.dart:366 — packages/katana_cli/lib/action/app/deeplink.dart:366-383 | packages/katana_cli/lib/action/firebase/authentication.dart:187-204 | packages/katana_cli/lib/action/firebase/authentication.dart:442-459 | packages/katana_cli/lib/action/firebase/authentication.dart:512-529 | packages/katana_cli/lib/action/firebase/authentication.dart:546-563 | packages/katana_cli/lib/action/firebase/authentication.dart:592-609 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:251-268 | packages/katana_cli/lib/action/stripe/stripe.dart:202-219 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:366` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 8) packages/katana_form/lib/form/form_date_field.dart:652 — packages/katana_form/lib/form/form_date_field.dart:652-669 | packages/katana_form/lib/form/form_date_time_field.dart:596-613 | packages/katana_form/lib/form/form_date_time_range_field.dart:575-592 | packages/katana_form/lib/form/form_duration_field.dart:604-621 | packages/katana_form/lib/form/form_enum_modal_field.dart:538-555 | packages/katana_form/lib/form/form_map_modal_field.dart:476-493 | packages/katana_form/lib/form/form_month_modal_field.dart:486-503 | packages/katana_form/lib/form/form_num_modal_field.dart:456-473 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 8) packages/katana_form/lib/form/form_date_field.dart:825 — packages/katana_form/lib/form/form_date_field.dart:825-842 | packages/katana_form/lib/form/form_date_time_field.dart:771-788 | packages/katana_form/lib/form/form_date_time_range_field.dart:748-765 | packages/katana_form/lib/form/form_duration_field.dart:775-792 | packages/katana_form/lib/form/form_enum_modal_field.dart:705-722 | packages/katana_form/lib/form/form_map_modal_field.dart:641-658 | packages/katana_form/lib/form/form_month_modal_field.dart:659-676 | packages/katana_form/lib/form/form_num_modal_field.dart:620-637 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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 (17–18 lines × 2) · ×3
  • Duplicated block (17–18 lines × 2) packages/katana_cli/lib/action/app/keystore.dart:90 — packages/katana_cli/lib/action/app/keystore.dart:90-107 | packages/katana_cli/lib/action/app/spread_sheet.dart:74-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/keystore.dart:90` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17–18 lines × 2) packages/katana_cli/lib/action/cloudflare/kv.dart:56 — packages/katana_cli/lib/action/cloudflare/kv.dart:56-72 | packages/katana_cli/lib/action/cloudflare/turso.dart:125-142 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/turso.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 111 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 `packages/katana_cli/lib/action/cloudflare/kv.dart:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17–18 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:2472 — packages/masamune_markdown/lib/src/markdown_controller.dart:2472-2489 | packages/masamune_markdown/lib/src/markdown_controller.dart:2714-2730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart:2472` 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 lines × 3) · ×3
  • Duplicated block (16 lines × 3) packages/katana_cli/lib/action/app/csr.dart:36 — packages/katana_cli/lib/action/app/csr.dart:36-51 | packages/katana_cli/lib/action/app/icon.dart:92-107 | packages/katana_cli/lib/action/app/spread_sheet.dart:67-82 — before extracting anything, compare `packages/katana_cli/lib/action/app/icon.dart` and `packages/katana_cli/lib/action/app/spread_sheet.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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, `packages/katana_cli/lib/action/app/csr.dart:33` calls `getAsMap`, `get` and `packages/katana_cli/lib/action/app/icon.dart:90` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 3) packages/katana_cli/lib/action/firebase/init.dart:783 — packages/katana_cli/lib/action/firebase/init.dart:783-798 | packages/katana_cli/lib/action/firebase/init.dart:1019-1034 | packages/katana_cli/lib/action/firebase/init.dart:1103-1118 — 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 `packages/katana_cli/lib/action/firebase/init.dart:783` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1376 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1376-1391 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1941-1956 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1979-1994 — 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 `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1376` it begins part-way through the construct above it, so those 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, `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1374` calls `split` and `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1939` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×3
  • Duplicated block (12–13 lines × 2) packages/katana_cli/lib/command/create.dart:203 — packages/katana_cli/lib/command/create.dart:203-214 | packages/katana_cli/lib/command/create.dart:658-670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/create.dart:658` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:51 — packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:51-62 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:51-63 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1231 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1231-1242 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1279-1291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×3
  • Duplicated block (11 lines × 6) packages/masamune_markdown/lib/src/markdown_controller.dart:2409 — packages/masamune_markdown/lib/src/markdown_controller.dart:2409-2419 | packages/masamune_markdown/lib/src/markdown_controller.dart:2511-2521 | packages/masamune_markdown/lib/src/markdown_controller.dart:2651-2661 | packages/masamune_markdown/lib/src/markdown_controller.dart:2742-2752 | packages/masamune_markdown/lib/src/markdown_controller.dart:2960-2970 | packages/masamune_markdown/lib/src/markdown_controller.dart:3041-3051 — 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 `packages/masamune_markdown/lib/src/markdown_controller.dart:2409` it does not close everything it opens, so those 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, `packages/masamune_markdown/lib/src/markdown_controller.dart:2424` calls `any` and `packages/masamune_markdown/lib/src/markdown_controller.dart:2972` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 6) packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart:71 — packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart:71-81 | packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:173-183 | packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart:158-168 | packages/masamune_painter/lib/tools/inline/property/group_property_painter_inline_tools.dart:70-80 | packages/masamune_painter/lib/tools/inline/property/line_property_painter_inline_tools.dart:121-131 | packages/masamune_painter/lib/tools/inline/property/paragraph_align_property_painter_inline_tools.dart:163-173 — before extracting anything, compare `packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart` and `packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 6) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:241 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:241-251 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:196-206 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:196-206 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:196-206 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:192-202 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:207-217 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×3
  • Duplicated block (10–11 lines × 2) packages/katana_theme/lib/src/others/svg_image_provider.dart:132 — packages/katana_theme/lib/src/others/svg_image_provider.dart:132-141 | packages/katana_theme/lib/src/others/svg_image_provider.dart:144-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_theme/lib/src/others/svg_image_provider.dart:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10–11 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1595 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1595-1604 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1937-1947 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1595` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) packages/masamune_purchase/lib/actions/android_subscription_purchase_functions_action.dart:75 — packages/masamune_purchase/lib/actions/android_subscription_purchase_functions_action.dart:75-84 | packages/masamune_purchase/lib/actions/ios_subscription_purchase_functions_action.dart:94-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_purchase/lib/actions/android_subscription_purchase_functions_action.dart:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×3
  • Duplicated block (10 lines × 7) packages/katana_cli/lib/action/agora/agora.dart:152 — packages/katana_cli/lib/action/agora/agora.dart:152-161 | packages/katana_cli/lib/action/app/geocoding.dart:79-88 | packages/katana_cli/lib/action/firebase/algolia.dart:74-83 | packages/katana_cli/lib/action/firebase/authentication.dart:884-893 | packages/katana_cli/lib/action/firebase/messaging.dart:497-506 | packages/katana_cli/lib/action/mail/send_grid.dart:78-87 | packages/katana_cli/lib/action/stripe/stripe.dart:416-425 — before extracting anything, compare `packages/katana_cli/lib/action/agora/agora.dart` and `packages/katana_cli/lib/action/app/geocoding.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/agora/agora.dart:152` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `packages/katana_cli/lib/action/agora/agora.dart:151` calls `save` and `packages/katana_cli/lib/action/stripe/stripe.dart:415` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 7) packages/katana_form/lib/form/form_builder.dart:337 — packages/katana_form/lib/form/form_builder.dart:337-346 | packages/katana_form/lib/form/form_checkbox.dart:467-476 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:322-331 | packages/katana_form/lib/form/form_map_dropdown_field.dart:249-258 | packages/katana_form/lib/form/form_media.dart:262-271 | packages/katana_form/lib/form/form_multi_media.dart:260-269 | packages/katana_form/lib/form/form_switch.dart:398-407 — before extracting anything, compare `packages/katana_form/lib/form/form_enum_dropdown_field.dart` and `packages/katana_form/lib/form/form_map_dropdown_field.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 185 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `oldWidget` to `FormBuilder<T, TValue>` in one and `FormCheckbox<TValue>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 7) packages/katana_form/lib/form/form_date_field.dart:596 — packages/katana_form/lib/form/form_date_field.dart:596-605 | packages/katana_form/lib/form/form_date_time_field.dart:539-548 | packages/katana_form/lib/form/form_date_time_range_field.dart:518-527 | packages/katana_form/lib/form/form_duration_field.dart:548-557 | packages/katana_form/lib/form/form_enum_modal_field.dart:483-492 | packages/katana_form/lib/form/form_month_modal_field.dart:430-439 | packages/katana_form/lib/form/form_num_modal_field.dart:400-409 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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 `packages/katana_form/lib/form/form_date_field.dart:596` it does not close everything it opens, so those 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 lines × 4) · ×3
  • Duplicated block (10 lines × 4) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1229 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1229-1238 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1277-1286 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2338-2347 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2376-2385 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 4) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:58 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:58-67 | packages/masamune_painter/lib/value/media_painting_value.dart:66-75 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:58-67 | packages/masamune_painter/lib/value/text_painting_value.dart:70-79 — before extracting anything, compare `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart` and `packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 124 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 `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/masamune_painter/lib/value/media_painting_value.dart:76` calls `toString` and `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:68` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 4) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:789 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:789-798 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:841-850 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:717-726 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:769-778 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 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 (9 lines × 5) · ×3
  • Duplicated block (9 lines × 5) packages/katana_cli/lib/action/app/icon.dart:123 — packages/katana_cli/lib/action/app/icon.dart:123-131 | packages/katana_cli/lib/action/app/icon.dart:160-168 | packages/katana_cli/lib/action/app/icon.dart:186-194 | packages/katana_cli/lib/action/app/local_notification.dart:87-95 | packages/katana_cli/lib/action/firebase/messaging.dart:185-193 — before extracting anything, compare `packages/katana_cli/lib/action/app/icon.dart` and `packages/katana_cli/lib/action/app/local_notification.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 5) packages/katana_model_firestore/lib/converter/firestore_model_command_base_converter.dart:77 — packages/katana_model_firestore/lib/converter/firestore_model_command_base_converter.dart:77-85 | packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:153-161 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:138-146 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:137-145 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:138-146 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 5) packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:82 — packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:82-90 | packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:82-90 | packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:82-90 | packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:82-90 | packages/masamune_markdown/lib/tools/inline/font/underline_font_markdown_inline_tools.dart:83-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×3
  • Duplicated block (8 lines × 7) packages/katana_cli/lib/action/agora/agora.dart:156 — packages/katana_cli/lib/action/agora/agora.dart:156-163 | packages/katana_cli/lib/action/app/geocoding.dart:83-90 | packages/katana_cli/lib/action/firebase/authentication.dart:888-895 | packages/katana_cli/lib/action/firebase/messaging.dart:501-508 | packages/katana_cli/lib/action/mail/send_grid.dart:82-89 | packages/katana_cli/lib/action/stripe/stripe.dart:420-427 | packages/katana_cli/lib/action/stripe/stripe.dart:444-451 — before extracting anything, compare `packages/katana_cli/lib/action/agora/agora.dart` and `packages/katana_cli/lib/action/app/geocoding.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/agora/agora.dart:156` it begins part-way through the construct above it, so those 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, `packages/katana_cli/lib/action/firebase/messaging.dart:510` calls `requestFirebaseDeploy` and `packages/katana_cli/lib/action/firebase/authentication.dart:897` 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 × 7) packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:68 — packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:68-75 | packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:68-75 | packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:68-75 | packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:68-75 | packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:68-75 | packages/masamune_markdown/lib/tools/inline/font/underline_font_markdown_inline_tools.dart:69-76 | packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:69-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 7) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:373 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:373-380 | packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:382-389 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:381-388 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:390-397 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:365-372 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:374-381 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1574-1581 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `ref` to `ModelBatchRef` in one and `ModelTransactionRef` 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 · Edited copy of a member (32 corresponding lines) · ×2
  • Edited copy of a member (32 corresponding lines) packages/katana_model/lib/src/model_field_value.dart:3334 — packages/katana_model/lib/src/model_field_value.dart:3334-3365 | packages/katana_model/lib/src/model_field_value.dart:3586-3617 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) packages/masamune_universal_ui/lib/src/universal_column.dart:301 — packages/masamune_universal_ui/lib/src/universal_column.dart:301-334 | packages/masamune_universal_ui/lib/src/universal_container.dart:258-289 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 40+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 40+ corresponding lines) packages/katana_model/lib/src/model_uri.dart:257 — packages/katana_model/lib/src/model_uri.dart:257-296 | packages/katana_model/lib/src/model_uri.dart:553-592 | packages/katana_model/lib/src/model_uri.dart:862-901 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 40+ corresponding lines) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:155 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:155-196 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:156-195 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:157-196 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×2
  • Edited copy of a member (43 corresponding lines) packages/katana_cli/lib/command/code/server/call.dart:31 — packages/katana_cli/lib/command/code/server/call.dart:31-79 | packages/katana_cli/lib/command/code/server/firestore_triggered.dart:31-73 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (43 corresponding lines) packages/katana_model/lib/src/no_sql_database.dart:712 — packages/katana_model/lib/src/no_sql_database.dart:712-763 | packages/katana_model/lib/src/no_sql_database.dart:787-829 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) packages/masamune/lib/ui/list_builder.dart:258 — packages/masamune/lib/ui/list_builder.dart:258-284 | packages/masamune/lib/ui/reorderable_list_builder.dart:465-492 — 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) packages/masamune_painter/lib/value/clipping_group_painting_value.dart:102 — packages/masamune_painter/lib/value/clipping_group_painting_value.dart:102-138 | packages/masamune_painter/lib/value/group_painting_value.dart:132-158 — 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 (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:769 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:769-792 | packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:835-872 — 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) packages/katana_scoped/lib/src/scoped.dart:52 — packages/katana_scoped/lib/src/scoped.dart:52-82 | packages/katana_scoped/lib/src/scoped.dart:213-236 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×2
  • Edited copy of a member (26 corresponding lines) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:536 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:536-561 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:569-594 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/katana_cli/lib/command/code/controller.dart:83 — packages/katana_cli/lib/command/code/controller.dart:83-108 | packages/katana_cli/lib/command/code/stateful.dart:83-112 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) packages/masamune_painter/lib/tools/inline/shape_painter_inline_tools.dart:62 — packages/masamune_painter/lib/tools/inline/shape_painter_inline_tools.dart:62-85 | packages/masamune_painter/lib/tools/primary/shape_painter_primary_tools.dart:65-83 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/masamune_painter/lib/value/media_painting_value.dart:95 — packages/masamune_painter/lib/value/media_painting_value.dart:95-113 | packages/masamune_painter/lib/value/text_painting_value.dart:99-117 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 18+ corresponding lines) packages/masamune_model_d1_builder/lib/src/builder.dart:202 — packages/masamune_model_d1_builder/lib/src/builder.dart:202-219 | packages/masamune_model_do_builder/lib/src/builder.dart:199-216 | packages/masamune_model_tidb_builder/lib/src/builder.dart:209-226 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:582 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:582-599 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:593-610 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:544-561 — 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 (4 members, 16+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 16+ corresponding lines) packages/katana_model/lib/adapter/runtime_model_adapter.dart:152 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:152-170 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:678-695 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:606-623 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:159-174 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 16+ corresponding lines) packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:143 — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:143-158 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:143-158 | packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:138-153 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:144-159 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 17+ corresponding lines) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:402 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:402-418 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:410-426 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:394-410 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1641-1662 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 17+ corresponding lines) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:35 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:35-51 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_search_converter.dart:35-51 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_token_converter.dart:35-51 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_vector_value_converter.dart:35-51 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 11+ corresponding lines) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:724 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:724-734 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:737-747 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:685-695 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:209 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:209-219 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:211-221 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:199-209 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×2
  • Edited copy of a member (6 corresponding lines) packages/katana_cli/lib/src/gradle.dart:1973 — packages/katana_cli/lib/src/gradle.dart:1973-1982 | packages/katana_cli/lib/src/gradle.dart:2068-2073 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:147 — packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:147-152 | packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:147-152 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×2
  • Edited copy of a member (4 corresponding lines) packages/katana_cli/lib/src/xcode.dart:1404 — packages/katana_cli/lib/src/xcode.dart:1404-1407 | packages/katana_cli/lib/src/xcode.dart:1707-1710 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/katana_logger/lib/adapter/local_logger_adapter.dart:67 — packages/katana_logger/lib/adapter/local_logger_adapter.dart:67-70 | packages/katana_logger/lib/adapter/runtime_logger_adapter.dart:81-84 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×2
  • Duplicated block (38 lines × 2) packages/katana_ui/lib/ui/chat_tile.dart:255 — packages/katana_ui/lib/ui/chat_tile.dart:255-292 | packages/katana_ui/lib/ui/chat_tile.dart:316-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_ui/lib/ui/chat_tile.dart:255` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (38 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:2685 — packages/masamune_markdown/lib/src/markdown_controller.dart:2685-2722 | packages/masamune_markdown/lib/src/markdown_controller.dart:2776-2813 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart:2685` it begins part-way through the construct above it, so those 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 (33 lines × 3) · ×2
  • Duplicated block (33 lines × 3) packages/katana_cli/lib/action/app/deeplink.dart:297 — packages/katana_cli/lib/action/app/deeplink.dart:297-329 | packages/katana_cli/lib/action/firebase/authentication.dart:842-874 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:200-232 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:297` it does not close everything it opens, so those 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, `packages/katana_cli/lib/action/firebase/authentication.dart:839` calls `label`, `XCode`, `load` and `packages/katana_cli/lib/action/app/deeplink.dart:296` 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 (33 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:168 — packages/masamune_model_d1_builder/lib/src/builder.dart:168-200 | packages/masamune_model_do_builder/lib/src/builder.dart:165-197 | packages/masamune_model_tidb_builder/lib/src/builder.dart:175-207 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1_builder/lib/src/builder.dart:168` 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 (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) packages/katana_cli/lib/action/ecosystem/ecosystem.dart:107 — packages/katana_cli/lib/action/ecosystem/ecosystem.dart:107-139 | packages/katana_cli/lib/action/purchase/purchase.dart:118-150 — `packages/katana_cli/lib/action/ecosystem/ecosystem.dart` and `packages/katana_cli/lib/action/purchase/purchase.dart` 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 6 separate duplicated blocks between them, totalling at least 89 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 `packages/katana_cli/lib/action/ecosystem/ecosystem.dart:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (33 lines × 2) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:32 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:32-64 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:41-73 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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 (30 lines × 2) · ×2
  • Duplicated block (30 lines × 2) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:859 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:859-888 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:686-715 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:859` it begins part-way through the construct above it, so those 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 (30 lines × 2) packages/katana_cli/lib/command/code/collection.dart:272 — packages/katana_cli/lib/command/code/collection.dart:272-301 | packages/katana_cli/lib/command/code/value.dart:82-112 — before extracting anything, compare `packages/katana_cli/lib/command/code/collection.dart` and `packages/katana_cli/lib/command/code/value.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) packages/katana_cli/lib/command/git/commit.dart:41 — packages/katana_cli/lib/command/git/commit.dart:41-68 | packages/katana_cli/lib/command/git/remove.dart:39-66 — before extracting anything, compare `packages/katana_cli/lib/command/git/commit.dart` and `packages/katana_cli/lib/command/git/remove.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/command/git/commit.dart:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) packages/katana_model/lib/src/model_field_value.dart:851 — packages/katana_model/lib/src/model_field_value.dart:851-878 | packages/katana_model/lib/src/model_server_command.dart:319-348 — before extracting anything, compare `packages/katana_model/lib/src/model_field_value.dart` and `packages/katana_model/lib/src/model_server_command.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×2
  • Duplicated block (26 lines × 2) packages/katana_cli/lib/command/code/format.dart:18 — packages/katana_cli/lib/command/code/format.dart:18-43 | packages/katana_cli/lib/command/pub/get.dart:18-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (26 lines × 2) packages/masamune_universal_ui/lib/src/universal_scaffold.dart:866 — packages/masamune_universal_ui/lib/src/universal_scaffold.dart:866-891 | packages/masamune_universal_ui/lib/src/universal_scaffold.dart:902-927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_universal_ui/lib/src/universal_scaffold.dart:866` it begins part-way through the construct above it, so those 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 (25 lines × 3) · ×2
  • Duplicated block (25 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:71 — packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:71-95 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:71-95 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:71-95 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 136 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 `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:71` 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 (25 lines × 3) packages/katana_ui/lib/ui/sns_image.dart:240 — packages/katana_ui/lib/ui/sns_image.dart:240-264 | packages/katana_ui/lib/ui/sns_image.dart:279-303 | packages/katana_ui/lib/ui/sns_image.dart:305-329 — 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 (25 lines × 2) · ×2
  • Duplicated block (25 lines × 2) packages/katana_cli/lib/action/app/local_notification.dart:128 — packages/katana_cli/lib/action/app/local_notification.dart:128-152 | packages/katana_cli/lib/action/firebase/messaging.dart:223-247 — before extracting anything, compare `packages/katana_cli/lib/action/app/local_notification.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/local_notification.dart:127` calls `findAllElements` and `packages/katana_cli/lib/action/firebase/messaging.dart:222` 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 (25 lines × 2) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:103 — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:103-127 | packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:103-127 — before extracting anything, compare `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart` and `packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 124 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 `packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 4) · ×2
  • Duplicated block (24 lines × 4) packages/katana_cli/lib/action/agora/agora.dart:64 — packages/katana_cli/lib/action/agora/agora.dart:64-87 | packages/katana_cli/lib/action/app/geocoding.dart:56-79 | packages/katana_cli/lib/action/mail/send_grid.dart:55-78 | packages/katana_cli/lib/action/stripe/stripe.dart:89-112 — before extracting anything, compare `packages/katana_cli/lib/action/agora/agora.dart` and `packages/katana_cli/lib/action/app/geocoding.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/agora/agora.dart:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 4) packages/katana_cli/lib/action/app/local_notification.dart:210 — packages/katana_cli/lib/action/app/local_notification.dart:210-233 | packages/katana_cli/lib/action/firebase/messaging.dart:256-279 | packages/katana_cli/lib/action/firebase/messaging.dart:369-392 | packages/katana_cli/lib/action/stripe/stripe.dart:139-162 — before extracting anything, compare `packages/katana_cli/lib/action/app/local_notification.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/local_notification.dart:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×2
  • Duplicated block (23–24 lines × 2) packages/katana_cli/lib/action/firebase/init.dart:879 — packages/katana_cli/lib/action/firebase/init.dart:879-901 | packages/katana_cli/lib/action/firebase/init.dart:957-980 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/firebase/init.dart:879` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23–24 lines × 2) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:290 — packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:290-312 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:482-505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:290` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20–21 lines × 4) · ×2
  • Duplicated block (20–21 lines × 4) packages/katana_cli/lib/action/app/location.dart:94 — packages/katana_cli/lib/action/app/location.dart:94-113 | packages/katana_cli/lib/action/firebase/authentication.dart:680-699 | packages/katana_cli/lib/action/firebase/authentication.dart:707-726 | packages/katana_cli/lib/action/firebase/messaging.dart:284-304 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/location.dart:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/location.dart:93` calls `findAllElements` and `packages/katana_cli/lib/action/firebase/authentication.dart:679` 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 (20–21 lines × 4) packages/katana_cli/lib/action/firebase/init.dart:807 — packages/katana_cli/lib/action/firebase/init.dart:807-827 | packages/katana_cli/lib/action/firebase/init.dart:872-891 | packages/katana_cli/lib/action/firebase/init.dart:950-970 | packages/katana_cli/lib/action/firebase/init.dart:1051-1071 — 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 `packages/katana_cli/lib/action/firebase/init.dart:807` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×2
  • Duplicated block (17 lines × 4) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1025 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1025-1041 | packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1045-1061 | packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1065-1081 | packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1082-1101 — 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 `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:1025` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (17 lines × 4) packages/katana_cli/lib/command/code/exception.dart:71 — packages/katana_cli/lib/command/code/exception.dart:71-87 | packages/katana_cli/lib/command/code/modal.dart:77-94 | packages/katana_cli/lib/command/code/stateless.dart:83-107 | packages/katana_cli/lib/command/code/widget.dart:83-112 — before extracting anything, compare `packages/katana_cli/lib/command/code/exception.dart` and `packages/katana_cli/lib/command/code/modal.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:229 — packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:229-245 | packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:283-298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:229` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16–17 lines × 2) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:594 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:594-610 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:531-546 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 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 `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:594` it begins part-way through the construct above it, so those 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 (30 lines × 7) · ×2
  • Duplicated block (30 lines × 7) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:97 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:97-126 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:78-107 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:87-116 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:78-107 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:87-116 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:78-107 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:87-116 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (30 lines × 7) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:89 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:89-118 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:85-114 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:88-117 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:83-112 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:82-111 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:85-114 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:85-114 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 127 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×2
  • Duplicated block (16 lines × 4) packages/masamune_markdown/lib/src/markdown_controller.dart:2468 — packages/masamune_markdown/lib/src/markdown_controller.dart:2468-2483 | packages/masamune_markdown/lib/src/markdown_controller.dart:2570-2585 | packages/masamune_markdown/lib/src/markdown_controller.dart:2710-2725 | packages/masamune_markdown/lib/src/markdown_controller.dart:2801-2816 — 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 `packages/masamune_markdown/lib/src/markdown_controller.dart:2468` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 4) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:224 — packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:224-239 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:286-301 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:416-431 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:478-493 — 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 `packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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–16 lines × 3) · ×2
  • Duplicated block (15–16 lines × 3) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:899 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:899-914 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:736-750 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:781-795 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:899` 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 (15–16 lines × 3) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1510 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1510-1525 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1556-1570 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1573-1587 — 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 `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1510` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) packages/katana_router_builder/lib/generator/router_generator.dart:39 — packages/katana_router_builder/lib/generator/router_generator.dart:39-53 | packages/masamune_model_firebase_data_connect_builder/lib/generator/adapter_generator.dart:32-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_router_builder/lib/generator/router_generator.dart: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15–16 lines × 2) packages/masamune_painter/lib/src/painter_layer_list.dart:305 — packages/masamune_painter/lib/src/painter_layer_list.dart:305-319 | packages/masamune_painter/lib/src/painter_layer_list.dart:363-378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_painter/lib/src/painter_layer_list.dart:305` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:37 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:37-51 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_search_converter.dart:37-51 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_token_converter.dart:37-51 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_vector_value_converter.dart:37-51 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_search_converter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:37` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 4) packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:97 — packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:97-111 | packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:131-145 | packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:100-114 | packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:134-148 — before extracting anything, compare `packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart` and `packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 131 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 `packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×2
  • Duplicated block (14–15 lines × 3) packages/katana_cli/lib/action/app/local_notification.dart:263 — packages/katana_cli/lib/action/app/local_notification.dart:263-277 | packages/katana_cli/lib/action/app/location.dart:190-203 | packages/katana_cli/lib/action/firebase/messaging.dart:458-472 — before extracting anything, compare `packages/katana_cli/lib/action/app/local_notification.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/location.dart:189` calls `save` and `packages/katana_cli/lib/action/firebase/messaging.dart:457` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14–15 lines × 3) packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:7 — packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:7-21 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:7-20 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:8-22 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) packages/katana_cli/lib/action/firebase/authentication.dart:669 — packages/katana_cli/lib/action/firebase/authentication.dart:669-683 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:60-73 — before extracting anything, compare `packages/katana_cli/lib/action/firebase/authentication.dart` and `packages/katana_cli/lib/action/firebase/dynamic_links.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 260 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 `packages/katana_cli/lib/action/firebase/authentication.dart:669` it begins part-way through the construct above it, so those exact lines 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) packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:372 — packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:372-386 | packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:424-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:372` it does not close everything it opens, so those 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 (13 lines × 5) · ×2
  • Duplicated block (13 lines × 5) packages/katana_form/lib/form/form_date_field.dart:879 — packages/katana_form/lib/form/form_date_field.dart:879-891 | packages/katana_form/lib/form/form_date_time_field.dart:825-837 | packages/katana_form/lib/form/form_date_time_range_field.dart:802-814 | packages/katana_form/lib/form/form_duration_field.dart:829-841 | packages/katana_form/lib/form/form_month_modal_field.dart:713-725 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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 `packages/katana_form/lib/form/form_date_field.dart:879` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `oldWidget` to `_DateTextField<TValue>` in one and `_DateTimeTextField<TValue>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 5) packages/masamune_universal_ui/lib/src/universal_column.dart:403 — packages/masamune_universal_ui/lib/src/universal_column.dart:403-415 | packages/masamune_universal_ui/lib/src/universal_container.dart:295-307 | packages/masamune_universal_ui/lib/src/universal_grid_view.dart:439-451 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:469-481 | packages/masamune_universal_ui/lib/src/universal_padding.dart:102-114 — before extracting anything, compare `packages/masamune_universal_ui/lib/src/universal_column.dart` and `packages/masamune_universal_ui/lib/src/universal_container.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/masamune_universal_ui/lib/src/universal_grid_view.dart:438` calls `of` and `packages/masamune_universal_ui/lib/src/universal_container.dart:294` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) packages/katana_cli/lib/action/firebase/deploy.dart:31 — packages/katana_cli/lib/action/firebase/deploy.dart:31-41 | packages/katana_cli/lib/action/firebase/init.dart:348-359 — 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 `packages/katana_cli/lib/action/firebase/deploy.dart:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11–12 lines × 2) packages/masamune_builder/lib/generator/collection_model_generator.dart:90 — packages/masamune_builder/lib/generator/collection_model_generator.dart:90-100 | packages/masamune_builder/lib/generator/document_model_generator.dart:90-101 — before extracting anything, compare `packages/masamune_builder/lib/generator/collection_model_generator.dart` and `packages/masamune_builder/lib/generator/document_model_generator.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 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 `packages/masamune_builder/lib/generator/collection_model_generator.dart:90` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×2
  • Duplicated block (11 lines × 5) packages/katana_form/lib/form/form_date_field.dart:593 — packages/katana_form/lib/form/form_date_field.dart:593-603 | packages/katana_form/lib/form/form_duration_field.dart:545-555 | packages/katana_form/lib/form/form_enum_modal_field.dart:480-490 | packages/katana_form/lib/form/form_month_modal_field.dart:427-437 | packages/katana_form/lib/form/form_num_modal_field.dart:397-407 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_duration_field.dart` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 336 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 `packages/katana_form/lib/form/form_date_field.dart:593` it does not close everything it opens, so those exact lines 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 × 5) packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:98 — packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:98-108 | packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:98-108 | packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:98-108 | packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:98-108 | packages/masamune_markdown/lib/tools/inline/font/underline_font_markdown_inline_tools.dart:99-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×2
  • Duplicated block (10 lines × 5) packages/katana_cli/lib/action/app/location.dart:130 — packages/katana_cli/lib/action/app/location.dart:130-139 | packages/katana_cli/lib/action/app/text_to_speech.dart:42-51 | packages/katana_cli/lib/action/firebase/authentication.dart:632-641 | packages/katana_cli/lib/action/firebase/init.dart:1259-1268 | packages/katana_cli/lib/action/purchase/purchase.dart:212-221 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/app/text_to_speech.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 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 `packages/katana_cli/lib/action/app/location.dart:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 5) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:478 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:478-487 | packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:510-519 | packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:570-579 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:543-552 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:607-616 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:478` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) packages/katana_cli/lib/action/ecosystem/ecosystem.dart:51 — packages/katana_cli/lib/action/ecosystem/ecosystem.dart:51-58 | packages/katana_cli/lib/action/purchase/purchase.dart:44-50 — `packages/katana_cli/lib/action/ecosystem/ecosystem.dart` and `packages/katana_cli/lib/action/purchase/purchase.dart` 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 6 separate duplicated blocks between them, totalling at least 89 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.
  • Duplicated block (7–8 lines × 2) packages/katana_cli/lib/src/gradle.dart:575 — packages/katana_cli/lib/src/gradle.dart:575-581 | packages/katana_cli/lib/src/gradle.dart:606-613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/src/gradle.dart:575` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×2
  • Duplicated block (5 lines × 5) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:462 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:462-466 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:470-474 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:454-458 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1747-1751 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1807-1811 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:462` it begins part-way through the construct above it, so those exact lines 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 × 5) packages/katana_cli/lib/action/git/platform/android.dart:335 — packages/katana_cli/lib/action/git/platform/android.dart:335-339 | packages/katana_cli/lib/action/git/platform/ios.dart:431-435 | packages/katana_cli/lib/action/git/platform/web.dart:114-118 | packages/katana_cli/lib/action/git/status_check.dart:72-76 | packages/katana_cli/lib/action/git/status_check.dart:158-162 — there are 5 copies across 4 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×2
  • Duplicated block (9 lines × 6) packages/katana_cli/lib/action/ads/ads.dart:27 — packages/katana_cli/lib/action/ads/ads.dart:27-35 | packages/katana_cli/lib/action/agora/agora.dart:22-30 | packages/katana_cli/lib/action/app/location.dart:27-35 | packages/katana_cli/lib/action/mail/send_grid.dart:22-30 | packages/katana_cli/lib/action/purchase/purchase.dart:32-40 | packages/katana_cli/lib/action/stripe/stripe.dart:25-33 — before extracting anything, compare `packages/katana_cli/lib/action/ads/ads.dart` and `packages/katana_cli/lib/action/app/location.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 6) packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart:83 — packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart:83-91 | packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:185-193 | packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart:170-178 | packages/masamune_painter/lib/tools/inline/property/group_property_painter_inline_tools.dart:82-90 | packages/masamune_painter/lib/tools/inline/property/line_property_painter_inline_tools.dart:133-141 | packages/masamune_painter/lib/tools/inline/property/paragraph_align_property_painter_inline_tools.dart:175-183 — before extracting anything, compare `packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart` and `packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 (12 lines × 5) · ×2
  • Duplicated block (12 lines × 5) packages/masamune_universal_ui/lib/src/universal_column.dart:420 — packages/masamune_universal_ui/lib/src/universal_column.dart:420-431 | packages/masamune_universal_ui/lib/src/universal_container.dart:312-323 | packages/masamune_universal_ui/lib/src/universal_grid_view.dart:459-470 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:489-500 | packages/masamune_universal_ui/lib/src/universal_padding.dart:122-133 — before extracting anything, compare `packages/masamune_universal_ui/lib/src/universal_column.dart` and `packages/masamune_universal_ui/lib/src/universal_container.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot 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 × 5) packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:183 — packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:183-194 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:183-194 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:183-194 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:179-190 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:194-205 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 130 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D1 · Cyclomatic Complexity · FirebaseInitCliAction.exec (cyclomatic 134) · ×1
  • FirebaseInitCliAction.exec (cyclomatic 134) packages/katana_cli/lib/action/firebase/init.dart:476 — FirebaseInitCliAction.exec has cyclomatic complexity 134 (threshold 15). To reduce it, separate the cases: extract each independent 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 · FirebaseAuthenticationCliAction.exec (cyclomatic 121) · ×1
  • FirebaseAuthenticationCliAction.exec (cyclomatic 121) packages/katana_cli/lib/action/firebase/authentication.dart:45 — FirebaseAuthenticationCliAction.exec has cyclomatic complexity 121 (threshold 15). To reduce it, separate the cases: extract each independent 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 · MarkdownController._replaceTextSingleField (cyclomatic 113) · ×1
  • MarkdownController._replaceTextSingleField (cyclomatic 113) packages/masamune_markdown/lib/src/markdown_controller.dart:1000 — MarkdownController._replaceTextSingleField has cyclomatic complexity 113 (threshold 15). To reduce it, separate the cases: extract each independent 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 · MarkdownController._replaceTextMultiField (cyclomatic 112) · ×1
  • MarkdownController._replaceTextMultiField (cyclomatic 112) packages/masamune_markdown/lib/src/markdown_controller.dart:1667 — MarkdownController._replaceTextMultiField has cyclomatic complexity 112 (threshold 15). To reduce it, separate the cases: extract each independent 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 · GithubModelAdapter.loadCollection (cyclomatic 110) · ×1
  • GithubModelAdapter.loadCollection (cyclomatic 110) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1444 — GithubModelAdapter.loadCollection has cyclomatic complexity 110 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GithubModelAdapter.loadDocument (cyclomatic 99) · ×1
  • GithubModelAdapter.loadDocument (cyclomatic 99) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1018 — GithubModelAdapter.loadDocument has cyclomatic complexity 99 (threshold 15). To reduce it, separate the cases: extract each independent 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 · GithubTimelineEvent.toGithubIssueTimelineModelFromTimelineEvent (cyclomatic 75) · ×1
  • GithubTimelineEvent.toGithubIssueTimelineModelFromTimelineEvent (cyclomatic 75) packages/masamune_model_github/lib/src/github_timeline_event.dart:205 — GithubTimelineEvent.toGithubIssueTimelineModelFromTimelineEvent has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _MasamuneModelShouldShowIndicatorWhileLoading.run (cyclomatic 72) · ×1
  • _MasamuneModelShouldShowIndicatorWhileLoading.run (cyclomatic 72) packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:13 — _MasamuneModelShouldShowIndicatorWhileLoading.run has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent 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 · AppDeeplinkCliAction.exec (cyclomatic 71) · ×1
  • AppDeeplinkCliAction.exec (cyclomatic 71) packages/katana_cli/lib/action/app/deeplink.dart:34 — AppDeeplinkCliAction.exec has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent 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 · MobilePurchaseMasamuneAdapter.listenPurchase (cyclomatic 68) · ×1
  • MobilePurchaseMasamuneAdapter.listenPurchase (cyclomatic 68) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:94 — MobilePurchaseMasamuneAdapter.listenPurchase 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 · ModelQueryFilter._hasMatchValue (cyclomatic 64) · ×1
  • ModelQueryFilter._hasMatchValue (cyclomatic 64) packages/katana_model/lib/src/model_query.dart:1558 — ModelQueryFilter._hasMatchValue has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UniversalAvatarAppBarDelegate.build (cyclomatic 60) · ×1
  • _UniversalAvatarAppBarDelegate.build (cyclomatic 60) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1561 — _UniversalAvatarAppBarDelegate.build has cyclomatic complexity 60 (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 · StripeCliAction.exec (cyclomatic 58) · ×1
  • StripeCliAction.exec (cyclomatic 58) packages/katana_cli/lib/action/stripe/stripe.dart:35 — StripeCliAction.exec 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 · CloudflareTidbCliAction._applyDirect (cyclomatic 57) · ×1
  • CloudflareTidbCliAction._applyDirect (cyclomatic 57) packages/katana_cli/lib/action/cloudflare/tidb.dart:642 — CloudflareTidbCliAction._applyDirect has cyclomatic complexity 57 (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 · FirebaseMessagingCliAction.exec (cyclomatic 55) · ×1
  • FirebaseMessagingCliAction.exec (cyclomatic 55) packages/katana_cli/lib/action/firebase/messaging.dart:93 — FirebaseMessagingCliAction.exec has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent 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 · FirebaseAuthAdapter.signIn (cyclomatic 52) · ×1
  • FirebaseAuthAdapter.signIn (cyclomatic 52) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:550 — FirebaseAuthAdapter.signIn has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MarkdownFieldState.build (cyclomatic 52) · ×1
  • MarkdownFieldState.build (cyclomatic 52) packages/masamune_markdown/lib/src/markdown_field.dart:1235 — MarkdownFieldState.build has cyclomatic complexity 52 (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 · _RenderMarkdownEditor.paint (cyclomatic 52) · ×1
  • _RenderMarkdownEditor.paint (cyclomatic 52) packages/masamune_markdown/lib/src/markdown_field.dart:2964 — _RenderMarkdownEditor.paint has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppLocationCliAction.exec (cyclomatic 51) · ×1
  • AppLocationCliAction.exec (cyclomatic 51) packages/katana_cli/lib/action/app/location.dart:37 — AppLocationCliAction.exec has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PurchaseCliAction.exec (cyclomatic 50) · ×1
  • PurchaseCliAction.exec (cyclomatic 50) packages/katana_cli/lib/action/purchase/purchase.dart:42 — PurchaseCliAction.exec has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ComposeCliCommand.exec (cyclomatic 50) · ×1
  • ComposeCliCommand.exec (cyclomatic 50) packages/katana_cli/lib/command/create.dart:581 — ComposeCliCommand.exec has cyclomatic complexity 50 (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 · NativeAppTarget.apply (cyclomatic 48) · ×1
  • NativeAppTarget.apply (cyclomatic 48) packages/katana_cli/lib/src/native_environment.dart:359 — NativeAppTarget.apply has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UniversalAppBar.build (cyclomatic 48) · ×1
  • UniversalAppBar.build (cyclomatic 48) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:521 — UniversalAppBar.build has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CloudflareD1CliAction.exec (cyclomatic 46) · ×1
  • CloudflareD1CliAction.exec (cyclomatic 46) packages/katana_cli/lib/action/cloudflare/d1.dart:190 — CloudflareD1CliAction.exec has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CreateCliCommand.exec (cyclomatic 46) · ×1
  • CreateCliCommand.exec (cyclomatic 46) packages/katana_cli/lib/command/create.dart:142 — CreateCliCommand.exec has cyclomatic complexity 46 (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 · MarkdownFieldState.updateEditingValue (cyclomatic 44) · ×1
  • MarkdownFieldState.updateEditingValue (cyclomatic 44) packages/masamune_markdown/lib/src/markdown_field.dart:752 — MarkdownFieldState.updateEditingValue has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CloudflareStorageCliAction.exec (cyclomatic 42) · ×1
  • CloudflareStorageCliAction.exec (cyclomatic 42) packages/katana_cli/lib/action/cloudflare/storage.dart:227 — CloudflareStorageCliAction.exec has cyclomatic complexity 42 (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 · GithubModelAdapter.saveDocument (cyclomatic 42) · ×1
  • GithubModelAdapter.saveDocument (cyclomatic 42) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2014 — GithubModelAdapter.saveDocument has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CloudflareTursoCliAction.exec (cyclomatic 40) · ×1
  • CloudflareTursoCliAction.exec (cyclomatic 40) packages/katana_cli/lib/action/cloudflare/turso.dart:73 — CloudflareTursoCliAction.exec has cyclomatic complexity 40 (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 · MarkdownFieldState._getMentionRangeAtOffset (cyclomatic 40) · ×1
  • MarkdownFieldState._getMentionRangeAtOffset (cyclomatic 40) packages/masamune_markdown/lib/src/markdown_field.dart:2110 — MarkdownFieldState._getMentionRangeAtOffset has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (_RenderMarkdownEditor._getMentionRangeAtOffset) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · _RenderMarkdownEditor._getMentionRangeAtOffset (cyclomatic 40) · ×1
  • _RenderMarkdownEditor._getMentionRangeAtOffset (cyclomatic 40) packages/masamune_markdown/lib/src/markdown_field.dart:3990 — _RenderMarkdownEditor._getMentionRangeAtOffset has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MarkdownFieldState._getMentionRangeAtOffset) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TidbQueryPayload.fromFilters (cyclomatic 39) · ×1
  • TidbQueryPayload.fromFilters (cyclomatic 39) packages/masamune_model_tidb/lib/src/tidb_query.dart:18 — TidbQueryPayload.fromFilters has cyclomatic complexity 39 (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 · TursoQueryPayload.fromFilters (cyclomatic 39) · ×1
  • TursoQueryPayload.fromFilters (cyclomatic 39) packages/masamune_model_turso/lib/src/turso_query.dart:18 — TursoQueryPayload.fromFilters has cyclomatic complexity 39 (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 · FirebaseDynamicLinksCliAction.exec (cyclomatic 38) · ×1
  • FirebaseDynamicLinksCliAction.exec (cyclomatic 38) packages/katana_cli/lib/action/firebase/dynamic_links.dart:33 — FirebaseDynamicLinksCliAction.exec has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LocalizeLoader.load (cyclomatic 37) · ×1
  • LocalizeLoader.load (cyclomatic 37) packages/katana_localization_builder/lib/src/loader.dart:47 — LocalizeLoader.load 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 · D1QueryPayload.fromFilters (cyclomatic 37) · ×1
  • D1QueryPayload.fromFilters (cyclomatic 37) packages/masamune_model_d1/lib/src/d1_query.dart:18 — D1QueryPayload.fromFilters has cyclomatic complexity 37 (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 · DurableObjectQueryPayload.fromFilters (cyclomatic 37) · ×1
  • DurableObjectQueryPayload.fromFilters (cyclomatic 37) packages/masamune_model_do/lib/src/do_query.dart:18 — DurableObjectQueryPayload.fromFilters has cyclomatic complexity 37 (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 · PermissionValue.toValidationQueryString (cyclomatic 37) · ×1
  • PermissionValue.toValidationQueryString (cyclomatic 37) packages/masamune_builder/lib/value/permission_value.dart:61 — PermissionValue.toValidationQueryString has cyclomatic complexity 37 (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 · CloudflareInitCliAction.exec (cyclomatic 34) · ×1
  • CloudflareInitCliAction.exec (cyclomatic 34) packages/katana_cli/lib/action/cloudflare/init.dart:60 — CloudflareInitCliAction.exec has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _MasamuneModelShouldLoad.run (cyclomatic 34) · ×1
  • _MasamuneModelShouldLoad.run (cyclomatic 34) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:12 — _MasamuneModelShouldLoad.run has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MarkdownController.getLinkRangeBeforeCursor (cyclomatic 34) · ×1
  • MarkdownController.getLinkRangeBeforeCursor (cyclomatic 34) packages/masamune_markdown/lib/src/markdown_controller.dart:3844 — MarkdownController.getLinkRangeBeforeCursor has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MarkdownController.getMentionRangeBeforeCursor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · MarkdownController.getMentionRangeBeforeCursor (cyclomatic 34) · ×1
  • MarkdownController.getMentionRangeBeforeCursor (cyclomatic 34) packages/masamune_markdown/lib/src/markdown_controller.dart:4030 — MarkdownController.getMentionRangeBeforeCursor has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MarkdownController.getLinkRangeBeforeCursor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · MarkdownFieldState._getLinkRangeAtOffset (cyclomatic 34) · ×1
  • MarkdownFieldState._getLinkRangeAtOffset (cyclomatic 34) packages/masamune_markdown/lib/src/markdown_field.dart:1975 — MarkdownFieldState._getLinkRangeAtOffset has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (_RenderMarkdownEditor._getLinkRangeAtOffset) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · _RenderMarkdownEditor._getLinkRangeAtOffset (cyclomatic 34) · ×1
  • _RenderMarkdownEditor._getLinkRangeAtOffset (cyclomatic 34) packages/masamune_markdown/lib/src/markdown_field.dart:3853 — _RenderMarkdownEditor._getLinkRangeAtOffset has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MarkdownFieldState._getLinkRangeAtOffset) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · _RenderMarkdownEditor._isWordBoundary (cyclomatic 34) · ×1
  • _RenderMarkdownEditor._isWordBoundary (cyclomatic 34) packages/masamune_markdown/lib/src/markdown_field.dart:4412 — _RenderMarkdownEditor._isWordBoundary has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GithubModelAdapter.deleteDocument (cyclomatic 33) · ×1
  • GithubModelAdapter.deleteDocument (cyclomatic 33) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2298 — GithubModelAdapter.deleteDocument 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 · ModelQuery.seekIndex (cyclomatic 33) · ×1
  • ModelQuery.seekIndex (cyclomatic 33) packages/katana_model/lib/src/model_query.dart:908 — ModelQuery.seekIndex 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 · MarkdownController._insertNewLineSingleField (cyclomatic 32) · ×1
  • MarkdownController._insertNewLineSingleField (cyclomatic 32) packages/masamune_markdown/lib/src/markdown_controller.dart:3146 — MarkdownController._insertNewLineSingleField has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MarkdownController._insertNewLineMultiField) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · MarkdownController._insertNewLineMultiField (cyclomatic 32) · ×1
  • MarkdownController._insertNewLineMultiField (cyclomatic 32) packages/masamune_markdown/lib/src/markdown_controller.dart:3441 — MarkdownController._insertNewLineMultiField has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MarkdownController._insertNewLineSingleField) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · StoreScreenshotCliCommand.exec (cyclomatic 31) · ×1
  • StoreScreenshotCliCommand.exec (cyclomatic 31) packages/katana_cli/lib/command/store/screenshot.dart:85 — StoreScreenshotCliCommand.exec 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 · _DateTimePickerAdapter.doShow (cyclomatic 31) · ×1
  • _DateTimePickerAdapter.doShow (cyclomatic 31) packages/katana_form/lib/src/picker/picker.dart:1627 — _DateTimePickerAdapter.doShow 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 · ModelLocalizedValueFilter._hasMatch (cyclomatic 31) · ×1
  • ModelLocalizedValueFilter._hasMatch (cyclomatic 31) packages/katana_model/lib/src/model_locale.dart:221 — ModelLocalizedValueFilter._hasMatch has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NoSqlDatabase.notifyDocuments (cyclomatic 31) · ×1
  • NoSqlDatabase.notifyDocuments (cyclomatic 31) packages/katana_model/lib/src/no_sql_database.dart:1058 — NoSqlDatabase.notifyDocuments 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 · AgoraController._joinRoom (cyclomatic 31) · ×1
  • AgoraController._joinRoom (cyclomatic 31) packages/masamune_agora/lib/src/agora_controller.dart:528 — AgoraController._joinRoom 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 · MarkdownClipboard._pasteSpansWithProperties (cyclomatic 31) · ×1
  • MarkdownClipboard._pasteSpansWithProperties (cyclomatic 31) packages/masamune_markdown/lib/src/markdown_clipboard.dart:298 — MarkdownClipboard._pasteSpansWithProperties 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 · AppLocalNotificationCliAction.exec (cyclomatic 30) · ×1
  • AppLocalNotificationCliAction.exec (cyclomatic 30) packages/katana_cli/lib/action/app/local_notification.dart:36 — AppLocalNotificationCliAction.exec has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ApplyCliCommand._apply (cyclomatic 30) · ×1
  • ApplyCliCommand._apply (cyclomatic 30) packages/katana_cli/lib/command/apply.dart:236 — ApplyCliCommand._apply has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CloudflareDurableObjectCliAction.exec (cyclomatic 29) · ×1
  • CloudflareDurableObjectCliAction.exec (cyclomatic 29) packages/katana_cli/lib/action/cloudflare/durable_object.dart:266 — CloudflareDurableObjectCliAction.exec has cyclomatic complexity 29 (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 · _DateTimePickerAdapter.getLength (cyclomatic 29) · ×1
  • _DateTimePickerAdapter.getLength (cyclomatic 29) packages/katana_form/lib/src/picker/picker.dart:1430 — _DateTimePickerAdapter.getLength 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 · ModelGeoValueFilter._hasMatch (cyclomatic 29) · ×1
  • ModelGeoValueFilter._hasMatch (cyclomatic 29) packages/katana_model/lib/src/model_geo_value.dart:270 — ModelGeoValueFilter._hasMatch has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PaintingValue._getMinimumSizeOffsetOnResizing (cyclomatic 29) · ×1
  • PaintingValue._getMinimumSizeOffsetOnResizing (cyclomatic 29) packages/masamune_painter/lib/src/painting_value.dart:239 — PaintingValue._getMinimumSizeOffsetOnResizing 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 · DebugAppCheckTokenCliCommand.exec (cyclomatic 28) · ×1
  • DebugAppCheckTokenCliCommand.exec (cyclomatic 28) packages/katana_cli/lib/command/debug/app_check_token.dart:26 — DebugAppCheckTokenCliCommand.exec has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DateTimePickerAdapter.doSelect (cyclomatic 28) · ×1
  • _DateTimePickerAdapter.doSelect (cyclomatic 28) packages/katana_form/lib/src/picker/picker.dart:1696 — _DateTimePickerAdapter.doSelect has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RuleValue._applyAtPath (cyclomatic 28) · ×1
  • RuleValue._applyAtPath (cyclomatic 28) packages/masamune_model_firestore_builder/lib/value/rule_value.dart:49 — RuleValue._applyAtPath has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppIconCliAction.exec (cyclomatic 27) · ×1
  • AppIconCliAction.exec (cyclomatic 27) packages/katana_cli/lib/action/app/icon.dart:89 — AppIconCliAction.exec has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AuthDatabase.signIn (cyclomatic 27) · ×1
  • AuthDatabase.signIn (cyclomatic 27) packages/katana_auth/lib/src/auth_database.dart:491 — AuthDatabase.signIn has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelLocaleFilter._hasMatch (cyclomatic 27) · ×1
  • ModelLocaleFilter._hasMatch (cyclomatic 27) packages/katana_model/lib/src/model_locale.dart:807 — ModelLocaleFilter._hasMatch has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _AIDebugOverlayState._buildPromptPanel (cyclomatic 27) · ×1
  • _AIDebugOverlayState._buildPromptPanel (cyclomatic 27) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1062 — _AIDebugOverlayState._buildPromptPanel has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MarkdownFieldState._adjustSelectionForLinksAndMentions (cyclomatic 27) · ×1
  • MarkdownFieldState._adjustSelectionForLinksAndMentions (cyclomatic 27) packages/masamune_markdown/lib/src/markdown_field.dart:574 — MarkdownFieldState._adjustSelectionForLinksAndMentions has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UniversalExtentAppBar.build (cyclomatic 27) · ×1
  • UniversalExtentAppBar.build (cyclomatic 27) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2058 — UniversalExtentAppBar.build has cyclomatic complexity 27 (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 · FirebaseLoggerAdapter.send (cyclomatic 26) · ×1
  • FirebaseLoggerAdapter.send (cyclomatic 26) packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:70 — FirebaseLoggerAdapter.send 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 · FirebaseTermsAndPrivacyCliAction.exec (cyclomatic 25) · ×1
  • FirebaseTermsAndPrivacyCliAction.exec (cyclomatic 25) packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:56 — FirebaseTermsAndPrivacyCliAction.exec 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 · CollectionBase.handledOnUpdate (cyclomatic 25) · ×1
  • CollectionBase.handledOnUpdate (cyclomatic 25) packages/katana_model/lib/src/collection_base.dart:527 — CollectionBase.handledOnUpdate 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 · ModelFieldValue.fromMap (cyclomatic 25) · ×1
  • ModelFieldValue.fromMap (cyclomatic 25) packages/katana_model/lib/src/model_field_value.dart:197 — ModelFieldValue.fromMap 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 · _CalendarState._buildCell (cyclomatic 25) · ×1
  • _CalendarState._buildCell (cyclomatic 25) packages/masamune_calendar/lib/src/calendar.dart:722 — _CalendarState._buildCell 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 · FormPainterToolbarState.toggleMode (cyclomatic 25) · ×1
  • FormPainterToolbarState.toggleMode (cyclomatic 25) packages/masamune_painter/lib/src/form_painter_toolbar.dart:170 — FormPainterToolbarState.toggleMode 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 · AppKeystoreCliAction.exec (cyclomatic 24) · ×1
  • AppKeystoreCliAction.exec (cyclomatic 24) packages/katana_cli/lib/action/app/keystore.dart:32 — AppKeystoreCliAction.exec has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _InternalPickerWidgetState._buildViews (cyclomatic 24) · ×1
  • _InternalPickerWidgetState._buildViews (cyclomatic 24) packages/katana_form/lib/src/picker/picker.dart:513 — _InternalPickerWidgetState._buildViews 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 · FirebaseInitCliAction.validateLocal (cyclomatic 23) · ×1
  • FirebaseInitCliAction.validateLocal (cyclomatic 23) packages/katana_cli/lib/action/firebase/init.dart:367 — FirebaseInitCliAction.validateLocal has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DurableObjectListening._applySnapshot (cyclomatic 23) · ×1
  • _DurableObjectListening._applySnapshot (cyclomatic 23) packages/masamune_model_do/lib/adapters/listenable_durable_object.dart:97 — _DurableObjectListening._applySnapshot has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppInfo.apply (cyclomatic 23) · ×1
  • AppInfo.apply (cyclomatic 23) packages/katana_cli/lib/src/app_info.dart:18 — AppInfo.apply has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelCounterFilter.hasMatch (cyclomatic 23) · ×1
  • ModelCounterFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_field_value.dart:793 — ModelCounterFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, ModelTimeFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelTimestampFilter.hasMatch (cyclomatic 23) · ×1
  • ModelTimestampFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_field_value.dart:1197 — ModelTimestampFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelDateFilter.hasMatch, ModelTimeFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelDateFilter.hasMatch (cyclomatic 23) · ×1
  • ModelDateFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_field_value.dart:1580 — ModelDateFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelTimeFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelTimeFilter.hasMatch (cyclomatic 23) · ×1
  • ModelTimeFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_field_value.dart:2020 — ModelTimeFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelTimestampRangeFilter.hasMatch (cyclomatic 23) · ×1
  • ModelTimestampRangeFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_field_value.dart:2380 — ModelTimestampRangeFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelDateRangeFilter.hasMatch (cyclomatic 23) · ×1
  • ModelDateRangeFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_field_value.dart:2711 — ModelDateRangeFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelTimeRangeFilter.hasMatch (cyclomatic 23) · ×1
  • ModelTimeRangeFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_field_value.dart:3055 — ModelTimeRangeFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelGeoValueFilter.hasMatch (cyclomatic 23) · ×1
  • ModelGeoValueFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_geo_value.dart:206 — ModelGeoValueFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelImageUriFilter.hasMatch (cyclomatic 23) · ×1
  • ModelImageUriFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_uri.dart:202 — ModelImageUriFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (ModelVideoUriFilter.hasMatch, ModelUriFilter.hasMatch) 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.
D1 · Cyclomatic Complexity · ModelImageUriFilter._hasMatch (cyclomatic 23) · ×1
  • ModelImageUriFilter._hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_uri.dart:257 — ModelImageUriFilter._hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelVideoUriFilter._hasMatch, ModelUriFilter._hasMatch) 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.
D1 · Cyclomatic Complexity · ModelVideoUriFilter.hasMatch (cyclomatic 23) · ×1
  • ModelVideoUriFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_uri.dart:498 — ModelVideoUriFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (ModelImageUriFilter.hasMatch, ModelUriFilter.hasMatch) 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.
D1 · Cyclomatic Complexity · ModelVideoUriFilter._hasMatch (cyclomatic 23) · ×1
  • ModelVideoUriFilter._hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_uri.dart:553 — ModelVideoUriFilter._hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelImageUriFilter._hasMatch, ModelUriFilter._hasMatch) 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.
D1 · Cyclomatic Complexity · ModelUriFilter.hasMatch (cyclomatic 23) · ×1
  • ModelUriFilter.hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_uri.dart:807 — ModelUriFilter.hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (ModelImageUriFilter.hasMatch, ModelVideoUriFilter.hasMatch) 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.
D1 · Cyclomatic Complexity · ModelUriFilter._hasMatch (cyclomatic 23) · ×1
  • ModelUriFilter._hasMatch (cyclomatic 23) packages/katana_model/lib/src/model_uri.dart:862 — ModelUriFilter._hasMatch has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelImageUriFilter._hasMatch, ModelVideoUriFilter._hasMatch) 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.
D1 · Cyclomatic Complexity · _RenderMarkdownEditor._paintChildren (cyclomatic 23) · ×1
  • _RenderMarkdownEditor._paintChildren (cyclomatic 23) packages/masamune_markdown/lib/src/markdown_field.dart:3301 — _RenderMarkdownEditor._paintChildren has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FormDurationFieldPicker.build (cyclomatic 22) · ×1
  • FormDurationFieldPicker.build (cyclomatic 22) packages/katana_form/lib/form/form_duration_field.dart:1051 — FormDurationFieldPicker.build has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _MasamuneScopedQueryMustPassToAppropriateRef.run (cyclomatic 22) · ×1
  • _MasamuneScopedQueryMustPassToAppropriateRef.run (cyclomatic 22) packages/masamune_lints/lib/masamune/masamune_scoped_query_must_pass_to_appropriate_ref.dart:77 — _MasamuneScopedQueryMustPassToAppropriateRef.run 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 · _MasamuneShouldUseUniversalWidget._isInUniversalScaffoldBody (cyclomatic 22) · ×1
  • _MasamuneShouldUseUniversalWidget._isInUniversalScaffoldBody (cyclomatic 22) packages/masamune_lints/lib/masamune/masamune_should_use_universal_widget.dart:142 — _MasamuneShouldUseUniversalWidget._isInUniversalScaffoldBody 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 · AndroidManifestPlaceholderSynchronizer._findGradleBlock (cyclomatic 22) · ×1
  • AndroidManifestPlaceholderSynchronizer._findGradleBlock (cyclomatic 22) packages/katana_cli/lib/src/android_manifest.dart:171 — AndroidManifestPlaceholderSynchronizer._findGradleBlock 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 · _ImageProviderBuilderMixin.call (cyclomatic 22) · ×1
  • _ImageProviderBuilderMixin.call (cyclomatic 22) packages/katana_theme/lib/src/others/asset.dart:219 — _ImageProviderBuilderMixin.call 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 · MarkdownClipboard.paste (cyclomatic 22) · ×1
  • MarkdownClipboard.paste (cyclomatic 22) packages/masamune_markdown/lib/src/markdown_clipboard.dart:167 — MarkdownClipboard.paste 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 · _RenderMarkdownEditor._getTextOffsetForPosition (cyclomatic 22) · ×1
  • _RenderMarkdownEditor._getTextOffsetForPosition (cyclomatic 22) packages/masamune_markdown/lib/src/markdown_field.dart:3544 — _RenderMarkdownEditor._getTextOffsetForPosition 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 · MarkdownLineValue._parseInlineMarkdown (cyclomatic 22) · ×1
  • MarkdownLineValue._parseInlineMarkdown (cyclomatic 22) packages/masamune_markdown/lib/src/markdown_value.dart:364 — MarkdownLineValue._parseInlineMarkdown 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 · Breakpoint.width (cyclomatic 22) · ×1
  • Breakpoint.width (cyclomatic 22) packages/masamune_universal_ui/lib/src/breakpoint.dart:52 — Breakpoint.width has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UniversalAppBar.buildUnsliverAppBar (cyclomatic 22) · ×1
  • UniversalAppBar.buildUnsliverAppBar (cyclomatic 22) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:944 — UniversalAppBar.buildUnsliverAppBar has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ModelMigrateCliCommand.exec (cyclomatic 21) · ×1
  • ModelMigrateCliCommand.exec (cyclomatic 21) packages/katana_cli/lib/action/cloudflare/d1.dart:83 — ModelMigrateCliCommand.exec has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TidbMigrateCliCommand.exec (cyclomatic 21) · ×1
  • TidbMigrateCliCommand.exec (cyclomatic 21) packages/katana_cli/lib/action/cloudflare/tidb.dart:84 — TidbMigrateCliCommand.exec has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FirestoreModelAdapter._collectionReference (cyclomatic 21) · ×1
  • FirestoreModelAdapter._collectionReference (cyclomatic 21) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:983 — FirestoreModelAdapter._collectionReference 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 · ModelTimestampFilter._hasMatch (cyclomatic 21) · ×1
  • ModelTimestampFilter._hasMatch (cyclomatic 21) packages/katana_model/lib/src/model_field_value.dart:1255 — ModelTimestampFilter._hasMatch has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 4 other methods here (ModelDateFilter._hasMatch, ModelTimeFilter._hasMatch, ModelSearchFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelDateFilter._hasMatch (cyclomatic 21) · ×1
  • ModelDateFilter._hasMatch (cyclomatic 21) packages/katana_model/lib/src/model_field_value.dart:1638 — ModelDateFilter._hasMatch has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 4 other methods here (ModelTimestampFilter._hasMatch, ModelTimeFilter._hasMatch, ModelSearchFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelTimeFilter._hasMatch (cyclomatic 21) · ×1
  • ModelTimeFilter._hasMatch (cyclomatic 21) packages/katana_model/lib/src/model_field_value.dart:2078 — ModelTimeFilter._hasMatch has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 4 other methods here (ModelTimestampFilter._hasMatch, ModelDateFilter._hasMatch, ModelSearchFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelSearchFilter._hasMatch (cyclomatic 21) · ×1
  • ModelSearchFilter._hasMatch (cyclomatic 21) packages/katana_model/lib/src/model_field_value.dart:3334 — ModelSearchFilter._hasMatch has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 4 other methods here (ModelTimestampFilter._hasMatch, ModelDateFilter._hasMatch, ModelTimeFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelTokenFilter._hasMatch (cyclomatic 21) · ×1
  • ModelTokenFilter._hasMatch (cyclomatic 21) packages/katana_model/lib/src/model_field_value.dart:3586 — ModelTokenFilter._hasMatch has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 4 other methods here (ModelTimestampFilter._hasMatch, ModelDateFilter._hasMatch, ModelTimeFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ModelRefFilter._hasMatch (cyclomatic 21) · ×1
  • ModelRefFilter._hasMatch (cyclomatic 21) packages/katana_model/lib/src/model_ref.dart:412 — ModelRefFilter._hasMatch has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FirestoreModelFieldValueConverter.filterQuery (cyclomatic 21) · ×1
  • FirestoreModelFieldValueConverter.filterQuery (cyclomatic 21) packages/katana_model_firestore/lib/src/firestore_model_field_value_converter.dart:157 — FirestoreModelFieldValueConverter.filterQuery has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · CloudflareStorageCliAction.validateLocal (cyclomatic 20) · ×1
  • CloudflareStorageCliAction.validateLocal (cyclomatic 20) packages/katana_cli/lib/action/cloudflare/storage.dart:183 — CloudflareStorageCliAction.validateLocal has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CloudflareTursoCliAction.parseTursoGroups (cyclomatic 20) · ×1
  • CloudflareTursoCliAction.parseTursoGroups (cyclomatic 20) packages/katana_cli/lib/action/cloudflare/turso.dart:520 — CloudflareTursoCliAction.parseTursoGroups has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CsvDocumentSourceModelAdapter.fromCsv (cyclomatic 20) · ×1
  • CsvDocumentSourceModelAdapter.fromCsv (cyclomatic 20) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:285 — CsvDocumentSourceModelAdapter.fromCsv has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TursoModelAdapter.runAtomicTransaction (cyclomatic 20) · ×1
  • TursoModelAdapter.runAtomicTransaction (cyclomatic 20) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1311 — TursoModelAdapter.runAtomicTransaction has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FirestoreModelDateRangeConverter.convertFrom (cyclomatic 20) · ×1
  • FirestoreModelDateRangeConverter.convertFrom (cyclomatic 20) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:16 — FirestoreModelDateRangeConverter.convertFrom has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FirestoreModelTimeRangeConverter.convertFrom (cyclomatic 20) · ×1
  • FirestoreModelTimeRangeConverter.convertFrom (cyclomatic 20) packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:16 — FirestoreModelTimeRangeConverter.convertFrom has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FirestoreModelTimestampRangeConverter.convertFrom (cyclomatic 20) · ×1
  • FirestoreModelTimestampRangeConverter.convertFrom (cyclomatic 20) packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:16 — FirestoreModelTimestampRangeConverter.convertFrom has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _FormTextFieldState.build (cyclomatic 20) · ×1
  • _FormTextFieldState.build (cyclomatic 20) packages/katana_form/lib/form/form_text_field.dart:730 — _FormTextFieldState.build has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _RenderMarkdownEditor._handleTapUp (cyclomatic 20) · ×1
  • _RenderMarkdownEditor._handleTapUp (cyclomatic 20) packages/masamune_markdown/lib/src/markdown_field.dart:4160 — _RenderMarkdownEditor._handleTapUp has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppP12CliAction.exec (cyclomatic 19) · ×1
  • AppP12CliAction.exec (cyclomatic 19) packages/katana_cli/lib/action/app/p12.dart:31 — AppP12CliAction.exec 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 · EcosystemCliAction.exec (cyclomatic 19) · ×1
  • EcosystemCliAction.exec (cyclomatic 19) packages/katana_cli/lib/action/ecosystem/ecosystem.dart:45 — EcosystemCliAction.exec 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 · SaveDocumentModelRestApiQuery.process (cyclomatic 19) · ×1
  • SaveDocumentModelRestApiQuery.process (cyclomatic 19) packages/katana_model/lib/adapter/rest_api_model_adapter.dart:799 — SaveDocumentModelRestApiQuery.process 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 · JsonCollectionSourceModelAdapter.fromJson (cyclomatic 19) · ×1
  • JsonCollectionSourceModelAdapter.fromJson (cyclomatic 19) packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:119 — JsonCollectionSourceModelAdapter.fromJson 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 · _DoSubscription.start (cyclomatic 19) · ×1
  • _DoSubscription.start (cyclomatic 19) packages/masamune_model_do/lib/adapters/listenable_durable_object.dart:268 — _DoSubscription.start has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DatabaseValidator.onSaveDocument (cyclomatic 19) · ×1
  • DatabaseValidator.onSaveDocument (cyclomatic 19) packages/katana_model/lib/src/database_validator.dart:229 — DatabaseValidator.onSaveDocument 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 · ModelDateRangeFilter._hasMatch (cyclomatic 19) · ×1
  • ModelDateRangeFilter._hasMatch (cyclomatic 19) packages/katana_model/lib/src/model_field_value.dart:2766 — ModelDateRangeFilter._hasMatch has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ModelLocaleFilter.hasMatch (cyclomatic 19) · ×1
  • ModelLocaleFilter.hasMatch (cyclomatic 19) packages/katana_model/lib/src/model_locale.dart:757 — ModelLocaleFilter.hasMatch 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 · ModelRefFilter.hasMatch (cyclomatic 19) · ×1
  • ModelRefFilter.hasMatch (cyclomatic 19) packages/katana_model/lib/src/model_ref.dart:362 — ModelRefFilter.hasMatch 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 · ModelServerCommandBaseFilter.hasMatch (cyclomatic 19) · ×1
  • ModelServerCommandBaseFilter.hasMatch (cyclomatic 19) packages/katana_model/lib/src/model_server_command.dart:269 — ModelServerCommandBaseFilter.hasMatch 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 · NoSqlDatabase.replace (cyclomatic 19) · ×1
  • NoSqlDatabase.replace (cyclomatic 19) packages/katana_model/lib/src/no_sql_database.dart:927 — NoSqlDatabase.replace 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 · FormMarkdownToolbarState._buildPrimaryTools (cyclomatic 19) · ×1
  • FormMarkdownToolbarState._buildPrimaryTools (cyclomatic 19) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:428 — FormMarkdownToolbarState._buildPrimaryTools 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 · AppCsrCliAction.exec (cyclomatic 18) · ×1
  • AppCsrCliAction.exec (cyclomatic 18) packages/katana_cli/lib/action/app/csr.dart:31 — AppCsrCliAction.exec 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 · FirebaseFirestoreCliAction.synchronizeFirestoreConfig (cyclomatic 18) · ×1
  • FirebaseFirestoreCliAction.synchronizeFirestoreConfig (cyclomatic 18) packages/katana_cli/lib/action/firebase/firestore.dart:49 — FirebaseFirestoreCliAction.synchronizeFirestoreConfig 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 · FirestoreModelTimestampConverter.convertTo (cyclomatic 18) · ×1
  • FirestoreModelTimestampConverter.convertTo (cyclomatic 18) packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:114 — FirestoreModelTimestampConverter.convertTo 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 · CollectionModelGenerator.generateForAnnotatedElement (cyclomatic 18) · ×1
  • CollectionModelGenerator.generateForAnnotatedElement (cyclomatic 18) packages/masamune_builder/lib/generator/collection_model_generator.dart:13 — CollectionModelGenerator.generateForAnnotatedElement 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 · WranglerEnvironmentSynchronizer._routeEntries (cyclomatic 18) · ×1
  • WranglerEnvironmentSynchronizer._routeEntries (cyclomatic 18) packages/katana_cli/lib/src/cloudflare_environment.dart:507 — WranglerEnvironmentSynchronizer._routeEntries 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 · _DateTimePickerAdapter.buildItem (cyclomatic 18) · ×1
  • _DateTimePickerAdapter.buildItem (cyclomatic 18) packages/katana_form/lib/src/picker/picker.dart:1541 — _DateTimePickerAdapter.buildItem 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 · MarkdownController.hasInlineProperty (cyclomatic 18) · ×1
  • MarkdownController.hasInlineProperty (cyclomatic 18) packages/masamune_markdown/lib/src/markdown_controller.dart:2823 — MarkdownController.hasInlineProperty 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 · _MasamuneModelTidbBuilder.build (cyclomatic 18) · ×1
  • _MasamuneModelTidbBuilder.build (cyclomatic 18) packages/masamune_model_tidb_builder/lib/src/builder.dart:12 — _MasamuneModelTidbBuilder.build has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · StripePurchase.confirm (cyclomatic 18) · ×1
  • StripePurchase.confirm (cyclomatic 18) packages/masamune_purchase_stripe/lib/src/stripe_purchase.dart:191 — StripePurchase.confirm 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 · _ReorderableListBuilderState._reorder (cyclomatic 18) · ×1
  • _ReorderableListBuilderState._reorder (cyclomatic 18) packages/masamune/lib/ui/reorderable_list_builder.dart:392 — _ReorderableListBuilderState._reorder 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 · CloudflareDeployCliAction._deployWorkers (cyclomatic 17) · ×1
  • CloudflareDeployCliAction._deployWorkers (cyclomatic 17) packages/katana_cli/lib/action/cloudflare/deploy.dart:73 — CloudflareDeployCliAction._deployWorkers 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 · FirebaseAuthAdapter.confirmSignIn (cyclomatic 17) · ×1
  • FirebaseAuthAdapter.confirmSignIn (cyclomatic 17) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:805 — FirebaseAuthAdapter.confirmSignIn 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 · TursoModelAdapter._withDirectClient (cyclomatic 17) · ×1
  • TursoModelAdapter._withDirectClient (cyclomatic 17) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1989 — TursoModelAdapter._withDirectClient 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 · GitPullRequestCliCommand.exec (cyclomatic 17) · ×1
  • GitPullRequestCliCommand.exec (cyclomatic 17) packages/katana_cli/lib/command/git/pull_request.dart:20 — GitPullRequestCliCommand.exec 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 · _MasamuneCollectionModelShouldAddLimitQuery.run (cyclomatic 17) · ×1
  • _MasamuneCollectionModelShouldAddLimitQuery.run (cyclomatic 17) packages/masamune_lints/lib/masamune/masamune_collection_model_should_add_limit_query.dart:13 — _MasamuneCollectionModelShouldAddLimitQuery.run 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 · AndroidManifestQuerySynchronizer.apply (cyclomatic 17) · ×1
  • AndroidManifestQuerySynchronizer.apply (cyclomatic 17) packages/katana_cli/lib/src/android_manifest.dart:567 — AndroidManifestQuerySynchronizer.apply 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 · XCodePrivacyManifests.setPrivacyManifestToXCode (cyclomatic 17) · ×1
  • XCodePrivacyManifests.setPrivacyManifestToXCode (cyclomatic 17) packages/katana_cli/lib/src/xcode.dart:792 — XCodePrivacyManifests.setPrivacyManifestToXCode 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 · ModelCounterFilter._hasMatch (cyclomatic 17) · ×1
  • ModelCounterFilter._hasMatch (cyclomatic 17) packages/katana_model/lib/src/model_field_value.dart:851 — ModelCounterFilter._hasMatch has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelTimestampRangeFilter._hasMatch, ModelTimeRangeFilter._hasMatch) 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.
D1 · Cyclomatic Complexity · ModelTimestampRangeFilter._hasMatch (cyclomatic 17) · ×1
  • ModelTimestampRangeFilter._hasMatch (cyclomatic 17) packages/katana_model/lib/src/model_field_value.dart:2435 — ModelTimestampRangeFilter._hasMatch has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelCounterFilter._hasMatch, ModelTimeRangeFilter._hasMatch) 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.
D1 · Cyclomatic Complexity · ModelTimeRangeFilter._hasMatch (cyclomatic 17) · ×1
  • ModelTimeRangeFilter._hasMatch (cyclomatic 17) packages/katana_model/lib/src/model_field_value.dart:3110 — ModelTimeRangeFilter._hasMatch has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelCounterFilter._hasMatch, ModelTimestampRangeFilter._hasMatch) 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.
D1 · Cyclomatic Complexity · ModelServerCommandBaseFilter._hasMatch (cyclomatic 17) · ×1
  • ModelServerCommandBaseFilter._hasMatch (cyclomatic 17) packages/katana_model/lib/src/model_server_command.dart:319 — ModelServerCommandBaseFilter._hasMatch has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MarkdownFieldState._findTextDifference (cyclomatic 17) · ×1
  • MarkdownFieldState._findTextDifference (cyclomatic 17) packages/masamune_markdown/lib/src/markdown_field.dart:1912 — MarkdownFieldState._findTextDifference 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 · _MasamuneModelDocsBuilder.build (cyclomatic 17) · ×1
  • _MasamuneModelDocsBuilder.build (cyclomatic 17) packages/masamune_model_docs_builder/lib/src/builder.dart:42 — _MasamuneModelDocsBuilder.build 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 · FormPainterFieldState._getResizeDirection (cyclomatic 17) · ×1
  • FormPainterFieldState._getResizeDirection (cyclomatic 17) packages/masamune_painter/lib/src/form_painter_field.dart:694 — FormPainterFieldState._getResizeDirection has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PainterController.moveSelectedLayersForward (cyclomatic 17) · ×1
  • PainterController.moveSelectedLayersForward (cyclomatic 17) packages/masamune_painter/lib/src/painter_controller.dart:1379 — PainterController.moveSelectedLayersForward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (PainterController.moveSelectedLayersBackward) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · PainterController.moveSelectedLayersBackward (cyclomatic 17) · ×1
  • PainterController.moveSelectedLayersBackward (cyclomatic 17) packages/masamune_painter/lib/src/painter_controller.dart:1540 — PainterController.moveSelectedLayersBackward has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (PainterController.moveSelectedLayersForward) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · PainterController.rename (cyclomatic 17) · ×1
  • PainterController.rename (cyclomatic 17) packages/masamune_painter/lib/src/painter_controller.dart:1701 — PainterController.rename 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 · SchemaValue.buildQuery (cyclomatic 17) · ×1
  • SchemaValue.buildQuery (cyclomatic 17) packages/masamune_model_firebase_data_connect_builder/lib/value/schema_value.dart:31 — SchemaValue.buildQuery has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · AgoraCliAction.exec (cyclomatic 16) · ×1
  • AgoraCliAction.exec (cyclomatic 16) packages/katana_cli/lib/action/agora/agora.dart:32 — AgoraCliAction.exec 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 · FirebaseAnonymousConfigurationCliAction.exec (cyclomatic 16) · ×1
  • FirebaseAnonymousConfigurationCliAction.exec (cyclomatic 16) packages/katana_cli/lib/action/firebase/anonymous_configuration.dart:24 — FirebaseAnonymousConfigurationCliAction.exec 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 · ListenableFirestoreModelAdapter.listenCollection (cyclomatic 16) · ×1
  • ListenableFirestoreModelAdapter.listenCollection (cyclomatic 16) packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:89 — ListenableFirestoreModelAdapter.listenCollection 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 · PubVersionCliCommand.exec (cyclomatic 16) · ×1
  • PubVersionCliCommand.exec (cyclomatic 16) packages/katana_cli/lib/command/pub/version.dart:22 — PubVersionCliCommand.exec 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 · _DateTextFieldState.didUpdateWidget (cyclomatic 16) · ×1
  • _DateTextFieldState.didUpdateWidget (cyclomatic 16) packages/katana_form/lib/form/form_date_field.dart:844 — _DateTextFieldState.didUpdateWidget 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 · _DateTimeTextFieldState.didUpdateWidget (cyclomatic 16) · ×1
  • _DateTimeTextFieldState.didUpdateWidget (cyclomatic 16) packages/katana_form/lib/form/form_date_time_field.dart:790 — _DateTimeTextFieldState.didUpdateWidget 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 · _DateTimeRangeTextFieldState.didUpdateWidget (cyclomatic 16) · ×1
  • _DateTimeRangeTextFieldState.didUpdateWidget (cyclomatic 16) packages/katana_form/lib/form/form_date_time_range_field.dart:767 — _DateTimeRangeTextFieldState.didUpdateWidget 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 · _DurationTextFieldState.didUpdateWidget (cyclomatic 16) · ×1
  • _DurationTextFieldState.didUpdateWidget (cyclomatic 16) packages/katana_form/lib/form/form_duration_field.dart:794 — _DurationTextFieldState.didUpdateWidget 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 · _FormFutureFieldState.build (cyclomatic 16) · ×1
  • _FormFutureFieldState.build (cyclomatic 16) packages/katana_form/lib/form/form_future_field.dart:338 — _FormFutureFieldState.build 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 · _MonthTextFieldState.didUpdateWidget (cyclomatic 16) · ×1
  • _MonthTextFieldState.didUpdateWidget (cyclomatic 16) packages/katana_form/lib/form/form_month_modal_field.dart:678 — _MonthTextFieldState.didUpdateWidget 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 · RouterGenerator.generateForAnnotatedElement (cyclomatic 16) · ×1
  • RouterGenerator.generateForAnnotatedElement (cyclomatic 16) packages/katana_router_builder/lib/generator/router_generator.dart:17 — RouterGenerator.generateForAnnotatedElement 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 · XCode.createIOSInfoPlistStrings (cyclomatic 16) · ×1
  • XCode.createIOSInfoPlistStrings (cyclomatic 16) packages/katana_cli/lib/src/xcode.dart:180 — XCode.createIOSInfoPlistStrings 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 · _TransitionQueryType.build (cyclomatic 16) · ×1
  • _TransitionQueryType.build (cyclomatic 16) packages/katana_router/lib/src/transition_query_type.dart:151 — _TransitionQueryType.build has cyclomatic complexity 16 (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 · _RenderMarkdownEditor._handleDragUpdate (cyclomatic 16) · ×1
  • _RenderMarkdownEditor._handleDragUpdate (cyclomatic 16) packages/masamune_markdown/lib/src/markdown_field.dart:4450 — _RenderMarkdownEditor._handleDragUpdate 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 · FormPainterToolbarState.inlineMode (cyclomatic 16) · ×1
  • FormPainterToolbarState.inlineMode (cyclomatic 16) packages/masamune_painter/lib/src/form_painter_toolbar.dart:815 — FormPainterToolbarState.inlineMode 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 · PainterController.resizeSelectedValues (cyclomatic 16) · ×1
  • PainterController.resizeSelectedValues (cyclomatic 16) packages/masamune_painter/lib/src/painter_controller.dart:523 — PainterController.resizeSelectedValues 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 · EllipsePaintingValue.paint (cyclomatic 16) · ×1
  • EllipsePaintingValue.paint (cyclomatic 16) packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:103 — EllipsePaintingValue.paint has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RectanglePaintingValue.paint (cyclomatic 16) · ×1
  • RectanglePaintingValue.paint (cyclomatic 16) packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart:103 — RectanglePaintingValue.paint has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D17 · Explicit Debt · TodoComment repeated across 19 files · ×1
  • TodoComment repeated across 19 files packages/katana_cli/lib/command/code/collection.dart:230 — The identical TodoComment appears in 19 files (21 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 21 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO: Write test code.". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D17 · Explicit Debt · TodoComment repeated across 17 files · ×1
  • TodoComment repeated across 17 files packages/katana_cli/lib/command/code/modal.dart:89 — The identical TodoComment appears in 17 files (17 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 17 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO: Implement the view.". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D17 · Explicit Debt · TodoComment repeated across 14 files · ×1
  • TodoComment repeated across 14 files packages/katana_cli/lib/command/code/page.dart:138 — The identical TodoComment appears in 14 files (14 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 14 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO: Implement the variable loading process.". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D2 · Cognitive Complexity · MobilePurchaseMasamuneAdapter.listenPurchase (cognitive 307) · ×1
  • MobilePurchaseMasamuneAdapter.listenPurchase (cognitive 307) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:94 — MobilePurchaseMasamuneAdapter.listenPurchase has cognitive complexity 307 (threshold 15). Drivers by points: if/else 41 (250 pts), match/switch 6 (49 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 255). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FirebaseInitCliAction.exec (cognitive 214) · ×1
  • FirebaseInitCliAction.exec (cognitive 214) packages/katana_cli/lib/action/firebase/init.dart:476 — FirebaseInitCliAction.exec has cognitive complexity 214 (threshold 15). Drivers by points: if/else 95 (166 pts), boolean chains 34, ternaries 6 (9 pts), loops 3 (5 pts) (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownController._replaceTextSingleField (cognitive 211) · ×1
  • MarkdownController._replaceTextSingleField (cognitive 211) packages/masamune_markdown/lib/src/markdown_controller.dart:1000 — MarkdownController._replaceTextSingleField has cognitive complexity 211 (threshold 15). Drivers by points: if/else 53 (103 pts), loops 22 (60 pts), boolean chains 35, ternaries 7 (13 pts) (nesting depth added 94). To reduce it, split the body into named stages: move each independent 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 · FirebaseAuthenticationCliAction.exec (cognitive 210) · ×1
  • FirebaseAuthenticationCliAction.exec (cognitive 210) packages/katana_cli/lib/action/firebase/authentication.dart:45 — FirebaseAuthenticationCliAction.exec has cognitive complexity 210 (threshold 15). Drivers by points: if/else 69 (151 pts), boolean chains 56, loops 1 (3 pts) (nesting depth added 84). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MarkdownController._replaceTextMultiField (cognitive 210) · ×1
  • MarkdownController._replaceTextMultiField (cognitive 210) packages/masamune_markdown/lib/src/markdown_controller.dart:1667 — MarkdownController._replaceTextMultiField has cognitive complexity 210 (threshold 15). Drivers by points: if/else 52 (102 pts), loops 22 (60 pts), boolean chains 35, ternaries 7 (13 pts) (nesting depth added 94). To reduce it, split the body into named stages: move each independent 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 · GithubModelAdapter.loadCollection (cognitive 179) · ×1
  • GithubModelAdapter.loadCollection (cognitive 179) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1444 — GithubModelAdapter.loadCollection has cognitive complexity 179 (threshold 15). Drivers by points: if/else 76 (141 pts), boolean chains 36, loops 1 (2 pts) (nesting depth added 66). To reduce it, split the body into named stages: move each independent 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 · GithubTimelineEvent.toGithubIssueTimelineModelFromTimelineEvent (cognitive 148) · ×1
  • GithubTimelineEvent.toGithubIssueTimelineModelFromTimelineEvent (cognitive 148) packages/masamune_model_github/lib/src/github_timeline_event.dart:205 — GithubTimelineEvent.toGithubIssueTimelineModelFromTimelineEvent has cognitive complexity 148 (threshold 15). Drivers by points: ternaries 38 (110 pts), if/else 19 (37 pts), match/switch 1 (nesting depth added 90). To reduce it, split the body into named stages: move each independent 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 · MarkdownFieldState._getMentionRangeAtOffset (cognitive 145) · ×1
  • MarkdownFieldState._getMentionRangeAtOffset (cognitive 145) packages/masamune_markdown/lib/src/markdown_field.dart:2110 — MarkdownFieldState._getMentionRangeAtOffset has cognitive complexity 145 (threshold 15). Drivers by points: if/else 21 (90 pts), loops 12 (49 pts), boolean chains 6 (nesting depth added 106). To reduce it, split the body into named stages: move each independent 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 (_RenderMarkdownEditor._getMentionRangeAtOffset) 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 · _RenderMarkdownEditor._getMentionRangeAtOffset (cognitive 145) · ×1
  • _RenderMarkdownEditor._getMentionRangeAtOffset (cognitive 145) packages/masamune_markdown/lib/src/markdown_field.dart:3990 — _RenderMarkdownEditor._getMentionRangeAtOffset has cognitive complexity 145 (threshold 15). Drivers by points: if/else 21 (90 pts), loops 12 (49 pts), boolean chains 6 (nesting depth added 106). To reduce it, split the body into named stages: move each independent 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 (MarkdownFieldState._getMentionRangeAtOffset) 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 · GithubModelAdapter.loadDocument (cognitive 139) · ×1
  • GithubModelAdapter.loadDocument (cognitive 139) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1018 — GithubModelAdapter.loadDocument has cognitive complexity 139 (threshold 15). Drivers by points: if/else 56 (96 pts), boolean chains 43 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownController.getLinkRangeBeforeCursor (cognitive 121) · ×1
  • MarkdownController.getLinkRangeBeforeCursor (cognitive 121) packages/masamune_markdown/lib/src/markdown_controller.dart:3844 — MarkdownController.getLinkRangeBeforeCursor has cognitive complexity 121 (threshold 15). Drivers by points: if/else 19 (80 pts), loops 10 (37 pts), boolean chains 4 (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController.getMentionRangeBeforeCursor) 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 · MarkdownController.getMentionRangeBeforeCursor (cognitive 121) · ×1
  • MarkdownController.getMentionRangeBeforeCursor (cognitive 121) packages/masamune_markdown/lib/src/markdown_controller.dart:4030 — MarkdownController.getMentionRangeBeforeCursor has cognitive complexity 121 (threshold 15). Drivers by points: if/else 19 (80 pts), loops 10 (37 pts), boolean chains 4 (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController.getLinkRangeBeforeCursor) 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 · MarkdownFieldState._getLinkRangeAtOffset (cognitive 121) · ×1
  • MarkdownFieldState._getLinkRangeAtOffset (cognitive 121) packages/masamune_markdown/lib/src/markdown_field.dart:1975 — MarkdownFieldState._getLinkRangeAtOffset has cognitive complexity 121 (threshold 15). Drivers by points: if/else 19 (80 pts), loops 10 (37 pts), boolean chains 4 (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_RenderMarkdownEditor._getLinkRangeAtOffset) 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 · _RenderMarkdownEditor._getLinkRangeAtOffset (cognitive 121) · ×1
  • _RenderMarkdownEditor._getLinkRangeAtOffset (cognitive 121) packages/masamune_markdown/lib/src/markdown_field.dart:3853 — _RenderMarkdownEditor._getLinkRangeAtOffset has cognitive complexity 121 (threshold 15). Drivers by points: if/else 19 (80 pts), loops 10 (37 pts), boolean chains 4 (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownFieldState._getLinkRangeAtOffset) 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 · _MasamuneModelShouldShowIndicatorWhileLoading.run (cognitive 119) · ×1
  • _MasamuneModelShouldShowIndicatorWhileLoading.run (cognitive 119) packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:13 — _MasamuneModelShouldShowIndicatorWhileLoading.run has cognitive complexity 119 (threshold 15). Drivers by points: if/else 38 (81 pts), boolean chains 14, loops 7 (13 pts), ternaries 4 (6 pts), match/switch 4 (5 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalizeLoader.load (cognitive 119) · ×1
  • LocalizeLoader.load (cognitive 119) packages/katana_localization_builder/lib/src/loader.dart:47 — LocalizeLoader.load has cognitive complexity 119 (threshold 15). Drivers by points: if/else 21 (80 pts), loops 13 (34 pts), boolean chains 4, match/switch 1 (nesting depth added 80). 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 · AppDeeplinkCliAction.exec (cognitive 111) · ×1
  • AppDeeplinkCliAction.exec (cognitive 111) packages/katana_cli/lib/action/app/deeplink.dart:34 — AppDeeplinkCliAction.exec has cognitive complexity 111 (threshold 15). Drivers by points: if/else 33 (66 pts), boolean chains 34, loops 4 (9 pts), ternaries 1 (2 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoSqlDatabase.notifyDocuments (cognitive 109) · ×1
  • NoSqlDatabase.notifyDocuments (cognitive 109) packages/katana_model/lib/src/no_sql_database.dart:1058 — NoSqlDatabase.notifyDocuments has cognitive complexity 109 (threshold 15). Drivers by points: if/else 19 (63 pts), ternaries 6 (34 pts), loops 3 (6 pts), match/switch 2 (6 pts) (nesting depth added 79). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _RenderMarkdownEditor.paint (cognitive 102) · ×1
  • _RenderMarkdownEditor.paint (cognitive 102) packages/masamune_markdown/lib/src/markdown_field.dart:2964 — _RenderMarkdownEditor.paint has cognitive complexity 102 (threshold 15). Drivers by points: if/else 28 (66 pts), boolean chains 24, loops 5 (12 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PurchaseCliAction.exec (cognitive 100) · ×1
  • PurchaseCliAction.exec (cognitive 100) packages/katana_cli/lib/action/purchase/purchase.dart:42 — PurchaseCliAction.exec has cognitive complexity 100 (threshold 15). Drivers by points: if/else 43 (89 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseAuthAdapter.signIn (cognitive 97) · ×1
  • FirebaseAuthAdapter.signIn (cognitive 97) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:550 — FirebaseAuthAdapter.signIn has cognitive complexity 97 (threshold 15). Drivers by points: if/else 47 (86 pts), boolean chains 9, ternaries 1 (2 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownController._insertNewLineSingleField (cognitive 97) · ×1
  • MarkdownController._insertNewLineSingleField (cognitive 97) packages/masamune_markdown/lib/src/markdown_controller.dart:3146 — MarkdownController._insertNewLineSingleField has cognitive complexity 97 (threshold 15). Drivers by points: if/else 29 (76 pts), loops 7 (20 pts), boolean chains 1 (nesting depth added 60). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (MarkdownController._insertNewLineMultiField) 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 · MarkdownController._insertNewLineMultiField (cognitive 97) · ×1
  • MarkdownController._insertNewLineMultiField (cognitive 97) packages/masamune_markdown/lib/src/markdown_controller.dart:3441 — MarkdownController._insertNewLineMultiField has cognitive complexity 97 (threshold 15). Drivers by points: if/else 29 (76 pts), loops 7 (20 pts), boolean chains 1 (nesting depth added 60). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (MarkdownController._insertNewLineSingleField) 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 · AppLocationCliAction.exec (cognitive 89) · ×1
  • AppLocationCliAction.exec (cognitive 89) packages/katana_cli/lib/action/app/location.dart:37 — AppLocationCliAction.exec has cognitive complexity 89 (threshold 15). Drivers by points: if/else 33 (55 pts), ternaries 6 (18 pts), boolean chains 16 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownFieldState.updateEditingValue (cognitive 88) · ×1
  • MarkdownFieldState.updateEditingValue (cognitive 88) packages/masamune_markdown/lib/src/markdown_field.dart:752 — MarkdownFieldState.updateEditingValue has cognitive complexity 88 (threshold 15). Drivers by points: if/else 32 (65 pts), boolean chains 18, loops 1 (4 pts), ternaries 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent 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 · StripeCliAction.exec (cognitive 84) · ×1
  • StripeCliAction.exec (cognitive 84) packages/katana_cli/lib/action/stripe/stripe.dart:35 — StripeCliAction.exec has cognitive complexity 84 (threshold 15). Drivers by points: if/else 39 (63 pts), boolean chains 14, loops 2 (4 pts), match/switch 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownFieldState._adjustSelectionForLinksAndMentions (cognitive 81) · ×1
  • MarkdownFieldState._adjustSelectionForLinksAndMentions (cognitive 81) packages/masamune_markdown/lib/src/markdown_field.dart:574 — MarkdownFieldState._adjustSelectionForLinksAndMentions has cognitive complexity 81 (threshold 15). Drivers by points: if/else 14 (49 pts), loops 5 (18 pts), ternaries 2 (8 pts), boolean chains 6 (nesting depth added 54). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RuleValue._applyAtPath (cognitive 78) · ×1
  • RuleValue._applyAtPath (cognitive 78) packages/masamune_model_firestore_builder/lib/value/rule_value.dart:49 — RuleValue._applyAtPath has cognitive complexity 78 (threshold 15). Drivers by points: if/else 16 (38 pts), ternaries 5 (27 pts), boolean chains 5, loops 2 (5 pts), match/switch 1 (3 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StoreScreenshotCliCommand.exec (cognitive 77) · ×1
  • StoreScreenshotCliCommand.exec (cognitive 77) packages/katana_cli/lib/command/store/screenshot.dart:85 — StoreScreenshotCliCommand.exec has cognitive complexity 77 (threshold 15). Drivers by points: if/else 28 (57 pts), loops 6 (19 pts), boolean chains 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent 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 · ModelQueryFilter._hasMatchValue (cognitive 74) · ×1
  • ModelQueryFilter._hasMatchValue (cognitive 74) packages/katana_model/lib/src/model_query.dart:1558 — ModelQueryFilter._hasMatchValue has cognitive complexity 74 (threshold 15). Drivers by points: if/else 27 (51 pts), boolean chains 19, loops 2 (3 pts), match/switch 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareTidbCliAction._applyDirect (cognitive 72) · ×1
  • CloudflareTidbCliAction._applyDirect (cognitive 72) packages/katana_cli/lib/action/cloudflare/tidb.dart:642 — CloudflareTidbCliAction._applyDirect has cognitive complexity 72 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 16, ternaries 10 (13 pts), error handling 5 (10 pts), loops 2 (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _DateTimePickerAdapter.getLength (cognitive 72) · ×1
  • _DateTimePickerAdapter.getLength (cognitive 72) packages/katana_form/lib/src/picker/picker.dart:1430 — _DateTimePickerAdapter.getLength has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 10 (45 pts), if/else 10 (19 pts), boolean chains 7, match/switch 1 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UniversalAppBar.build (cognitive 72) · ×1
  • UniversalAppBar.build (cognitive 72) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:521 — UniversalAppBar.build has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 18 (37 pts), boolean chains 20, if/else 10 (15 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeAppTarget.apply (cognitive 71) · ×1
  • NativeAppTarget.apply (cognitive 71) packages/katana_cli/lib/src/native_environment.dart:359 — NativeAppTarget.apply has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 17, ternaries 4 (10 pts), loops 5 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelQuery.seekIndex (cognitive 71) · ×1
  • ModelQuery.seekIndex (cognitive 71) packages/katana_model/lib/src/model_query.dart:908 — ModelQuery.seekIndex has cognitive complexity 71 (threshold 15). Drivers by points: if/else 23 (58 pts), boolean chains 8, loops 2 (4 pts), match/switch 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseMessagingCliAction.exec (cognitive 70) · ×1
  • FirebaseMessagingCliAction.exec (cognitive 70) packages/katana_cli/lib/action/firebase/messaging.dart:93 — FirebaseMessagingCliAction.exec has cognitive complexity 70 (threshold 15). Drivers by points: if/else 35 (48 pts), boolean chains 20, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GithubModelAdapter.saveDocument (cognitive 68) · ×1
  • GithubModelAdapter.saveDocument (cognitive 68) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2014 — GithubModelAdapter.saveDocument has cognitive complexity 68 (threshold 15). Drivers by points: if/else 33 (51 pts), boolean chains 14, ternaries 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownClipboard._pasteSpansWithProperties (cognitive 66) · ×1
  • MarkdownClipboard._pasteSpansWithProperties (cognitive 66) packages/masamune_markdown/lib/src/markdown_clipboard.dart:298 — MarkdownClipboard._pasteSpansWithProperties has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (53 pts), loops 4 (9 pts), boolean chains 4 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UniversalAvatarAppBarDelegate.build (cognitive 66) · ×1
  • _UniversalAvatarAppBarDelegate.build (cognitive 66) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:1561 — _UniversalAvatarAppBarDelegate.build has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 27, ternaries 19 (21 pts), if/else 13 (18 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · JsonCollectionSourceModelAdapter.fromJson (cognitive 65) · ×1
  • JsonCollectionSourceModelAdapter.fromJson (cognitive 65) packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:119 — JsonCollectionSourceModelAdapter.fromJson has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (55 pts), loops 4 (10 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AgoraController._joinRoom (cognitive 65) · ×1
  • AgoraController._joinRoom (cognitive 65) packages/masamune_agora/lib/src/agora_controller.dart:528 — AgoraController._joinRoom has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (54 pts), boolean chains 6, error handling 2 (3 pts), loops 1 (2 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CloudflareD1CliAction.exec (cognitive 64) · ×1
  • CloudflareD1CliAction.exec (cognitive 64) packages/katana_cli/lib/action/cloudflare/d1.dart:190 — CloudflareD1CliAction.exec has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (42 pts), boolean chains 15, loops 3 (5 pts), ternaries 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownFieldState.build (cognitive 64) · ×1
  • MarkdownFieldState.build (cognitive 64) packages/masamune_markdown/lib/src/markdown_field.dart:1235 — MarkdownFieldState.build has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 26, ternaries 8 (10 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ModelFieldValue.fromMap (cognitive 62) · ×1
  • ModelFieldValue.fromMap (cognitive 62) packages/katana_model/lib/src/model_field_value.dart:197 — ModelFieldValue.fromMap has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (47 pts), loops 4 (10 pts), boolean chains 5 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDynamicLinksCliAction.exec (cognitive 59) · ×1
  • FirebaseDynamicLinksCliAction.exec (cognitive 59) packages/katana_cli/lib/action/firebase/dynamic_links.dart:33 — FirebaseDynamicLinksCliAction.exec has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 19, loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareInitCliAction.exec (cognitive 58) · ×1
  • CloudflareInitCliAction.exec (cognitive 58) packages/katana_cli/lib/action/cloudflare/init.dart:60 — CloudflareInitCliAction.exec has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (43 pts), ternaries 5 (9 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CollectionBase.handledOnUpdate (cognitive 58) · ×1
  • CollectionBase.handledOnUpdate (cognitive 58) packages/katana_model/lib/src/collection_base.dart:527 — CollectionBase.handledOnUpdate has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (51 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComposeCliCommand.exec (cognitive 57) · ×1
  • ComposeCliCommand.exec (cognitive 57) packages/katana_cli/lib/command/create.dart:581 — ComposeCliCommand.exec has cognitive complexity 57 (threshold 15). Drivers by points: if/else 37 (43 pts), boolean chains 7, loops 3 (4 pts), error handling 2, ternaries 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _DateTimePickerAdapter.doShow (cognitive 56) · ×1
  • _DateTimePickerAdapter.doShow (cognitive 56) packages/katana_form/lib/src/picker/picker.dart:1627 — _DateTimePickerAdapter.doShow has cognitive complexity 56 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 6 (22 pts), boolean chains 9, match/switch 1 (2 pts), loops 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ImageProviderBuilderMixin.call (cognitive 56) · ×1
  • _ImageProviderBuilderMixin.call (cognitive 56) packages/katana_theme/lib/src/others/asset.dart:219 — _ImageProviderBuilderMixin.call has cognitive complexity 56 (threshold 15). Drivers by points: if/else 31 (54 pts), boolean chains 1, error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MasamuneShouldUseUniversalWidget._isInUniversalScaffoldBody (cognitive 55) · ×1
  • _MasamuneShouldUseUniversalWidget._isInUniversalScaffoldBody (cognitive 55) packages/masamune_lints/lib/masamune/masamune_should_use_universal_widget.dart:142 — _MasamuneShouldUseUniversalWidget._isInUniversalScaffoldBody has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (49 pts), boolean chains 6 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AuthDatabase.signIn (cognitive 55) · ×1
  • AuthDatabase.signIn (cognitive 55) packages/katana_auth/lib/src/auth_database.dart:491 — AuthDatabase.signIn has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (47 pts), boolean chains 8 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _InternalPickerWidgetState._buildViews (cognitive 55) · ×1
  • _InternalPickerWidgetState._buildViews (cognitive 55) packages/katana_form/lib/src/picker/picker.dart:513 — _InternalPickerWidgetState._buildViews has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (36 pts), ternaries 3 (10 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _RenderMarkdownEditor._paintChildren (cognitive 54) · ×1
  • _RenderMarkdownEditor._paintChildren (cognitive 54) packages/masamune_markdown/lib/src/markdown_field.dart:3301 — _RenderMarkdownEditor._paintChildren has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (40 pts), loops 4 (8 pts), boolean chains 6 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareStorageCliAction.exec (cognitive 53) · ×1
  • CloudflareStorageCliAction.exec (cognitive 53) packages/katana_cli/lib/action/cloudflare/storage.dart:227 — CloudflareStorageCliAction.exec has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (34 pts), ternaries 8 (9 pts), boolean chains 6, error handling 2 (4 pts) (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CreateCliCommand.exec (cognitive 52) · ×1
  • CreateCliCommand.exec (cognitive 52) packages/katana_cli/lib/command/create.dart:142 — CreateCliCommand.exec has cognitive complexity 52 (threshold 15). Drivers by points: if/else 36 (42 pts), boolean chains 7, loops 2, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DebugAppCheckTokenCliCommand.exec (cognitive 51) · ×1
  • DebugAppCheckTokenCliCommand.exec (cognitive 51) packages/katana_cli/lib/command/debug/app_check_token.dart:26 — DebugAppCheckTokenCliCommand.exec has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (35 pts), ternaries 4 (10 pts), loops 4 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareTursoCliAction.exec (cognitive 50) · ×1
  • CloudflareTursoCliAction.exec (cognitive 50) packages/katana_cli/lib/action/cloudflare/turso.dart:73 — CloudflareTursoCliAction.exec has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (28 pts), ternaries 8 (11 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _MasamuneScopedQueryMustPassToAppropriateRef.run (cognitive 50) · ×1
  • _MasamuneScopedQueryMustPassToAppropriateRef.run (cognitive 50) packages/masamune_lints/lib/masamune/masamune_scoped_query_must_pass_to_appropriate_ref.dart:77 — _MasamuneScopedQueryMustPassToAppropriateRef.run has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (43 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 30). 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 · FirestoreModelTimestampConverter.convertTo (cognitive 49) · ×1
  • FirestoreModelTimestampConverter.convertTo (cognitive 49) packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:114 — FirestoreModelTimestampConverter.convertTo has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (40 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _MasamuneModelShouldLoad.run (cognitive 49) · ×1
  • _MasamuneModelShouldLoad.run (cognitive 49) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:12 — _MasamuneModelShouldLoad.run has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 7, loops 1, match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppIconCliAction.exec (cognitive 48) · ×1
  • AppIconCliAction.exec (cognitive 48) packages/katana_cli/lib/action/app/icon.dart:89 — AppIconCliAction.exec has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (36 pts), loops 3 (6 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RouterGenerator.generateForAnnotatedElement (cognitive 48) · ×1
  • RouterGenerator.generateForAnnotatedElement (cognitive 48) packages/katana_router_builder/lib/generator/router_generator.dart:17 — RouterGenerator.generateForAnnotatedElement has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (39 pts), loops 3 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderMarkdownEditor._getLinkAtOffset (cognitive 48) · ×1
  • _RenderMarkdownEditor._getLinkAtOffset (cognitive 48) packages/masamune_markdown/lib/src/markdown_field.dart:3734 — _RenderMarkdownEditor._getLinkAtOffset has cognitive complexity 48 (threshold 15). Drivers by points: if/else 6 (27 pts), loops 5 (19 pts), boolean chains 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_RenderMarkdownEditor._getMentionAtOffset) 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 · _RenderMarkdownEditor._getMentionAtOffset (cognitive 48) · ×1
  • _RenderMarkdownEditor._getMentionAtOffset (cognitive 48) packages/masamune_markdown/lib/src/markdown_field.dart:3792 — _RenderMarkdownEditor._getMentionAtOffset has cognitive complexity 48 (threshold 15). Drivers by points: if/else 6 (27 pts), loops 5 (19 pts), boolean chains 2 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_RenderMarkdownEditor._getLinkAtOffset) 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 · MarkdownController._addInlinePropertySingleField (cognitive 46) · ×1
  • MarkdownController._addInlinePropertySingleField (cognitive 46) packages/masamune_markdown/lib/src/markdown_controller.dart:2388 — MarkdownController._addInlinePropertySingleField has cognitive complexity 46 (threshold 15). Drivers by points: if/else 7 (24 pts), ternaries 2 (12 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController._addInlinePropertyMultiField) 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 · MarkdownController._addInlinePropertyMultiField (cognitive 46) · ×1
  • MarkdownController._addInlinePropertyMultiField (cognitive 46) packages/masamune_markdown/lib/src/markdown_controller.dart:2491 — MarkdownController._addInlinePropertyMultiField has cognitive complexity 46 (threshold 15). Drivers by points: if/else 7 (24 pts), ternaries 2 (12 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController._addInlinePropertySingleField) 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 · FormPainterToolbarState.toggleMode (cognitive 46) · ×1
  • FormPainterToolbarState.toggleMode (cognitive 46) packages/masamune_painter/lib/src/form_painter_toolbar.dart:170 — FormPainterToolbarState.toggleMode has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 13 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CsvDocumentSourceModelAdapter.fromCsv (cognitive 45) · ×1
  • CsvDocumentSourceModelAdapter.fromCsv (cognitive 45) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:285 — CsvDocumentSourceModelAdapter.fromCsv has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 25). 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 · FirestoreModelDateRangeConverter.convertFrom (cognitive 45) · ×1
  • FirestoreModelDateRangeConverter.convertFrom (cognitive 45) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:16 — FirestoreModelDateRangeConverter.convertFrom has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (40 pts), boolean chains 5 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FirestoreModelTimeRangeConverter.convertFrom (cognitive 45) · ×1
  • FirestoreModelTimeRangeConverter.convertFrom (cognitive 45) packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:16 — FirestoreModelTimeRangeConverter.convertFrom has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (40 pts), boolean chains 5 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FirestoreModelTimestampRangeConverter.convertFrom (cognitive 45) · ×1
  • FirestoreModelTimestampRangeConverter.convertFrom (cognitive 45) packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:16 — FirestoreModelTimestampRangeConverter.convertFrom has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (40 pts), boolean chains 5 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FirebaseTermsAndPrivacyCliAction.exec (cognitive 44) · ×1
  • FirebaseTermsAndPrivacyCliAction.exec (cognitive 44) packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:56 — FirebaseTermsAndPrivacyCliAction.exec has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (39 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelAdapter._collectionReference (cognitive 44) · ×1
  • FirestoreModelAdapter._collectionReference (cognitive 44) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:983 — FirestoreModelAdapter._collectionReference has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 4 (12 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppInfo.apply (cognitive 43) · ×1
  • AppInfo.apply (cognitive 43) packages/katana_cli/lib/src/app_info.dart:18 — AppInfo.apply has cognitive complexity 43 (threshold 15). Drivers by points: if/else 23 (35 pts), boolean chains 8 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AIDebugOverlayState._buildPromptPanel (cognitive 43) · ×1
  • _AIDebugOverlayState._buildPromptPanel (cognitive 43) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1062 — _AIDebugOverlayState._buildPromptPanel has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 11 (23 pts), if/else 9 (14 pts), boolean chains 6 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownClipboard.paste (cognitive 43) · ×1
  • MarkdownClipboard.paste (cognitive 43) packages/masamune_markdown/lib/src/markdown_clipboard.dart:167 — MarkdownClipboard.paste has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 4, loops 1 (3 pts), ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownController.hasInlineProperty (cognitive 43) · ×1
  • MarkdownController.hasInlineProperty (cognitive 43) packages/masamune_markdown/lib/src/markdown_controller.dart:2823 — MarkdownController.hasInlineProperty has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 3 (8 pts), boolean chains 3, ternaries 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _CalendarState._buildCell (cognitive 42) · ×1
  • _CalendarState._buildCell (cognitive 42) packages/masamune_calendar/lib/src/calendar.dart:722 — _CalendarState._buildCell has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 12 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MarkdownController._removeInlinePropertySingleField (cognitive 42) · ×1
  • MarkdownController._removeInlinePropertySingleField (cognitive 42) packages/masamune_markdown/lib/src/markdown_controller.dart:2640 — MarkdownController._removeInlinePropertySingleField has cognitive complexity 42 (threshold 15). Drivers by points: if/else 6 (21 pts), ternaries 2 (12 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController._removeInlinePropertyMultiField) 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 · MarkdownController._removeInlinePropertyMultiField (cognitive 42) · ×1
  • MarkdownController._removeInlinePropertyMultiField (cognitive 42) packages/masamune_markdown/lib/src/markdown_controller.dart:2732 — MarkdownController._removeInlinePropertyMultiField has cognitive complexity 42 (threshold 15). Drivers by points: if/else 6 (21 pts), ternaries 2 (12 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController._removeInlinePropertySingleField) 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 · EcosystemCliAction.exec (cognitive 41) · ×1
  • EcosystemCliAction.exec (cognitive 41) packages/katana_cli/lib/action/ecosystem/ecosystem.dart:45 — EcosystemCliAction.exec has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 23). 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 · MarkdownController._addLinkPropertySingleField (cognitive 41) · ×1
  • MarkdownController._addLinkPropertySingleField (cognitive 41) packages/masamune_markdown/lib/src/markdown_controller.dart:2950 — MarkdownController._addLinkPropertySingleField has cognitive complexity 41 (threshold 15). Drivers by points: if/else 5 (20 pts), ternaries 2 (12 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController._addLinkPropertyMultiField) 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 · MarkdownController._addLinkPropertyMultiField (cognitive 41) · ×1
  • MarkdownController._addLinkPropertyMultiField (cognitive 41) packages/masamune_markdown/lib/src/markdown_controller.dart:3032 — MarkdownController._addLinkPropertyMultiField has cognitive complexity 41 (threshold 15). Drivers by points: if/else 5 (20 pts), ternaries 2 (12 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController._addLinkPropertySingleField) 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 · PaintingValue._getMinimumSizeOffsetOnResizing (cognitive 41) · ×1
  • PaintingValue._getMinimumSizeOffsetOnResizing (cognitive 41) packages/masamune_painter/lib/src/painting_value.dart:239 — PaintingValue._getMinimumSizeOffsetOnResizing has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (40 pts), match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GithubModelAdapter.deleteDocument (cognitive 40) · ×1
  • GithubModelAdapter.deleteDocument (cognitive 40) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2298 — GithubModelAdapter.deleteDocument has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 14 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownFieldState._deleteBlockAt (cognitive 40) · ×1
  • MarkdownFieldState._deleteBlockAt (cognitive 40) packages/masamune_markdown/lib/src/markdown_field.dart:1826 — MarkdownFieldState._deleteBlockAt has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 4 (12 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownController._extractSpansFromSelection (cognitive 39) · ×1
  • MarkdownController._extractSpansFromSelection (cognitive 39) packages/masamune_markdown/lib/src/markdown_controller.dart:4264 — MarkdownController._extractSpansFromSelection has cognitive complexity 39 (threshold 15). Drivers by points: if/else 5 (15 pts), ternaries 3 (13 pts), loops 3 (8 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MasamuneModelDocsBuilder.build (cognitive 39) · ×1
  • _MasamuneModelDocsBuilder.build (cognitive 39) packages/masamune_model_docs_builder/lib/src/builder.dart:42 — _MasamuneModelDocsBuilder.build has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (6 pts), ternaries 2 (6 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseLoggerAdapter.send (cognitive 38) · ×1
  • FirebaseLoggerAdapter.send (cognitive 38) packages/masamune_logger_firebase/lib/adapters/firebase_logger_adapter.dart:70 — FirebaseLoggerAdapter.send has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (26 pts), error handling 3 (6 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DurableObjectListening._applySnapshot (cognitive 38) · ×1
  • _DurableObjectListening._applySnapshot (cognitive 38) packages/masamune_model_do/lib/adapters/listenable_durable_object.dart:97 — _DurableObjectListening._applySnapshot has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 8, ternaries 2 (6 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PubVersionCliCommand.exec (cognitive 38) · ×1
  • PubVersionCliCommand.exec (cognitive 38) packages/katana_cli/lib/command/pub/version.dart:22 — PubVersionCliCommand.exec has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 4 (12 pts), loops 2 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseInitCliAction.validateLocal (cognitive 37) · ×1
  • FirebaseInitCliAction.validateLocal (cognitive 37) packages/katana_cli/lib/action/firebase/init.dart:367 — FirebaseInitCliAction.validateLocal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 6 (9 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseAIMasamuneAdapter._generateContent (cognitive 37) · ×1
  • FirebaseAIMasamuneAdapter._generateContent (cognitive 37) packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:303 — FirebaseAIMasamuneAdapter._generateContent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (34 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApplyCliCommand._apply (cognitive 37) · ×1
  • ApplyCliCommand._apply (cognitive 37) packages/katana_cli/lib/command/apply.dart:236 — ApplyCliCommand._apply has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 17, if/else 10 (17 pts), loops 2 (3 pts) (nesting depth added 8). 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.
D2 · Cognitive Complexity · _RenderMarkdownEditor._handleTapUp (cognitive 37) · ×1
  • _RenderMarkdownEditor._handleTapUp (cognitive 37) packages/masamune_markdown/lib/src/markdown_field.dart:4160 — _RenderMarkdownEditor._handleTapUp has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppLocalNotificationCliAction.exec (cognitive 36) · ×1
  • AppLocalNotificationCliAction.exec (cognitive 36) packages/katana_cli/lib/action/app/local_notification.dart:36 — AppLocalNotificationCliAction.exec has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 12, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidManifestQuerySynchronizer.apply (cognitive 36) · ×1
  • AndroidManifestQuerySynchronizer.apply (cognitive 36) packages/katana_cli/lib/src/android_manifest.dart:567 — AndroidManifestQuerySynchronizer.apply has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (8 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormMarkdownToolbarState.toggleMode (cognitive 36) · ×1
  • FormMarkdownToolbarState.toggleMode (cognitive 36) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:200 — FormMarkdownToolbarState.toggleMode has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (36 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MarkdownFieldState._getBlockInfoAt (cognitive 36) · ×1
  • MarkdownFieldState._getBlockInfoAt (cognitive 36) packages/masamune_markdown/lib/src/markdown_field.dart:1744 — MarkdownFieldState._getBlockInfoAt has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4 (12 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MasamuneModelTidbBuilder.build (cognitive 36) · ×1
  • _MasamuneModelTidbBuilder.build (cognitive 36) packages/masamune_model_tidb_builder/lib/src/builder.dart:12 — _MasamuneModelTidbBuilder.build has cognitive complexity 36 (threshold 15). Drivers by points: loops 10 (27 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PainterController.moveSelectedLayersForward (cognitive 36) · ×1
  • PainterController.moveSelectedLayersForward (cognitive 36) packages/masamune_painter/lib/src/painter_controller.dart:1379 — PainterController.moveSelectedLayersForward has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (PainterController.moveSelectedLayersBackward) 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 · PainterController.moveSelectedLayersBackward (cognitive 36) · ×1
  • PainterController.moveSelectedLayersBackward (cognitive 36) packages/masamune_painter/lib/src/painter_controller.dart:1540 — PainterController.moveSelectedLayersBackward has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (PainterController.moveSelectedLayersForward) 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 · NoSqlDatabase.replace (cognitive 35) · ×1
  • NoSqlDatabase.replace (cognitive 35) packages/katana_model/lib/src/no_sql_database.dart:927 — NoSqlDatabase.replace has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 6 (8 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderMarkdownEditor._getTextOffsetForPosition (cognitive 35) · ×1
  • _RenderMarkdownEditor._getTextOffsetForPosition (cognitive 35) packages/masamune_markdown/lib/src/markdown_field.dart:3544 — _RenderMarkdownEditor._getTextOffsetForPosition has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 9, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ReorderableListBuilderState._reorder (cognitive 35) · ×1
  • _ReorderableListBuilderState._reorder (cognitive 35) packages/masamune/lib/ui/reorderable_list_builder.dart:392 — _ReorderableListBuilderState._reorder has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseAuthAdapter.confirmSignIn (cognitive 34) · ×1
  • FirebaseAuthAdapter.confirmSignIn (cognitive 34) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:805 — FirebaseAuthAdapter.confirmSignIn has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidManifestPlaceholderSynchronizer._findGradleBlock (cognitive 34) · ×1
  • AndroidManifestPlaceholderSynchronizer._findGradleBlock (cognitive 34) packages/katana_cli/lib/src/android_manifest.dart:171 — AndroidManifestPlaceholderSynchronizer._findGradleBlock has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DateTimePickerAdapter.doSelect (cognitive 34) · ×1
  • _DateTimePickerAdapter.doSelect (cognitive 34) packages/katana_form/lib/src/picker/picker.dart:1696 — _DateTimePickerAdapter.doSelect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 4 (7 pts), boolean chains 5, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelFieldValue.toMap (cognitive 34) · ×1
  • ModelFieldValue.toMap (cognitive 34) packages/katana_model/lib/src/model_field_value.dart:297 — ModelFieldValue.toMap has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4 (10 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PainterController.rename (cognitive 34) · ×1
  • PainterController.rename (cognitive 34) packages/masamune_painter/lib/src/painter_controller.dart:1701 — PainterController.rename has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonSourceModelAdapter._loadJson (cognitive 33) · ×1
  • JsonSourceModelAdapter._loadJson (cognitive 33) packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:508 — JsonSourceModelAdapter._loadJson has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (14 pts), match/switch 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderMarkdownEditor._isWordBoundary (cognitive 33) · ×1
  • _RenderMarkdownEditor._isWordBoundary (cognitive 33) packages/masamune_markdown/lib/src/markdown_field.dart:4412 — _RenderMarkdownEditor._isWordBoundary has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 33. 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.
D2 · Cognitive Complexity · CloudflareDurableObjectCliAction.exec (cognitive 32) · ×1
  • CloudflareDurableObjectCliAction.exec (cognitive 32) packages/katana_cli/lib/action/cloudflare/durable_object.dart:266 — CloudflareDurableObjectCliAction.exec has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, ternaries 6, loops 3 (5 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CsvSourceModelAdapter._loadCSV (cognitive 32) · ×1
  • CsvSourceModelAdapter._loadCSV (cognitive 32) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:568 — CsvSourceModelAdapter._loadCSV has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (14 pts), match/switch 1 (3 pts), error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelLocaleConverter.convertTo (cognitive 32) · ×1
  • FirestoreModelLocaleConverter.convertTo (cognitive 32) packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:78 — FirestoreModelLocaleConverter.convertTo has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelTimeConverter.convertTo (cognitive 32) · ×1
  • FirestoreModelTimeConverter.convertTo (cognitive 32) packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:116 — FirestoreModelTimeConverter.convertTo has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XCodePermissionType.setMessageToXCode (cognitive 32) · ×1
  • XCodePermissionType.setMessageToXCode (cognitive 32) packages/katana_cli/lib/src/xcode.dart:551 — XCodePermissionType.setMessageToXCode has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelGeoValueFilter.hasMatch (cognitive 32) · ×1
  • ModelGeoValueFilter.hasMatch (cognitive 32) packages/katana_model/lib/src/model_geo_value.dart:206 — ModelGeoValueFilter.hasMatch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 5, match/switch 1 (nesting depth added 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 · _LinkSetting._getLinkUrlFromSelection (cognitive 32) · ×1
  • _LinkSetting._getLinkUrlFromSelection (cognitive 32) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:1178 — _LinkSetting._getLinkUrlFromSelection has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (14 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppKeystoreCliAction.exec (cognitive 31) · ×1
  • AppKeystoreCliAction.exec (cognitive 31) packages/katana_cli/lib/action/app/keystore.dart:32 — AppKeystoreCliAction.exec has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23 (30 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DoctorCliCommand.exec (cognitive 31) · ×1
  • DoctorCliCommand.exec (cognitive 31) packages/katana_cli/lib/command/doctor.dart:67 — DoctorCliCommand.exec has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (9 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WranglerEnvironmentSynchronizer._routeEntries (cognitive 31) · ×1
  • WranglerEnvironmentSynchronizer._routeEntries (cognitive 31) packages/katana_cli/lib/src/cloudflare_environment.dart:507 — WranglerEnvironmentSynchronizer._routeEntries has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormMarkdownToolbarState._buildPrimaryTools (cognitive 31) · ×1
  • FormMarkdownToolbarState._buildPrimaryTools (cognitive 31) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:428 — FormMarkdownToolbarState._buildPrimaryTools has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8, ternaries 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StripePurchase.confirm (cognitive 31) · ×1
  • StripePurchase.confirm (cognitive 31) packages/masamune_purchase_stripe/lib/src/stripe_purchase.dart:191 — StripePurchase.confirm has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TursoModelAdapter._withDirectClient (cognitive 30) · ×1
  • TursoModelAdapter._withDirectClient (cognitive 30) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1989 — TursoModelAdapter._withDirectClient has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FormDurationFieldPicker.build (cognitive 30) · ×1
  • FormDurationFieldPicker.build (cognitive 30) packages/katana_form/lib/form/form_duration_field.dart:1051 — FormDurationFieldPicker.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 4 (10 pts), boolean chains 7 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatabaseValidator.onSaveDocument (cognitive 30) · ×1
  • DatabaseValidator.onSaveDocument (cognitive 30) packages/katana_model/lib/src/database_validator.dart:229 — DatabaseValidator.onSaveDocument has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelLocalizedValueFilter._hasMatch (cognitive 30) · ×1
  • ModelLocalizedValueFilter._hasMatch (cognitive 30) packages/katana_model/lib/src/model_locale.dart:221 — ModelLocalizedValueFilter._hasMatch has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 18, if/else 12. 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.
D2 · Cognitive Complexity · UniversalExtentAppBar.build (cognitive 30) · ×1
  • UniversalExtentAppBar.build (cognitive 30) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2058 — UniversalExtentAppBar.build has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 13, if/else 11 (12 pts), ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FirestoreModelCounterConverter.convertTo (cognitive 29) · ×1
  • FirestoreModelCounterConverter.convertTo (cognitive 29) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:72 — FirestoreModelCounterConverter.convertTo has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelGeoValueConverter.convertTo (cognitive 29) · ×1
  • FirestoreModelGeoValueConverter.convertTo (cognitive 29) packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:121 — FirestoreModelGeoValueConverter.convertTo has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AdapterGenerator.generateForAnnotatedElement (cognitive 29) · ×1
  • AdapterGenerator.generateForAnnotatedElement (cognitive 29) packages/masamune_model_firebase_data_connect_builder/lib/generator/adapter_generator.dart:15 — AdapterGenerator.generateForAnnotatedElement has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (13 pts), ternaries 3 (10 pts), loops 2 (5 pts), error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppP12CliAction.exec (cognitive 28) · ×1
  • AppP12CliAction.exec (cognitive 28) packages/katana_cli/lib/action/app/p12.dart:31 — AppP12CliAction.exec has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CsvCollectionSourceModelAdapter.fromCsv (cognitive 28) · ×1
  • CsvCollectionSourceModelAdapter.fromCsv (cognitive 28) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:107 — CsvCollectionSourceModelAdapter.fromCsv has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareFunctionsAdapter.execute (cognitive 28) · ×1
  • CloudflareFunctionsAdapter.execute (cognitive 28) packages/masamune_functions_cloudflare/lib/adapter/cloudflare_functions_adapter.dart:94 — CloudflareFunctionsAdapter.execute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (17 pts), ternaries 1 (4 pts), error handling 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelGeoValueFilter._hasMatch (cognitive 28) · ×1
  • ModelGeoValueFilter._hasMatch (cognitive 28) packages/katana_model/lib/src/model_geo_value.dart:270 — ModelGeoValueFilter._hasMatch has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 17, if/else 11. 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.
D2 · Cognitive Complexity · AgoraController.startRecording (cognitive 28) · ×1
  • AgoraController.startRecording (cognitive 28) packages/masamune_agora/lib/src/agora_controller.dart:1061 — AgoraController.startRecording has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TidbCloudSqlUserApi._request (cognitive 27) · ×1
  • TidbCloudSqlUserApi._request (cognitive 27) packages/katana_cli/lib/action/cloudflare/tidb_migration_credentials.dart:119 — TidbCloudSqlUserApi._request has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 1 (4 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PainterMasamuneAdapter._findTool (cognitive 27) · ×1
  • PainterMasamuneAdapter._findTool (cognitive 27) packages/masamune_painter/lib/adapter/painter_masamune_adapter.dart:222 — PainterMasamuneAdapter._findTool has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (25 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CollectionModelGenerator.generateForAnnotatedElement (cognitive 27) · ×1
  • CollectionModelGenerator.generateForAnnotatedElement (cognitive 27) packages/masamune_builder/lib/generator/collection_model_generator.dart:13 — CollectionModelGenerator.generateForAnnotatedElement has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownFieldState._findTextDifference (cognitive 27) · ×1
  • MarkdownFieldState._findTextDifference (cognitive 27) packages/masamune_markdown/lib/src/markdown_field.dart:1912 — MarkdownFieldState._findTextDifference has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (12 pts), boolean chains 7, if/else 3 (6 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownLineValue._parseInlineMarkdown (cognitive 27) · ×1
  • MarkdownLineValue._parseInlineMarkdown (cognitive 27) packages/masamune_markdown/lib/src/markdown_value.dart:364 — MarkdownLineValue._parseInlineMarkdown has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, match/switch 1 (2 pts), loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TidbQueryPayload.fromFilters (cognitive 27) · ×1
  • TidbQueryPayload.fromFilters (cognitive 27) packages/masamune_model_tidb/lib/src/tidb_query.dart:18 — TidbQueryPayload.fromFilters has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 8, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TursoQueryPayload.fromFilters (cognitive 27) · ×1
  • TursoQueryPayload.fromFilters (cognitive 27) packages/masamune_model_turso/lib/src/turso_query.dart:18 — TursoQueryPayload.fromFilters has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 8, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppCsrCliAction.exec (cognitive 26) · ×1
  • AppCsrCliAction.exec (cognitive 26) packages/katana_cli/lib/action/app/csr.dart:31 — AppCsrCliAction.exec has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareTursoCliAction.parseTursoGroups (cognitive 26) · ×1
  • CloudflareTursoCliAction.parseTursoGroups (cognitive 26) packages/katana_cli/lib/action/cloudflare/turso.dart:520 — CloudflareTursoCliAction.parseTursoGroups has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseFirestoreCliAction.synchronizeFirestoreConfig (cognitive 26) · ×1
  • FirebaseFirestoreCliAction.synchronizeFirestoreConfig (cognitive 26) packages/katana_cli/lib/action/firebase/firestore.dart:49 — FirebaseFirestoreCliAction.synchronizeFirestoreConfig has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TursoModelAdapter.runAtomicTransaction (cognitive 26) · ×1
  • TursoModelAdapter.runAtomicTransaction (cognitive 26) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1311 — TursoModelAdapter.runAtomicTransaction has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 6 (8 pts), error handling 2 (3 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _InternalPickerWidgetState._buildCupertinoPicker (cognitive 26) · ×1
  • _InternalPickerWidgetState._buildCupertinoPicker (cognitive 26) packages/katana_form/lib/src/picker/picker.dart:619 — _InternalPickerWidgetState._buildCupertinoPicker has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 3 (7 pts), boolean chains 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelCounterFilter.hasMatch (cognitive 26) · ×1
  • ModelCounterFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_field_value.dart:793 — ModelCounterFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 6 other methods here (ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, ModelTimeFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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 · ModelTimestampFilter.hasMatch (cognitive 26) · ×1
  • ModelTimestampFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_field_value.dart:1197 — ModelTimestampFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelDateFilter.hasMatch, ModelTimeFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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 · ModelDateFilter.hasMatch (cognitive 26) · ×1
  • ModelDateFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_field_value.dart:1580 — ModelDateFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelTimeFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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 · ModelTimeFilter.hasMatch (cognitive 26) · ×1
  • ModelTimeFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_field_value.dart:2020 — ModelTimeFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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 · ModelTimestampRangeFilter.hasMatch (cognitive 26) · ×1
  • ModelTimestampRangeFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_field_value.dart:2380 — ModelTimestampRangeFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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 · ModelDateRangeFilter.hasMatch (cognitive 26) · ×1
  • ModelDateRangeFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_field_value.dart:2711 — ModelDateRangeFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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 · ModelTimeRangeFilter.hasMatch (cognitive 26) · ×1
  • ModelTimeRangeFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_field_value.dart:3055 — ModelTimeRangeFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 6 other methods here (ModelCounterFilter.hasMatch, ModelTimestampFilter.hasMatch, ModelDateFilter.hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 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 · ModelLocaleFilter.hasMatch (cognitive 26) · ×1
  • ModelLocaleFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_locale.dart:757 — ModelLocaleFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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 · ModelLocaleFilter._hasMatch (cognitive 26) · ×1
  • ModelLocaleFilter._hasMatch (cognitive 26) packages/katana_model/lib/src/model_locale.dart:807 — ModelLocaleFilter._hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 16, if/else 10. 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.
D2 · Cognitive Complexity · ModelRefFilter.hasMatch (cognitive 26) · ×1
  • ModelRefFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_ref.dart:362 — ModelRefFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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 · ModelServerCommandBaseFilter.hasMatch (cognitive 26) · ×1
  • ModelServerCommandBaseFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_server_command.dart:269 — ModelServerCommandBaseFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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 · ModelImageUriFilter.hasMatch (cognitive 26) · ×1
  • ModelImageUriFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_uri.dart:202 — ModelImageUriFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 2 other methods here (ModelVideoUriFilter.hasMatch, ModelUriFilter.hasMatch) 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 · ModelVideoUriFilter.hasMatch (cognitive 26) · ×1
  • ModelVideoUriFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_uri.dart:498 — ModelVideoUriFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 2 other methods here (ModelImageUriFilter.hasMatch, ModelUriFilter.hasMatch) 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 · ModelUriFilter.hasMatch (cognitive 26) · ×1
  • ModelUriFilter.hasMatch (cognitive 26) packages/katana_model/lib/src/model_uri.dart:807 — ModelUriFilter.hasMatch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, match/switch 1 (nesting depth added 12). 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. This shape REPEATS in the file: 2 other methods here (ModelImageUriFilter.hasMatch, ModelVideoUriFilter.hasMatch) 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 · Breakpoint.width (cognitive 26) · ×1
  • Breakpoint.width (cognitive 26) packages/masamune_universal_ui/lib/src/breakpoint.dart:52 — Breakpoint.width has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20 (25 pts), match/switch 1 (nesting depth added 5). 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 · SchemaValue.buildQuery (cognitive 26) · ×1
  • SchemaValue.buildQuery (cognitive 26) packages/masamune_model_firebase_data_connect_builder/lib/value/schema_value.dart:31 — SchemaValue.buildQuery has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 3 (7 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · D1QueryPayload.fromFilters (cognitive 25) · ×1
  • D1QueryPayload.fromFilters (cognitive 25) packages/masamune_model_d1/lib/src/d1_query.dart:18 — D1QueryPayload.fromFilters has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DurableObjectQueryPayload.fromFilters (cognitive 25) · ×1
  • DurableObjectQueryPayload.fromFilters (cognitive 25) packages/masamune_model_do/lib/src/do_query.dart:18 — DurableObjectQueryPayload.fromFilters has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PainterController.saveCurrentValue (cognitive 25) · ×1
  • PainterController.saveCurrentValue (cognitive 25) packages/masamune_painter/lib/src/painter_controller.dart:107 — PainterController.saveCurrentValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelMigrateCliCommand.exec (cognitive 24) · ×1
  • ModelMigrateCliCommand.exec (cognitive 24) packages/katana_cli/lib/action/cloudflare/d1.dart:83 — ModelMigrateCliCommand.exec has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppInfo._createAndroidResValues (cognitive 24) · ×1
  • AppInfo._createAndroidResValues (cognitive 24) packages/katana_cli/lib/src/app_info.dart:181 — AppInfo._createAndroidResValues has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · XCodePrivacyManifests.setPrivacyManifestToXCode (cognitive 24) · ×1
  • XCodePrivacyManifests.setPrivacyManifestToXCode (cognitive 24) packages/katana_cli/lib/src/xcode.dart:792 — XCodePrivacyManifests.setPrivacyManifestToXCode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 10 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelImageUriFilter._hasMatch (cognitive 24) · ×1
  • ModelImageUriFilter._hasMatch (cognitive 24) packages/katana_model/lib/src/model_uri.dart:257 — ModelImageUriFilter._hasMatch has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (12 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelVideoUriFilter._hasMatch, ModelUriFilter._hasMatch) 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 · ModelVideoUriFilter._hasMatch (cognitive 24) · ×1
  • ModelVideoUriFilter._hasMatch (cognitive 24) packages/katana_model/lib/src/model_uri.dart:553 — ModelVideoUriFilter._hasMatch has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (12 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelImageUriFilter._hasMatch, ModelUriFilter._hasMatch) 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 · ModelUriFilter._hasMatch (cognitive 24) · ×1
  • ModelUriFilter._hasMatch (cognitive 24) packages/katana_model/lib/src/model_uri.dart:862 — ModelUriFilter._hasMatch has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (12 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (ModelImageUriFilter._hasMatch, ModelVideoUriFilter._hasMatch) 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 · AIAgent.generateContent (cognitive 24) · ×1
  • AIAgent.generateContent (cognitive 24) packages/masamune_ai/lib/src/ai_agent.dart:711 — AIAgent.generateContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnimateController.play (cognitive 24) · ×1
  • AnimateController.play (cognitive 24) packages/masamune_animate/lib/src/animate_controller.dart:151 — AnimateController.play has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 3 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownController._getSelectedBlocks (cognitive 24) · ×1
  • MarkdownController._getSelectedBlocks (cognitive 24) packages/masamune_markdown/lib/src/markdown_controller.dart:4170 — MarkdownController._getSelectedBlocks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (8 pts), boolean chains 5, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderMarkdownEditor._handleDragUpdate (cognitive 24) · ×1
  • _RenderMarkdownEditor._handleDragUpdate (cognitive 24) packages/masamune_markdown/lib/src/markdown_field.dart:4450 — _RenderMarkdownEditor._handleDragUpdate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MasamuneModelD1Builder.build (cognitive 24) · ×1
  • _MasamuneModelD1Builder.build (cognitive 24) packages/masamune_model_d1_builder/lib/src/builder.dart:12 — _MasamuneModelD1Builder.build has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · _MasamuneModelDurableObjectBuilder.build (cognitive 24) · ×1
  • _MasamuneModelDurableObjectBuilder.build (cognitive 24) packages/masamune_model_do_builder/lib/src/builder.dart:12 — _MasamuneModelDurableObjectBuilder.build has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · FormPainterFieldState._handledOnDragging (cognitive 24) · ×1
  • FormPainterFieldState._handledOnDragging (cognitive 24) packages/masamune_painter/lib/src/form_painter_field.dart:518 — FormPainterFieldState._handledOnDragging has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (24 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UniversalAppBar.buildUnsliverAppBar (cognitive 24) · ×1
  • UniversalAppBar.buildUnsliverAppBar (cognitive 24) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:944 — UniversalAppBar.buildUnsliverAppBar has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, ternaries 4 (6 pts), if/else 4 (5 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AnnotationValue.AnnotationValue (cognitive 24) · ×1
  • AnnotationValue.AnnotationValue (cognitive 24) packages/katana_router_builder/lib/value/annotation_value.dart:11 — AnnotationValue.AnnotationValue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareSourceUtils._findClosing (cognitive 23) · ×1
  • CloudflareSourceUtils._findClosing (cognitive 23) packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:304 — CloudflareSourceUtils._findClosing has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareDeployCliAction._deployWorkers (cognitive 23) · ×1
  • CloudflareDeployCliAction._deployWorkers (cognitive 23) packages/katana_cli/lib/action/cloudflare/deploy.dart:73 — CloudflareDeployCliAction._deployWorkers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareKvCliAction._findClosing (cognitive 23) · ×1
  • CloudflareKvCliAction._findClosing (cognitive 23) packages/katana_cli/lib/action/cloudflare/kv.dart:278 — CloudflareKvCliAction._findClosing has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareStorageCliAction._findClosing (cognitive 23) · ×1
  • CloudflareStorageCliAction._findClosing (cognitive 23) packages/katana_cli/lib/action/cloudflare/storage.dart:771 — CloudflareStorageCliAction._findClosing has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareTursoCliAction._findClosing (cognitive 23) · ×1
  • CloudflareTursoCliAction._findClosing (cognitive 23) packages/katana_cli/lib/action/cloudflare/turso.dart:604 — CloudflareTursoCliAction._findClosing has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListenableFirestoreModelAdapter.listenCollection (cognitive 23) · ×1
  • ListenableFirestoreModelAdapter.listenCollection (cognitive 23) packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:89 — ListenableFirestoreModelAdapter.listenCollection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 5 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareKVModelAdapter.loadCollection (cognitive 23) · ×1
  • CloudflareKVModelAdapter.loadCollection (cognitive 23) packages/masamune_model_cloudflare_kv/lib/adapter/cloudflare_kv_model_adapter.dart:91 — CloudflareKVModelAdapter.loadCollection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (9 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MasamuneAppState._buildAppRouter (cognitive 23) · ×1
  • _MasamuneAppState._buildAppRouter (cognitive 23) packages/masamune/lib/src/masamune_app.dart:716 — _MasamuneAppState._buildAppRouter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgoraController.startScreenCapture (cognitive 23) · ×1
  • AgoraController.startScreenCapture (cognitive 23) packages/masamune_agora/lib/src/agora_controller.dart:889 — AgoraController.startScreenCapture has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackgroundLocation.initialize (cognitive 23) · ×1
  • BackgroundLocation.initialize (cognitive 23) packages/masamune_location_background/lib/src/others/background_location.dart:130 — BackgroundLocation.initialize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (22 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownFieldState._handleArrowLeft (cognitive 23) · ×1
  • MarkdownFieldState._handleArrowLeft (cognitive 23) packages/masamune_markdown/lib/src/markdown_field.dart:1626 — MarkdownFieldState._handleArrowLeft has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownFieldState._handleArrowRight) 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 · MarkdownFieldState._handleArrowRight (cognitive 23) · ×1
  • MarkdownFieldState._handleArrowRight (cognitive 23) packages/masamune_markdown/lib/src/markdown_field.dart:1683 — MarkdownFieldState._handleArrowRight has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownFieldState._handleArrowLeft) 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 · UniversalListView._createRows (cognitive 23) · ×1
  • UniversalListView._createRows (cognitive 23) packages/masamune_universal_ui/lib/src/universal_list_view.dart:342 — UniversalListView._createRows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TidbMigrateCliCommand.exec (cognitive 22) · ×1
  • TidbMigrateCliCommand.exec (cognitive 22) packages/katana_cli/lib/action/cloudflare/tidb.dart:84 — TidbMigrateCliCommand.exec has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 3, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PickerMasamuneAdapter.pickMultiple (cognitive 22) · ×1
  • PickerMasamuneAdapter.pickMultiple (cognitive 22) packages/masamune_picker/lib/adapter/picker_masamune_adapter.dart:55 — PickerMasamuneAdapter.pickMultiple has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (4 pts), boolean chains 2, error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelDateConverter.convertFrom (cognitive 22) · ×1
  • FirestoreModelDateConverter.convertFrom (cognitive 22) packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:31 — FirestoreModelDateConverter.convertFrom has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelTimeConverter.convertFrom (cognitive 22) · ×1
  • FirestoreModelTimeConverter.convertFrom (cognitive 22) packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:30 — FirestoreModelTimeConverter.convertFrom has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DateTextFieldState.didUpdateWidget (cognitive 22) · ×1
  • _DateTextFieldState.didUpdateWidget (cognitive 22) packages/katana_form/lib/form/form_date_field.dart:844 — _DateTextFieldState.didUpdateWidget has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DateTimeTextFieldState.didUpdateWidget (cognitive 22) · ×1
  • _DateTimeTextFieldState.didUpdateWidget (cognitive 22) packages/katana_form/lib/form/form_date_time_field.dart:790 — _DateTimeTextFieldState.didUpdateWidget has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DateTimeRangeTextFieldState.didUpdateWidget (cognitive 22) · ×1
  • _DateTimeRangeTextFieldState.didUpdateWidget (cognitive 22) packages/katana_form/lib/form/form_date_time_range_field.dart:767 — _DateTimeRangeTextFieldState.didUpdateWidget has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DurationTextFieldState.didUpdateWidget (cognitive 22) · ×1
  • _DurationTextFieldState.didUpdateWidget (cognitive 22) packages/katana_form/lib/form/form_duration_field.dart:794 — _DurationTextFieldState.didUpdateWidget has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MonthTextFieldState.didUpdateWidget (cognitive 22) · ×1
  • _MonthTextFieldState.didUpdateWidget (cognitive 22) packages/katana_form/lib/form/form_month_modal_field.dart:678 — _MonthTextFieldState.didUpdateWidget has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppInfo._createIOSInfoPlistStrings (cognitive 22) · ×1
  • AppInfo._createIOSInfoPlistStrings (cognitive 22) packages/katana_cli/lib/src/app_info.dart:364 — AppInfo._createIOSInfoPlistStrings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GradleText.mask (cognitive 22) · ×1
  • _GradleText.mask (cognitive 22) packages/katana_cli/lib/src/gradle.dart:150 — _GradleText.mask has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 6 (8 pts), boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XCode.createIOSInfoPlistStrings (cognitive 22) · ×1
  • XCode.createIOSInfoPlistStrings (cognitive 22) packages/katana_cli/lib/src/xcode.dart:180 — XCode.createIOSInfoPlistStrings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _DateTimePickerAdapter.buildItem (cognitive 22) · ×1
  • _DateTimePickerAdapter.buildItem (cognitive 22) packages/katana_form/lib/src/picker/picker.dart:1541 — _DateTimePickerAdapter.buildItem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelFieldValueConverter.filterQuery (cognitive 22) · ×1
  • FirestoreModelFieldValueConverter.filterQuery (cognitive 22) packages/katana_model_firestore/lib/src/firestore_model_field_value_converter.dart:157 — FirestoreModelFieldValueConverter.filterQuery has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (8 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AIContent.add (cognitive 22) · ×1
  • AIContent.add (cognitive 22) packages/masamune_ai/lib/src/ai_content.dart:462 — AIContent.add has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatTile.build (cognitive 22) · ×1
  • ChatTile.build (cognitive 22) packages/katana_ui/lib/ui/chat_tile.dart:219 — ChatTile.build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (22 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AdsCliAction.exec (cognitive 21) · ×1
  • AdsCliAction.exec (cognitive 21) packages/katana_cli/lib/action/ads/ads.dart:37 — AdsCliAction.exec has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareStorageCliAction.validateLocal (cognitive 21) · ×1
  • CloudflareStorageCliAction.validateLocal (cognitive 21) packages/katana_cli/lib/action/cloudflare/storage.dart:183 — CloudflareStorageCliAction.validateLocal has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (8 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RestApiFunctionsAdapter.execute (cognitive 21) · ×1
  • RestApiFunctionsAdapter.execute (cognitive 21) packages/katana_functions/lib/adapter/rest_api_functions_adapter.dart:83 — RestApiFunctionsAdapter.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FunctionsStorageAdapter.download (cognitive 21) · ×1
  • FunctionsStorageAdapter.download (cognitive 21) packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:95 — FunctionsStorageAdapter.download has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AIDebugOverlayState.build (cognitive 21) · ×1
  • _AIDebugOverlayState.build (cognitive 21) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:797 — _AIDebugOverlayState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (8 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MasamuneModelFirestoreBuilder.build (cognitive 21) · ×1
  • _MasamuneModelFirestoreBuilder.build (cognitive 21) packages/masamune_model_firestore_builder/lib/src/builder.dart:130 — _MasamuneModelFirestoreBuilder.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (6 pts), loops 3 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PainterController.save (cognitive 21) · ×1
  • PainterController.save (cognitive 21) packages/masamune_painter/lib/src/painter_controller.dart:1891 — PainterController.save has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseSchedulerCliAction.exec (cognitive 20) · ×1
  • FirebaseSchedulerCliAction.exec (cognitive 20) packages/katana_cli/lib/action/firebase/scheduler.dart:30 — FirebaseSchedulerCliAction.exec has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownMasamuneAdapter._findTools (cognitive 20) · ×1
  • MarkdownMasamuneAdapter._findTools (cognitive 20) packages/masamune_markdown/lib/adapter/markdown_masamune_adapter.dart:125 — MarkdownMasamuneAdapter._findTools has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TursoDirectClientSession._run (cognitive 20) · ×1
  • TursoDirectClientSession._run (cognitive 20) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:233 — TursoDirectClientSession._run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TursoModelAdapter._runOperations (cognitive 20) · ×1
  • TursoModelAdapter._runOperations (cognitive 20) packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1912 — TursoModelAdapter._runOperations has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (10 pts), error handling 2 (5 pts), if/else 5 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · FirestoreModelGeoValueConverter.convertFrom (cognitive 20) · ×1
  • FirestoreModelGeoValueConverter.convertFrom (cognitive 20) packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:16 — FirestoreModelGeoValueConverter.convertFrom has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelLocaleConverter.convertFrom (cognitive 20) · ×1
  • FirestoreModelLocaleConverter.convertFrom (cognitive 20) packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:15 — FirestoreModelLocaleConverter.convertFrom has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (9 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelTimestampConverter.convertFrom (cognitive 20) · ×1
  • FirestoreModelTimestampConverter.convertFrom (cognitive 20) packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:32 — FirestoreModelTimestampConverter.convertFrom has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FormTextFieldState.build (cognitive 20) · ×1
  • _FormTextFieldState.build (cognitive 20) packages/katana_form/lib/form/form_text_field.dart:730 — _FormTextFieldState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8, if/else 7, boolean chains 4, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WranglerEnvironmentSynchronizer.synchronize (cognitive 20) · ×1
  • WranglerEnvironmentSynchronizer.synchronize (cognitive 20) packages/katana_cli/lib/src/cloudflare_environment.dart:14 — WranglerEnvironmentSynchronizer.synchronize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseFunctionsSecrets._firebaseToolsDirectory (cognitive 20) · ×1
  • FirebaseFunctionsSecrets._firebaseToolsDirectory (cognitive 20) packages/katana_cli/lib/src/functions.dart:339 — FirebaseFunctionsSecrets._firebaseToolsDirectory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppLocalizeBase.localeResolutionCallback (cognitive 20) · ×1
  • AppLocalizeBase.localeResolutionCallback (cognitive 20) packages/katana_localization/lib/src/app_localize_base.dart:92 — AppLocalizeBase.localeResolutionCallback has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelTimestampFilter._hasMatch (cognitive 20) · ×1
  • ModelTimestampFilter._hasMatch (cognitive 20) packages/katana_model/lib/src/model_field_value.dart:1255 — ModelTimestampFilter._hasMatch has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. 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. This shape REPEATS in the file: 4 other methods here (ModelDateFilter._hasMatch, ModelTimeFilter._hasMatch, ModelSearchFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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 · ModelDateFilter._hasMatch (cognitive 20) · ×1
  • ModelDateFilter._hasMatch (cognitive 20) packages/katana_model/lib/src/model_field_value.dart:1638 — ModelDateFilter._hasMatch has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. 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. This shape REPEATS in the file: 4 other methods here (ModelTimestampFilter._hasMatch, ModelTimeFilter._hasMatch, ModelSearchFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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 · ModelTimeFilter._hasMatch (cognitive 20) · ×1
  • ModelTimeFilter._hasMatch (cognitive 20) packages/katana_model/lib/src/model_field_value.dart:2078 — ModelTimeFilter._hasMatch has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. 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. This shape REPEATS in the file: 4 other methods here (ModelTimestampFilter._hasMatch, ModelDateFilter._hasMatch, ModelSearchFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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 · ModelSearchFilter._hasMatch (cognitive 20) · ×1
  • ModelSearchFilter._hasMatch (cognitive 20) packages/katana_model/lib/src/model_field_value.dart:3334 — ModelSearchFilter._hasMatch has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. 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. This shape REPEATS in the file: 4 other methods here (ModelTimestampFilter._hasMatch, ModelDateFilter._hasMatch, ModelTimeFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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 · ModelTokenFilter._hasMatch (cognitive 20) · ×1
  • ModelTokenFilter._hasMatch (cognitive 20) packages/katana_model/lib/src/model_field_value.dart:3586 — ModelTokenFilter._hasMatch has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. 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. This shape REPEATS in the file: 4 other methods here (ModelTimestampFilter._hasMatch, ModelDateFilter._hasMatch, ModelTimeFilter._hasMatch, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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 · ModelRefFilter._hasMatch (cognitive 20) · ×1
  • ModelRefFilter._hasMatch (cognitive 20) packages/katana_model/lib/src/model_ref.dart:412 — ModelRefFilter._hasMatch has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. 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.
D2 · Cognitive Complexity · HandoverRepository.fetch (cognitive 20) · ×1
  • HandoverRepository.fetch (cognitive 20) packages/masamune_handover/lib/src/handover_repository.dart:42 — HandoverRepository.fetch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormPainterFieldState._handledOnDragStart (cognitive 20) · ×1
  • FormPainterFieldState._handledOnDragStart (cognitive 20) packages/masamune_painter/lib/src/form_painter_field.dart:455 — FormPainterFieldState._handledOnDragStart has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RawPainter._paintValue (cognitive 20) · ×1
  • _RawPainter._paintValue (cognitive 20) packages/masamune_painter/lib/src/form_painter_field.dart:1018 — _RawPainter._paintValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackgroundPropertyColorPainterInlineTools.icon (cognitive 20) · ×1
  • BackgroundPropertyColorPainterInlineTools.icon (cognitive 20) packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:51 — BackgroundPropertyColorPainterInlineTools.icon has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 4 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForegroundPropertyColorPainterInlineTools.icon (cognitive 20) · ×1
  • ForegroundPropertyColorPainterInlineTools.icon (cognitive 20) packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:54 — ForegroundPropertyColorPainterInlineTools.icon has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 4 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelAnnotationValue.ModelAnnotationValue (cognitive 20) · ×1
  • ModelAnnotationValue.ModelAnnotationValue (cognitive 20) packages/masamune_builder/lib/value/annotation_value.dart:11 — ModelAnnotationValue.ModelAnnotationValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppTextToSpeechCliAction.exec (cognitive 19) · ×1
  • AppTextToSpeechCliAction.exec (cognitive 19) packages/katana_cli/lib/action/app/text_to_speech.dart:35 — AppTextToSpeechCliAction.exec has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FirebaseAnonymousConfigurationCliAction.exec (cognitive 19) · ×1
  • FirebaseAnonymousConfigurationCliAction.exec (cognitive 19) packages/katana_cli/lib/action/firebase/anonymous_configuration.dart:24 — FirebaseAnonymousConfigurationCliAction.exec has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 3 (6 pts), if/else 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelAdapter._convertTo (cognitive 19) · ×1
  • FirestoreModelAdapter._convertTo (cognitive 19) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:909 — FirestoreModelAdapter._convertTo has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PickerMasamuneAdapter.pickSingle (cognitive 19) · ×1
  • PickerMasamuneAdapter.pickSingle (cognitive 19) packages/masamune_picker/lib/adapter/picker_masamune_adapter.dart:136 — PickerMasamuneAdapter.pickSingle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), boolean chains 2, error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DoSubscription.start (cognitive 19) · ×1
  • _DoSubscription.start (cognitive 19) packages/masamune_model_do/lib/adapters/listenable_durable_object.dart:268 — _DoSubscription.start has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CodeDartDefinesCliCommand.exec (cognitive 19) · ×1
  • CodeDartDefinesCliCommand.exec (cognitive 19) packages/katana_cli/lib/command/code/dart_defines.dart:19 — CodeDartDefinesCliCommand.exec has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _EnumTextFieldState.didUpdateWidget (cognitive 19) · ×1
  • _EnumTextFieldState.didUpdateWidget (cognitive 19) packages/katana_form/lib/form/form_enum_modal_field.dart:724 — _EnumTextFieldState.didUpdateWidget has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SelectTextFieldState.didUpdateWidget (cognitive 19) · ×1
  • _SelectTextFieldState.didUpdateWidget (cognitive 19) packages/katana_form/lib/form/form_map_modal_field.dart:660 — _SelectTextFieldState.didUpdateWidget has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _NumTextFieldState.didUpdateWidget (cognitive 19) · ×1
  • _NumTextFieldState.didUpdateWidget (cognitive 19) packages/katana_form/lib/form/form_num_modal_field.dart:639 — _NumTextFieldState.didUpdateWidget has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PickerDataAdapter.getSelectedValues (cognitive 19) · ×1
  • _PickerDataAdapter.getSelectedValues (cognitive 19) packages/katana_form/lib/src/picker/picker.dart:1014 — _PickerDataAdapter.getSelectedValues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GeoUtility.encode (cognitive 19) · ×1
  • _GeoUtility.encode (cognitive 19) packages/katana_model/lib/src/model_geo_value.dart:575 — _GeoUtility.encode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AIAgent._recallVectorMemory (cognitive 19) · ×1
  • AIAgent._recallVectorMemory (cognitive 19) packages/masamune_ai/lib/src/ai_agent.dart:525 — AIAgent._recallVectorMemory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AIDebugContextSanitizer.value (cognitive 19) · ×1
  • _AIDebugContextSanitizer.value (cognitive 19) packages/masamune_ai_debugger/lib/src/ai_debug_post.dart:301 — _AIDebugContextSanitizer.value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormMarkdownToolbarState.build (cognitive 19) · ×1
  • FormMarkdownToolbarState.build (cognitive 19) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:931 — FormMarkdownToolbarState.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MarkdownFieldValue.fromMarkdown (cognitive 19) · ×1
  • MarkdownFieldValue.fromMarkdown (cognitive 19) packages/masamune_markdown/lib/src/markdown_value.dart:1015 — MarkdownFieldValue.fromMarkdown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StripeAccount.create (cognitive 19) · ×1
  • StripeAccount.create (cognitive 19) packages/masamune_purchase_stripe/lib/src/stripe_account.dart:54 — StripeAccount.create has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StripePurchase.capture (cognitive 19) · ×1
  • StripePurchase.capture (cognitive 19) packages/masamune_purchase_stripe/lib/src/stripe_purchase.dart:346 — StripePurchase.capture has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParamaterValue._parseReferenceValue (cognitive 19) · ×1
  • ParamaterValue._parseReferenceValue (cognitive 19) packages/masamune_builder/lib/value/parameter_value.dart:72 — ParamaterValue._parseReferenceValue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgoraCliAction.exec (cognitive 18) · ×1
  • AgoraCliAction.exec (cognitive 18) packages/katana_cli/lib/action/agora/agora.dart:32 — AgoraCliAction.exec has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppSpreadSheetCliAction.exec (cognitive 18) · ×1
  • AppSpreadSheetCliAction.exec (cognitive 18) packages/katana_cli/lib/action/app/spread_sheet.dart:64 — AppSpreadSheetCliAction.exec has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelAdapter.loadCollection (cognitive 18) · ×1
  • FirestoreModelAdapter.loadCollection (cognitive 18) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:464 — FirestoreModelAdapter.loadCollection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KatanaEnvironmentFixPlan.apply (cognitive 18) · ×1
  • KatanaEnvironmentFixPlan.apply (cognitive 18) packages/katana_cli/lib/command/fix.dart:99 — KatanaEnvironmentFixPlan.apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelDateConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelDateConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:117 — FirestoreModelDateConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelDateRangeConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelDateRangeConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:109 — FirestoreModelDateRangeConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelImageUriConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelImageUriConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:70 — FirestoreModelImageUriConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelRefConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelRefConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_ref_converter.dart:80 — FirestoreModelRefConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelSearchConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelSearchConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:38 — FirestoreModelSearchConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelTimeRangeConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelTimeRangeConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:109 — FirestoreModelTimeRangeConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelTimestampRangeConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelTimestampRangeConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:109 — FirestoreModelTimestampRangeConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelTokenConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelTokenConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:38 — FirestoreModelTokenConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelUriConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelUriConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:69 — FirestoreModelUriConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirestoreModelVideoUriConverter.convertTo (cognitive 18) · ×1
  • FirestoreModelVideoUriConverter.convertTo (cognitive 18) packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:70 — FirestoreModelVideoUriConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelCounterConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelCounterConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:85 — FirebaseDataConnectModelCounterConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelDateConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelDateConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:66 — FirebaseDataConnectModelDateConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelDateRangeConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelDateRangeConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:75 — FirebaseDataConnectModelDateRangeConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelGeoValueConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelGeoValueConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:77 — FirebaseDataConnectModelGeoValueConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelImageUriConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelImageUriConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:73 — FirebaseDataConnectModelImageUriConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelLocaleConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelLocaleConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:76 — FirebaseDataConnectModelLocaleConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelLocalizedValueConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelLocalizedValueConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:71 — FirebaseDataConnectModelLocalizedValueConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelRefConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelRefConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:70 — FirebaseDataConnectModelRefConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelTimeConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelTimeConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:66 — FirebaseDataConnectModelTimeConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelTimeRangeConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelTimeRangeConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:75 — FirebaseDataConnectModelTimeRangeConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelTimestampConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelTimestampConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:66 — FirebaseDataConnectModelTimestampConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelTimestampRangeConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelTimestampRangeConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:75 — FirebaseDataConnectModelTimestampRangeConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelUriConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelUriConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:73 — FirebaseDataConnectModelUriConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirebaseDataConnectModelVideoUriConverter.convertTo (cognitive 18) · ×1
  • FirebaseDataConnectModelVideoUriConverter.convertTo (cognitive 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:73 — FirebaseDataConnectModelVideoUriConverter.convertTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GoogleSpreadSheetLocalizeGenerator.generateForAnnotatedElement (cognitive 18) · ×1
  • GoogleSpreadSheetLocalizeGenerator.generateForAnnotatedElement (cognitive 18) packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:13 — GoogleSpreadSheetLocalizeGenerator.generateForAnnotatedElement has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (3 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · YamlLocalizeGenerator.generateForAnnotatedElement (cognitive 18) · ×1
  • YamlLocalizeGenerator.generateForAnnotatedElement (cognitive 18) packages/katana_localization_builder/lib/generator/yaml_localize_generator.dart:12 — YamlLocalizeGenerator.generateForAnnotatedElement has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (3 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MasamuneCollectionModelShouldAddLimitQuery.run (cognitive 18) · ×1
  • _MasamuneCollectionModelShouldAddLimitQuery.run (cognitive 18) packages/masamune_lints/lib/masamune/masamune_collection_model_should_add_limit_query.dart:13 — _MasamuneCollectionModelShouldAddLimitQuery.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · FirebaseFunctionsSecrets.synchronize (cognitive 18) · ×1
  • FirebaseFunctionsSecrets.synchronize (cognitive 18) packages/katana_cli/lib/src/functions.dart:270 — FirebaseFunctionsSecrets.synchronize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PickerDataAdapter._parsePickerDataItem (cognitive 18) · ×1
  • _PickerDataAdapter._parsePickerDataItem (cognitive 18) packages/katana_form/lib/src/picker/picker.dart:896 — _PickerDataAdapter._parsePickerDataItem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelDateRangeFilter._hasMatch (cognitive 18) · ×1
  • ModelDateRangeFilter._hasMatch (cognitive 18) packages/katana_model/lib/src/model_field_value.dart:2766 — ModelDateRangeFilter._hasMatch has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 7. 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.
D2 · Cognitive Complexity · RuntimeVectorConverter.seekIndex (cognitive 18) · ×1
  • RuntimeVectorConverter.seekIndex (cognitive 18) packages/katana_model/lib/src/vector_converter.dart:148 — RuntimeVectorConverter.seekIndex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppThemeData.toThemeData (cognitive 18) · ×1
  • AppThemeData.toThemeData (cognitive 18) packages/katana_theme/lib/src/app_theme_data.dart:1364 — AppThemeData.toThemeData has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 1, match/switch 1 (nesting depth added 8). 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 · MarkdownClipboard._getIndentAtSelection (cognitive 18) · ×1
  • MarkdownClipboard._getIndentAtSelection (cognitive 18) packages/masamune_markdown/lib/src/markdown_clipboard.dart:578 — MarkdownClipboard._getIndentAtSelection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormPainterFieldState._handledOnDragEnd (cognitive 18) · ×1
  • FormPainterFieldState._handledOnDragEnd (cognitive 18) packages/masamune_painter/lib/src/form_painter_field.dart:622 — FormPainterFieldState._handledOnDragEnd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StripeAuthorization.authorization (cognitive 18) · ×1
  • StripeAuthorization.authorization (cognitive 18) packages/masamune_purchase_stripe/lib/src/stripe_authorization.dart:52 — StripeAuthorization.authorization has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppKeystoreCliAction.applyGradle (cognitive 17) · ×1
  • AppKeystoreCliAction.applyGradle (cognitive 17) packages/katana_cli/lib/action/app/keystore.dart:261 — AppKeystoreCliAction.applyGradle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppKeystoreCliAction._applyGitignore (cognitive 17) · ×1
  • AppKeystoreCliAction._applyGitignore (cognitive 17) packages/katana_cli/lib/action/app/keystore.dart:360 — AppKeystoreCliAction._applyGitignore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareKvCliAction.exec (cognitive 17) · ×1
  • CloudflareKvCliAction.exec (cognitive 17) packages/katana_cli/lib/action/cloudflare/kv.dart:30 — CloudflareKvCliAction.exec has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CloudflarePagesCliAction._resolveAccountId (cognitive 17) · ×1
  • CloudflarePagesCliAction._resolveAccountId (cognitive 17) packages/katana_cli/lib/action/cloudflare/pages.dart:394 — CloudflarePagesCliAction._resolveAccountId has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (5 pts), error handling 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudflareStorageCliAction._hasCustomStorageBackupConsumer (cognitive 17) · ×1
  • CloudflareStorageCliAction._hasCustomStorageBackupConsumer (cognitive 17) packages/katana_cli/lib/action/cloudflare/storage.dart:637 — CloudflareStorageCliAction._hasCustomStorageBackupConsumer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonDocumentSourceModelAdapter.fromJson (cognitive 17) · ×1
  • JsonDocumentSourceModelAdapter.fromJson (cognitive 17) packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:262 — JsonDocumentSourceModelAdapter.fromJson has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitPullRequestCliCommand.exec (cognitive 17) · ×1
  • GitPullRequestCliCommand.exec (cognitive 17) packages/katana_cli/lib/command/git/pull_request.dart:20 — GitPullRequestCliCommand.exec has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ThemeGenerator.generateForAnnotatedElement (cognitive 17) · ×1
  • ThemeGenerator.generateForAnnotatedElement (cognitive 17) packages/katana_theme_builder/lib/generator/theme_generator.dart:14 — ThemeGenerator.generateForAnnotatedElement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AuthDatabase.confirmSignIn (cognitive 17) · ×1
  • AuthDatabase.confirmSignIn (cognitive 17) packages/katana_auth/lib/src/auth_database.dart:698 — AuthDatabase.confirmSignIn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PickerDataAdapter.setColumn (cognitive 17) · ×1
  • _PickerDataAdapter.setColumn (cognitive 17) packages/katana_form/lib/src/picker/picker.dart:929 — _PickerDataAdapter.setColumn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DateTimePickerAdapter._calcHourOfAMPM (cognitive 17) · ×1
  • _DateTimePickerAdapter._calcHourOfAMPM (cognitive 17) packages/katana_form/lib/src/picker/picker.dart:1798 — _DateTimePickerAdapter._calcHourOfAMPM has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GeoUtility.decodeBbox (cognitive 17) · ×1
  • _GeoUtility.decodeBbox (cognitive 17) packages/katana_model/lib/src/model_geo_value.dart:626 — _GeoUtility.decodeBbox has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelRefListBuilder._build (cognitive 17) · ×1
  • ModelRefListBuilder._build (cognitive 17) packages/katana_model/lib/src/model_ref.dart:861 — ModelRefListBuilder._build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ModelRefMapBuilder._build) 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 · ModelRefMapBuilder._build (cognitive 17) · ×1
  • ModelRefMapBuilder._build (cognitive 17) packages/katana_model/lib/src/model_ref.dart:1073 — ModelRefMapBuilder._build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ModelRefListBuilder._build) 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 · MarkdownController._insertBlockSingleField (cognitive 17) · ×1
  • MarkdownController._insertBlockSingleField (cognitive 17) packages/masamune_markdown/lib/src/markdown_controller.dart:563 — MarkdownController._insertBlockSingleField has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController._insertBlockMultiField) 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 · MarkdownController._insertBlockMultiField (cognitive 17) · ×1
  • MarkdownController._insertBlockMultiField (cognitive 17) packages/masamune_markdown/lib/src/markdown_controller.dart:634 — MarkdownController._insertBlockMultiField has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MarkdownController._insertBlockSingleField) 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 · _RenderMarkdownEditor._handleTapDown (cognitive 17) · ×1
  • _RenderMarkdownEditor._handleTapDown (cognitive 17) packages/masamune_markdown/lib/src/markdown_field.dart:3646 — _RenderMarkdownEditor._handleTapDown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormPainterToolbarState.inlineMode (cognitive 17) · ×1
  • FormPainterToolbarState.inlineMode (cognitive 17) packages/masamune_painter/lib/src/form_painter_toolbar.dart:815 — FormPainterToolbarState.inlineMode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PainterController.createClippingGroupFromSelection (cognitive 17) · ×1
  • PainterController.createClippingGroupFromSelection (cognitive 17) packages/masamune_painter/lib/src/painter_controller.dart:729 — PainterController.createClippingGroupFromSelection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DraggableTreeTileState._buildTileContent (cognitive 17) · ×1
  • _DraggableTreeTileState._buildTileContent (cognitive 17) packages/masamune_painter/lib/src/painter_layer_list.dart:660 — _DraggableTreeTileState._buildTileContent has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UniversalColumn._createRows (cognitive 17) · ×1
  • UniversalColumn._createRows (cognitive 17) packages/masamune_universal_ui/lib/src/universal_column.dart:345 — UniversalColumn._createRows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListBuilder._builder (cognitive 17) · ×1
  • ListBuilder._builder (cognitive 17) packages/masamune/lib/ui/list_builder.dart:258 — ListBuilder._builder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ReorderableListBuilderState._builder (cognitive 17) · ×1
  • _ReorderableListBuilderState._builder (cognitive 17) packages/masamune/lib/ui/reorderable_list_builder.dart:465 — _ReorderableListBuilderState._builder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PermissionValue.toValidationQueryString (cognitive 17) · ×1
  • PermissionValue.toValidationQueryString (cognitive 17) packages/masamune_builder/lib/value/permission_value.dart:61 — PermissionValue.toValidationQueryString has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 4 (8 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RestApiModelAdapter.loadCollection (cognitive 16) · ×1
  • RestApiModelAdapter.loadCollection (cognitive 16) packages/katana_model/lib/adapter/rest_api_model_adapter.dart:108 — RestApiModelAdapter.loadCollection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KatanaEnvironmentFixPlan.inspect (cognitive 16) · ×1
  • KatanaEnvironmentFixPlan.inspect (cognitive 16) packages/katana_cli/lib/command/fix.dart:51 — KatanaEnvironmentFixPlan.inspect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4, boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FormFutureFieldState.build (cognitive 16) · ×1
  • _FormFutureFieldState.build (cognitive 16) packages/katana_form/lib/form/form_future_field.dart:338 — _FormFutureFieldState.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 4, boolean chains 2, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WranglerEnvironmentSynchronizer._findClosingBracket (cognitive 16) · ×1
  • WranglerEnvironmentSynchronizer._findClosingBracket (cognitive 16) packages/katana_cli/lib/src/cloudflare_environment.dart:556 — WranglerEnvironmentSynchronizer._findClosingBracket has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (WranglerEnvironmentSynchronizer._findClosingBrace) 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 · WranglerEnvironmentSynchronizer._findClosingBrace (cognitive 16) · ×1
  • WranglerEnvironmentSynchronizer._findClosingBrace (cognitive 16) packages/katana_cli/lib/src/cloudflare_environment.dart:587 — WranglerEnvironmentSynchronizer._findClosingBrace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (WranglerEnvironmentSynchronizer._findClosingBracket) 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 · ModelCounterFilter._hasMatch (cognitive 16) · ×1
  • ModelCounterFilter._hasMatch (cognitive 16) packages/katana_model/lib/src/model_field_value.dart:851 — ModelCounterFilter._hasMatch has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. 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. This shape REPEATS in the file: 2 other methods here (ModelTimestampRangeFilter._hasMatch, ModelTimeRangeFilter._hasMatch) 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 · ModelTimestampRangeFilter._hasMatch (cognitive 16) · ×1
  • ModelTimestampRangeFilter._hasMatch (cognitive 16) packages/katana_model/lib/src/model_field_value.dart:2435 — ModelTimestampRangeFilter._hasMatch has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. 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. This shape REPEATS in the file: 2 other methods here (ModelCounterFilter._hasMatch, ModelTimeRangeFilter._hasMatch) 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 · ModelTimeRangeFilter._hasMatch (cognitive 16) · ×1
  • ModelTimeRangeFilter._hasMatch (cognitive 16) packages/katana_model/lib/src/model_field_value.dart:3110 — ModelTimeRangeFilter._hasMatch has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. 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. This shape REPEATS in the file: 2 other methods here (ModelCounterFilter._hasMatch, ModelTimestampRangeFilter._hasMatch) 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 · ModelServerCommandBaseFilter._hasMatch (cognitive 16) · ×1
  • ModelServerCommandBaseFilter._hasMatch (cognitive 16) packages/katana_model/lib/src/model_server_command.dart:319 — ModelServerCommandBaseFilter._hasMatch has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. 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.
D2 · Cognitive Complexity · NoSqlDatabase.loadCollection (cognitive 16) · ×1
  • NoSqlDatabase.loadCollection (cognitive 16) packages/katana_model/lib/src/no_sql_database.dart:371 — NoSqlDatabase.loadCollection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NoSqlDatabase.syncCollection (cognitive 16) · ×1
  • NoSqlDatabase.syncCollection (cognitive 16) packages/katana_model/lib/src/no_sql_database.dart:462 — NoSqlDatabase.syncCollection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AnimatedImageStreamCompleter._loadAllImages (cognitive 16) · ×1
  • AnimatedImageStreamCompleter._loadAllImages (cognitive 16) packages/katana_theme/lib/src/animated_image_provider.dart:117 — AnimatedImageStreamCompleter._loadAllImages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AIDebugOverlayState._buildCameraPanel (cognitive 16) · ×1
  • _AIDebugOverlayState._buildCameraPanel (cognitive 16) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1476 — _AIDebugOverlayState._buildCameraPanel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (7 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Experiment.run (cognitive 16) · ×1
  • Experiment.run (cognitive 16) packages/masamune_experiment/lib/src/experiment.dart:165 — Experiment.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormPainterFieldState._getResizeDirection (cognitive 16) · ×1
  • FormPainterFieldState._getResizeDirection (cognitive 16) packages/masamune_painter/lib/src/form_painter_field.dart:694 — FormPainterFieldState._getResizeDirection has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. 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.
D2 · Cognitive Complexity · PainterController.createGroup (cognitive 16) · ×1
  • PainterController.createGroup (cognitive 16) packages/masamune_painter/lib/src/painter_controller.dart:848 — PainterController.createGroup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextToSpeechController.speak (cognitive 16) · ×1
  • TextToSpeechController.speak (cognitive 16) packages/masamune_text_to_speech/lib/src/text_to_speech_controller.dart:109 — TextToSpeechController.speak has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Breakpoint.shouldShowSideBar (cognitive 16) · ×1
  • Breakpoint.shouldShowSideBar (cognitive 16) packages/masamune_universal_ui/lib/src/breakpoint.dart:114 — Breakpoint.shouldShowSideBar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). 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 · LineTile.build (cognitive 16) · ×1
  • LineTile.build (cognitive 16) packages/katana_ui/lib/ui/line_tile.dart:193 — LineTile.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: text_to_speech.dart → location.dart, authentication.dart, init.dart, purchase.dart packages/katana_cli/lib/action/app/text_to_speech.dart — `packages/katana_cli/lib/action/app/text_to_speech.dart` changes together with 4 other files — `packages/katana_cli/lib/action/app/location.dart`, `packages/katana_cli/lib/action/firebase/authentication.dart`, `packages/katana_cli/lib/action/firebase/init.dart`, `packages/katana_cli/lib/action/purchase/purchase.dart` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: android.dart, ios.dart, web.dart, git.dart packages/katana_cli/lib/action/git/platform/android.dart — 4 files — `packages/katana_cli/lib/action/git/platform/android.dart`, `packages/katana_cli/lib/action/git/platform/ios.dart`, `packages/katana_cli/lib/action/git/platform/web.dart`, `packages/katana_cli/lib/command/git/git.dart` — all change together with no explicit dependency: a fully-connected co-change clique, not 6 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (15 members, 95 shared lines) · ×1
  • Near-duplicate member family (15 members, 95 shared lines) packages/katana_form/lib/form/form_chips_field.dart:483 — packages/katana_form/lib/form/form_chips_field.dart:483-704 | packages/katana_form/lib/form/form_container.dart:279-409 | packages/katana_form/lib/form/form_date_field.dart:510-699 | packages/katana_form/lib/form/form_date_time_field.dart:454-643 | packages/katana_form/lib/form/form_date_time_range_field.dart:433-622 | packages/katana_form/lib/form/form_duration_field.dart:462-648 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:345-546 | packages/katana_form/lib/form/form_enum_modal_field.dart:396-585 | packages/katana_form/lib/form/form_future_field.dart:338-554 | packages/katana_form/lib/form/form_map_dropdown_field.dart:272-477 | packages/katana_form/lib/form/form_map_modal_field.dart:334-523 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:374-587 | packages/katana_form/lib/form/form_month_modal_field.dart:344-533 | packages/katana_form/lib/form/form_num_modal_field.dart:314-503 | packages/katana_form/lib/form/form_text_field.dart:730-932 — These 15 members are variants of one another: a block of 95 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 15 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 15 times.
D4 · Code Duplication · Near-duplicate member family (14 members, 29 shared lines) · ×1
  • Near-duplicate member family (14 members, 29 shared lines) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:85 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:85-126 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:66-107 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:75-116 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:77-118 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:73-114 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:76-117 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:71-112 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:70-111 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:66-107 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:75-116 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:66-107 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:75-116 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:73-114 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:73-114 — These 14 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 14 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 14 times.
D4 · Code Duplication · Near-duplicate member family (13 members, 30 shared lines) · ×1
  • Near-duplicate member family (13 members, 30 shared lines) packages/katana_cli/lib/command/code/page.dart:30 — packages/katana_cli/lib/command/code/page.dart:30-83 | packages/katana_cli/lib/command/code/view/fixedform.dart:31-85 | packages/katana_cli/lib/command/code/view/fixedform_add.dart:31-73 | packages/katana_cli/lib/command/code/view/fixedform_edit.dart:31-73 | packages/katana_cli/lib/command/code/view/fixedview.dart:31-73 | packages/katana_cli/lib/command/code/view/gridview.dart:31-84 | packages/katana_cli/lib/command/code/view/listform.dart:31-96 | packages/katana_cli/lib/command/code/view/listform_add.dart:31-84 | packages/katana_cli/lib/command/code/view/listform_edit.dart:31-84 | packages/katana_cli/lib/command/code/view/listview.dart:31-84 | packages/katana_cli/lib/command/code/view/navigation.dart:31-84 | packages/katana_cli/lib/command/code/view/page.dart:30-83 | packages/katana_cli/lib/command/code/view/tab.dart:31-84 — These 13 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
D4 · Code Duplication · Near-duplicate member family (12 members, 23 shared lines) · ×1
  • Near-duplicate member family (12 members, 23 shared lines) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:15 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:15-70 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:31-115 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:16-107 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:16-119 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:16-68 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:15-76 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:30-114 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:16-107 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:32-112 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:16-107 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:15-67 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:16-68 — These 12 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
D4 · Code Duplication · Near-duplicate member family (8 members, 43 shared lines) · ×1
  • Near-duplicate member family (8 members, 43 shared lines) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:103 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:103-225 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:154-238 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:103-181 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:103-181 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:103-181 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:101-177 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:114-192 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:127-265 — These 8 members are variants of one another: a block of 43 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Near-duplicate member family (8 members, 33 shared lines) · ×1
  • Near-duplicate member family (8 members, 33 shared lines) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:103 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:103-225 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:154-238 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:103-181 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:103-181 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:103-181 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:206-323 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:101-177 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:114-192 — These 8 members are variants of one another: a block of 33 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 21 shared lines) · ×1
  • Near-duplicate member family (6 members, 21 shared lines) packages/masamune_markdown/lib/src/markdown_controller.dart:2388 — packages/masamune_markdown/lib/src/markdown_controller.dart:2388-2489 | packages/masamune_markdown/lib/src/markdown_controller.dart:2491-2590 | packages/masamune_markdown/lib/src/markdown_controller.dart:2640-2730 | packages/masamune_markdown/lib/src/markdown_controller.dart:2732-2821 | packages/masamune_markdown/lib/src/markdown_controller.dart:2950-3030 | packages/masamune_markdown/lib/src/markdown_controller.dart:3032-3109 — These 6 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 11 shared lines) · ×1
  • Near-duplicate member family (6 members, 11 shared lines) packages/katana_cli/lib/action/app/deeplink.dart:34 — packages/katana_cli/lib/action/app/deeplink.dart:34-494 | packages/katana_cli/lib/action/app/location.dart:37-333 | packages/katana_cli/lib/action/app/text_to_speech.dart:35-139 | packages/katana_cli/lib/action/firebase/authentication.dart:45-898 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:33-379 | packages/katana_cli/lib/action/stripe/stripe.dart:35-540 — These 6 members are variants of one another: a block of 11 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 25 shared lines) · ×1
  • Near-duplicate member family (4 members, 25 shared lines) packages/katana_model/lib/adapter/runtime_model_adapter.dart:172 — packages/katana_model/lib/adapter/runtime_model_adapter.dart:172-234 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:697-747 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:625-675 | packages/katana_model_local/lib/adapter/local_model_adapter.dart:176-229 — These 4 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 68 shared lines) · ×1
  • Near-duplicate member family (3 members, 68 shared lines) packages/masamune_model_d1_builder/lib/src/builder.dart:12 — packages/masamune_model_d1_builder/lib/src/builder.dart:12-103 | packages/masamune_model_do_builder/lib/src/builder.dart:12-101 | packages/masamune_model_tidb_builder/lib/src/builder.dart:12-115 — These 3 members are variants of one another: a block of 68 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 32 shared lines) · ×1
  • Near-duplicate member family (3 members, 32 shared lines) packages/katana_cli/lib/action/app/csr.dart:31 — packages/katana_cli/lib/action/app/csr.dart:31-139 | packages/katana_cli/lib/action/app/keystore.dart:360-400 | packages/katana_cli/lib/action/app/p12.dart:31-154 — These 3 members are variants of one another: a block of 32 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member pair (362 shared lines) · ×1
  • Near-duplicate member pair (362 shared lines) packages/katana_cli/lib/command/create.dart:142 — packages/katana_cli/lib/command/create.dart:142-562 | packages/katana_cli/lib/command/create.dart:581-1021 — These two members are variants of one another: 362 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (138 shared lines) · ×1
  • Near-duplicate member pair (138 shared lines) packages/katana_cli/lib/command/git/pull_request.dart:20 — packages/katana_cli/lib/command/git/pull_request.dart:20-195 | packages/katana_cli/lib/command/git/pull_request_comment.dart:21-169 — These two members are variants of one another: 138 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (91 shared lines) · ×1
  • Near-duplicate member pair (91 shared lines) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:12 — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:12-169 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:13-313 — These two members are variants of one another: 91 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (58 shared lines) · ×1
  • Near-duplicate member pair (58 shared lines) packages/masamune_builder/lib/generator/collection_model_generator.dart:13 — packages/masamune_builder/lib/generator/collection_model_generator.dart:13-120 | packages/masamune_builder/lib/generator/document_model_generator.dart:12-101 — These two members are variants of one another: 58 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (41 shared lines) · ×1
  • Near-duplicate member pair (41 shared lines) packages/katana_model/lib/src/model_ref.dart:861 — packages/katana_model/lib/src/model_ref.dart:861-908 | packages/katana_model/lib/src/model_ref.dart:1073-1122 — These two members are variants of one another: 41 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (40 shared lines) · ×1
  • Near-duplicate member pair (40 shared lines) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1366 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1366-1474 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:1476-1573 — These two members are variants of one another: 40 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (63 corresponding lines) · ×1
  • Edited copy of a member (63 corresponding lines) packages/katana_cli/lib/action/app/geocoding.dart:32 — packages/katana_cli/lib/action/app/geocoding.dart:32-98 | packages/katana_cli/lib/action/mail/send_grid.dart:32-97 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (25 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (25 members, 50+ identical tokens) packages/masamune_painter/lib/src/painter_tools.dart:182 — packages/masamune_painter/lib/src/painter_tools.dart:182-195 | packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart:46-63 | packages/masamune_painter/lib/tools/block/text/paragraph_align_justify_text_painter_block_tools.dart:46-63 | packages/masamune_painter/lib/tools/block/text/paragraph_align_left_text_painter_block_tools.dart:46-63 | packages/masamune_painter/lib/tools/block/text/paragraph_align_right_text_painter_block_tools.dart:46-63 | packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_128px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_12px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_14px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_16px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_18px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_20px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_24px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_28px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_32px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_36px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_40px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_48px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_56px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_64px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_80px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/size_96px_font_painter_block_tools.dart:69-87 | packages/masamune_painter/lib/tools/block/text/style_bold_font_painter_block_tools.dart:66-86 | packages/masamune_painter/lib/tools/block/text/style_normal_font_painter_block_tools.dart:69-87 — These 25 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 25 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 25 times.
D4 · Code Duplication · Members sharing a duplicated core (18 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (18 members, 50+ identical tokens) packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:51 — packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_128px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_12px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_14px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_16px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_18px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_20px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_24px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_28px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_32px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_36px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_40px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_48px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_56px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_64px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_80px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_96px_font_painter_block_tools.dart:51-64 — These 18 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 18 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 18 times.
D4 · Code Duplication · Members sharing a duplicated core (17 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (17 members, 50+ identical tokens) packages/katana_model_firestore/lib/converter/firestore_model_command_base_converter.dart:45 — packages/katana_model_firestore/lib/converter/firestore_model_command_base_converter.dart:45-75 | packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:72-151 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:117-183 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:109-185 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:121-207 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:70-136 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:78-161 | packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:41-81 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:38-87 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:116-200 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:109-185 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:114-212 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:109-186 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:38-88 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:69-135 | packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:54-97 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:70-136 — These 17 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 17 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 17 times.
D4 · Code Duplication · Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (15 members, 50+ identical tokens) packages/katana_model/lib/src/model_field_value.dart:793 — packages/katana_model/lib/src/model_field_value.dart:793-849 | packages/katana_model/lib/src/model_field_value.dart:1197-1253 | packages/katana_model/lib/src/model_field_value.dart:1580-1636 | packages/katana_model/lib/src/model_field_value.dart:2020-2076 | packages/katana_model/lib/src/model_field_value.dart:2380-2433 | packages/katana_model/lib/src/model_field_value.dart:2711-2764 | packages/katana_model/lib/src/model_field_value.dart:3055-3108 | packages/katana_model/lib/src/model_geo_value.dart:206-268 | packages/katana_model/lib/src/model_locale.dart:757-805 | packages/katana_model/lib/src/model_ref.dart:362-410 | packages/katana_model/lib/src/model_server_command.dart:269-317 | packages/katana_model/lib/src/model_uri.dart:202-255 | packages/katana_model/lib/src/model_uri.dart:498-551 | packages/katana_model/lib/src/model_uri.dart:807-860 | packages/katana_model/lib/src/model_vector_value.dart:382-397 — These 15 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 15 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 15 times.
D4 · Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (11 members, 50+ identical tokens) packages/katana_cli/lib/action/ads/ads.dart:37 — packages/katana_cli/lib/action/ads/ads.dart:37-154 | packages/katana_cli/lib/action/app/deeplink.dart:34-494 | packages/katana_cli/lib/action/app/local_notification.dart:36-284 | packages/katana_cli/lib/action/app/location.dart:37-333 | packages/katana_cli/lib/action/firebase/authentication.dart:45-898 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:33-379 | packages/katana_cli/lib/action/firebase/init.dart:476-1551 | packages/katana_cli/lib/action/firebase/messaging.dart:93-522 | packages/katana_cli/lib/action/purchase/purchase.dart:42-343 | packages/katana_cli/lib/action/stripe/stripe.dart:35-540 | packages/katana_cli/lib/src/app_info.dart:286-311 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication · Edited copy of a member (114 corresponding lines) · ×1
  • Edited copy of a member (114 corresponding lines) packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:51 — packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:51-164 | packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:54-167 — These two members are one piece of code written twice and then edited apart: 114 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:568 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:568-645 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:508-573 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×1
  • Edited copy of a member (46 corresponding lines) packages/katana_model/lib/src/model_geo_value.dart:270 — packages/katana_model/lib/src/model_geo_value.dart:270-317 | packages/katana_model/lib/src/model_locale.dart:807-852 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (78 corresponding lines) · ×1
  • Edited copy of a member (78 corresponding lines) packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:13 — packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:13-91 | packages/katana_localization_builder/lib/generator/yaml_localize_generator.dart:12-89 — These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (70 corresponding lines) · ×1
  • Edited copy of a member (70 corresponding lines) packages/katana_form/lib/form/form_date_time_field.dart:994 — packages/katana_form/lib/form/form_date_time_field.dart:994-1072 | packages/katana_form/lib/form/form_date_time_field.dart:1128-1197 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) packages/katana_model/lib/src/model_field_value.dart:1638 — packages/katana_model/lib/src/model_field_value.dart:1638-1675 | packages/katana_model/lib/src/model_field_value.dart:2078-2134 — 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 (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) packages/masamune_ads_google/lib/src/others/google_ad_interstitial.dart:85 — packages/masamune_ads_google/lib/src/others/google_ad_interstitial.dart:85-146 | packages/masamune_ads_google/lib/src/others/google_ad_rewarded.dart:86-147 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) packages/masamune_markdown/lib/src/markdown_controller.dart:563 — packages/masamune_markdown/lib/src/markdown_controller.dart:563-632 | packages/masamune_markdown/lib/src/markdown_controller.dart:634-701 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) packages/katana_cli/lib/action/cloudflare/storage.dart:927 — packages/katana_cli/lib/action/cloudflare/storage.dart:927-974 | packages/katana_cli/lib/action/cloudflare/storage.dart:976-1031 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (123 corresponding lines) · ×1
  • Edited copy of a member (123 corresponding lines) packages/katana_cli/lib/command/code/collection.dart:89 — packages/katana_cli/lib/command/code/collection.dart:89-211 | packages/katana_cli/lib/command/code/document.dart:89-211 — These two members are one piece of code written twice and then edited apart: 123 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 46+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 46+ corresponding lines) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:106 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:106-153 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:109-154 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:110-155 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 46 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or 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 (60 corresponding lines) · ×1
  • Edited copy of a member (60 corresponding lines) packages/katana_cli/lib/command/git/commit.dart:18 — packages/katana_cli/lib/command/git/commit.dart:18-79 | packages/katana_cli/lib/command/git/remove.dart:18-77 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 41+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 41+ corresponding lines) packages/masamune_model_d1_builder/lib/src/builder.dart:155 — packages/masamune_model_d1_builder/lib/src/builder.dart:155-200 | packages/masamune_model_do_builder/lib/src/builder.dart:152-197 | packages/masamune_model_tidb_builder/lib/src/builder.dart:167-207 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or 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 (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) packages/masamune_universal_ui/lib/src/universal_column.dart:345 — packages/masamune_universal_ui/lib/src/universal_column.dart:345-393 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:342-406 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 28+ corresponding lines) packages/katana_model/lib/src/model_field_value.dart:2435 — packages/katana_model/lib/src/model_field_value.dart:2435-2462 | packages/katana_model/lib/src/model_field_value.dart:2766-2795 | packages/katana_model/lib/src/model_field_value.dart:3110-3137 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) packages/katana_cli/lib/command/code/server/schedule.dart:242 — packages/katana_cli/lib/command/code/server/schedule.dart:242-294 | packages/katana_cli/lib/command/code/server/worker.dart:24-65 — 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 (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) packages/masamune_painter/lib/src/painter_layer_list.dart:287 — packages/masamune_painter/lib/src/painter_layer_list.dart:287-342 | packages/masamune_painter/lib/src/painter_layer_list.dart:345-400 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:534 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:534-569 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:543-579 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:252 — packages/masamune_ai_firebase/lib/adapter/firebase_ai_masamune_adapter.dart:252-301 | packages/masamune_ai_openai/lib/adapter/openai_ai_masamune_adapter.dart:64-104 — 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 copies of one member (4 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 30+ corresponding lines) packages/katana_cli/lib/command/code/controller.dart:31 — packages/katana_cli/lib/command/code/controller.dart:31-60 | packages/katana_cli/lib/command/code/stateful.dart:31-60 | packages/katana_cli/lib/command/code/stateless.dart:31-60 | packages/katana_cli/lib/command/code/widget.dart:31-60 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) packages/katana_model/lib/src/model_server_command.dart:138 — packages/katana_model/lib/src/model_server_command.dart:138-174 | packages/katana_model/lib/src/model_server_command.dart:176-205 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) packages/katana_model/lib/src/collection_base.dart:264 — packages/katana_model/lib/src/collection_base.dart:264-308 | packages/katana_model/lib/src/document_base.dart:252-295 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) packages/masamune_markdown/lib/src/markdown_controller.dart:735 — packages/masamune_markdown/lib/src/markdown_controller.dart:735-783 | packages/masamune_markdown/lib/src/markdown_controller.dart:785-831 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) packages/masamune_painter/lib/src/form_painter_toolbar.dart:406 — packages/masamune_painter/lib/src/form_painter_toolbar.dart:406-460 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:462-527 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) packages/katana_form/lib/form/form_pin_field.dart:368 — packages/katana_form/lib/form/form_pin_field.dart:368-401 | packages/katana_form/lib/form/form_text_field.dart:1531-1561 — 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 (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) packages/masamune_universal_ui/lib/src/universal_grid_view.dart:313 — packages/masamune_universal_ui/lib/src/universal_grid_view.dart:313-376 | packages/masamune_universal_ui/lib/src/universal_list_view.dart:289-340 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 27+ corresponding lines) packages/katana_cli/lib/command/code/collection.dart:31 — packages/katana_cli/lib/command/code/collection.dart:31-60 | packages/katana_cli/lib/command/code/document.dart:31-60 | packages/katana_cli/lib/command/code/value.dart:28-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:260 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:260-284 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:266-291 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:250-276 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 25+ corresponding lines) packages/katana_cli/lib/command/code/cache.dart:28 — packages/katana_cli/lib/command/code/cache.dart:28-52 | packages/katana_cli/lib/command/code/enum.dart:28-52 | packages/katana_cli/lib/command/code/model_adapter.dart:28-52 | packages/katana_cli/lib/command/code/query.dart:28-52 | packages/katana_cli/lib/command/code/redirect_query.dart:28-52 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) packages/masamune_markdown/lib/adapter/markdown_masamune_adapter.dart:125 — packages/masamune_markdown/lib/adapter/markdown_masamune_adapter.dart:125-159 | packages/masamune_painter/lib/adapter/painter_masamune_adapter.dart:222-265 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) packages/masamune_markdown/lib/tools/block/add/code_add_markdown_block_tools.dart:79 — packages/masamune_markdown/lib/tools/block/add/code_add_markdown_block_tools.dart:79-117 | packages/masamune_markdown/lib/tools/block/exchange/quote_exchange_markdown_block_tools.dart:90-126 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 46+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 46+ corresponding lines) packages/katana_cli/lib/command/code/function.dart:59 — packages/katana_cli/lib/command/code/function.dart:59-111 | packages/katana_cli/lib/command/code/server/call.dart:243-288 | packages/katana_cli/lib/command/code/server/worker.dart:189-237 | packages/katana_cli/lib/command/create.dart:3075-3206 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 46 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:228 — packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:228-255 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:257-277 | packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart:279-300 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 29+ corresponding lines) packages/masamune_model_d1_builder/lib/src/builder.dart:257 — packages/masamune_model_d1_builder/lib/src/builder.dart:257-285 | packages/masamune_model_do_builder/lib/src/builder.dart:244-275 | packages/masamune_model_tidb_builder/lib/src/builder.dart:257-285 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 32+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 32+ corresponding lines) packages/katana_router_builder/lib/generator/nested_page_generator.dart:12 — packages/katana_router_builder/lib/generator/nested_page_generator.dart:12-43 | packages/masamune_builder/lib/generator/controller_generator.dart:12-47 | packages/masamune_builder/lib/generator/controller_group_generator.dart:12-47 | packages/masamune_builder/lib/generator/form_value_generator.dart:12-54 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) packages/katana_cli/lib/action/cloudflare/kv.dart:188 — packages/katana_cli/lib/action/cloudflare/kv.dart:188-204 | packages/katana_cli/lib/action/cloudflare/storage.dart:677-694 | packages/katana_cli/lib/action/cloudflare/turso.dart:424-444 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 19+ corresponding lines) packages/katana_cli/lib/src/xcode.dart:1067 — packages/katana_cli/lib/src/xcode.dart:1067-1089 | packages/katana_cli/lib/src/xcode.dart:1190-1209 | packages/katana_cli/lib/src/xcode.dart:1340-1362 | packages/katana_cli/lib/src/xcode.dart:1497-1515 | packages/katana_cli/lib/src/xcode.dart:1644-1665 | packages/katana_cli/lib/src/xcode.dart:1794-1813 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 22+ corresponding lines) packages/masamune_model_d1/lib/actions/d1_get_model_functions_action.dart:90 — packages/masamune_model_d1/lib/actions/d1_get_model_functions_action.dart:90-111 | packages/masamune_model_do/lib/actions/do_get_model_functions_action.dart:90-112 | packages/masamune_model_tidb/lib/actions/tidb_get_model_functions_action.dart:89-110 | packages/masamune_model_turso/lib/actions/turso_get_model_functions_action.dart:94-116 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 24+ corresponding lines) packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:65 — packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:65-91 | packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:93-119 | packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:121-147 | packages/masamune_calendar/lib/delegate/marker_calendar_delegate.dart:149-172 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 21+ corresponding lines) packages/masamune_markdown/lib/src/markdown_controller.dart:412 — packages/masamune_markdown/lib/src/markdown_controller.dart:412-435 | packages/masamune_markdown/lib/src/markdown_controller.dart:437-457 | packages/masamune_markdown/lib/src/markdown_controller.dart:482-505 | packages/masamune_markdown/lib/src/markdown_controller.dart:507-527 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 25+ corresponding lines) packages/masamune_markdown/lib/tools/block/exchange/bulleted_list_exchange_markdown_block_tools.dart:56 — packages/masamune_markdown/lib/tools/block/exchange/bulleted_list_exchange_markdown_block_tools.dart:56-80 | packages/masamune_markdown/lib/tools/block/exchange/code_exchange_markdown_block_tools.dart:55-79 | packages/masamune_markdown/lib/tools/block/exchange/headline_1_exchange_markdown_block_tools.dart:55-79 | packages/masamune_markdown/lib/tools/block/exchange/headline_2_exchange_markdown_block_tools.dart:55-79 | packages/masamune_markdown/lib/tools/block/exchange/headline_3_exchange_markdown_block_tools.dart:55-79 | packages/masamune_markdown/lib/tools/block/exchange/quote_exchange_markdown_block_tools.dart:55-79 | packages/masamune_markdown/lib/tools/block/exchange/text_exchange_markdown_block_tools.dart:51-75 | packages/masamune_markdown/lib/tools/block/exchange/toggle_list_exchange_markdown_block_tools.dart:55-79 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies 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) packages/katana_model/lib/adapter/rest_api_model_adapter.dart:181 — packages/katana_model/lib/adapter/rest_api_model_adapter.dart:181-196 | packages/katana_model/lib/adapter/rest_api_model_adapter.dart:198-212 | packages/katana_model_local/lib/src/local_async_saving_manager.dart:39-59 | packages/katana_model_local/lib/src/local_async_saving_manager.dart:61-77 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 14+ corresponding lines) packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:32 — packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:32-47 | packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:49-65 | packages/masamune_model_firebase_data_connect_builder/lib/src/builder.dart:67-83 | packages/masamune_model_firestore_builder/lib/src/builder.dart:20-33 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 13+ corresponding lines) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:109 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:109-121 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:109-121 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:109-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:35 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:35-39 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:35-39 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:35-39 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 12+ corresponding lines) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:187 — packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:187-198 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:187-198 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:188-199 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:118-129 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:118-129 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:118-129 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) packages/masamune_model_d1_builder/lib/src/builder.dart:120 — packages/masamune_model_d1_builder/lib/src/builder.dart:120-135 | packages/masamune_model_do_builder/lib/src/builder.dart:118-132 | packages/masamune_model_tidb_builder/lib/src/builder.dart:132-147 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (109 corresponding lines) · ×1
  • Edited copy of a member (109 corresponding lines) packages/katana_cli/lib/action/git/platform/ios.dart:451 — packages/katana_cli/lib/action/git/platform/ios.dart:451-665 | packages/katana_cli/lib/action/git/platform/web.dart:134-242 — These two members are one piece of code written twice and then edited apart: 109 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:128 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:128-136 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:119-127 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:113-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 4+ corresponding lines) packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:110 — packages/masamune_markdown/lib/tools/inline/font/bold_font_markdown_inline_tools.dart:110-113 | packages/masamune_markdown/lib/tools/inline/font/code_font_markdown_inline_tools.dart:110-113 | packages/masamune_markdown/lib/tools/inline/font/italic_font_markdown_inline_tools.dart:110-113 | packages/masamune_markdown/lib/tools/inline/font/link_markdown_inline_tools.dart:108-111 | packages/masamune_markdown/lib/tools/inline/font/strike_font_markdown_inline_tools.dart:110-113 | packages/masamune_markdown/lib/tools/inline/font/underline_font_markdown_inline_tools.dart:111-114 | packages/masamune_markdown/lib/tools/primary/mention_markdown_primary_tools.dart:114-117 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 6+ corresponding lines) packages/katana_form/lib/form/form_date_time_range_field.dart:816 — packages/katana_form/lib/form/form_date_time_range_field.dart:816-821 | packages/katana_form/lib/form/form_duration_field.dart:843-848 | packages/katana_form/lib/form/form_enum_modal_field.dart:768-773 | packages/katana_form/lib/form/form_map_modal_field.dart:704-709 | packages/katana_form/lib/form/form_num_modal_field.dart:683-688 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) packages/katana_form/lib/form/form_date_field.dart:391 — packages/katana_form/lib/form/form_date_field.dart:391-423 | packages/katana_form/lib/form/form_month_modal_field.dart:225-257 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×1
  • Edited copy of a member (2 corresponding lines) packages/katana_form/lib/src/form_media_value.dart:186 — packages/katana_form/lib/src/form_media_value.dart:186-187 | packages/katana_model/lib/src/model_field_value.dart:404-405 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 3+ corresponding lines) packages/katana_cli/lib/action/cloudflare/d1.dart:187 — packages/katana_cli/lib/action/cloudflare/d1.dart:187-189 | packages/katana_cli/lib/action/cloudflare/durable_object.dart:261-265 | packages/katana_cli/lib/action/cloudflare/tidb.dart:596-598 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) packages/masamune_model_d1/lib/actions/d1_post_model_functions_action.dart:67 — packages/masamune_model_d1/lib/actions/d1_post_model_functions_action.dart:67-73 | packages/masamune_model_do/lib/actions/do_post_model_functions_action.dart:67-73 | packages/masamune_model_tidb/lib/actions/tidb_post_model_functions_action.dart:66-72 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (263–264 lines × 2) · ×1
  • Duplicated block (263–264 lines × 2) packages/katana_cli/lib/command/create.dart:240 — packages/katana_cli/lib/command/create.dart:240-502 | packages/katana_cli/lib/command/create.dart:692-955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (271 lines × 2) · ×1
  • Duplicated block (271 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:3152 — packages/masamune_markdown/lib/src/markdown_controller.dart:3152-3422 | packages/masamune_markdown/lib/src/markdown_controller.dart:3446-3716 — both copies are in the same file, so extract the 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 (86 lines × 2) · ×1
  • Duplicated block (86 lines × 2) packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:128 — packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:128-213 | packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:320-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_purchase_mobile/lib/adapter/others/mobile_purchase_masamune_adapter.dart:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (81 lines × 2) · ×1
  • Duplicated block (81 lines × 2) packages/katana_cli/lib/command/git/pull_request.dart:82 — packages/katana_cli/lib/command/git/pull_request.dart:82-162 | packages/katana_cli/lib/command/git/pull_request_comment.dart:69-149 — before extracting anything, compare `packages/katana_cli/lib/command/git/pull_request.dart` and `packages/katana_cli/lib/command/git/pull_request_comment.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/git/pull_request.dart:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (73 lines × 2) · ×1
  • Duplicated block (73 lines × 2) packages/katana_cli/lib/action/app/local_notification.dart:191 — packages/katana_cli/lib/action/app/local_notification.dart:191-263 | packages/katana_cli/lib/action/firebase/messaging.dart:350-422 — before extracting anything, compare `packages/katana_cli/lib/action/app/local_notification.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/local_notification.dart:191` 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 (69 lines × 2) · ×1
  • Duplicated block (69 lines × 2) packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:58 — packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:58-126 | packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:61-129 — before extracting anything, compare `packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart` and `packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) packages/katana_cli/lib/action/app/geocoding.dart:36 — packages/katana_cli/lib/action/app/geocoding.dart:36-94 | packages/katana_cli/lib/action/mail/send_grid.dart:35-93 — before extracting anything, compare `packages/katana_cli/lib/action/app/geocoding.dart` and `packages/katana_cli/lib/action/mail/send_grid.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/geocoding.dart:35` calls `getAsMap` and `packages/katana_cli/lib/action/mail/send_grid.dart:34` 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 (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:2964 — packages/masamune_markdown/lib/src/markdown_controller.dart:2964-3021 | packages/masamune_markdown/lib/src/markdown_controller.dart:3045-3102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart:2964` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (57 lines × 4) · ×1
  • Duplicated block (57 lines × 4) packages/katana_cli/lib/command/code/view/fixedform_add.dart:99 — packages/katana_cli/lib/command/code/view/fixedform_add.dart:99-155 | packages/katana_cli/lib/command/code/view/fixedform_edit.dart:99-156 | packages/katana_cli/lib/command/code/view/listform_add.dart:110-166 | packages/katana_cli/lib/command/code/view/listform_edit.dart:110-167 — before extracting anything, compare `packages/katana_cli/lib/command/code/view/fixedform_add.dart` and `packages/katana_cli/lib/command/code/view/fixedform_edit.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×1
  • Duplicated block (55 lines × 2) packages/katana_form/lib/form/form_date_time_field.dart:1004 — packages/katana_form/lib/form/form_date_time_field.dart:1004-1058 | packages/katana_form/lib/form/form_date_time_field.dart:1138-1192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_form/lib/form/form_date_time_field.dart:1004` 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 (53–54 lines × 2) · ×1
  • Duplicated block (53–54 lines × 2) packages/katana_cli/lib/action/app/deeplink.dart:145 — packages/katana_cli/lib/action/app/deeplink.dart:145-197 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:93-146 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/dynamic_links.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 379 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (52–53 lines × 15) · ×1
  • Duplicated block (52–53 lines × 15) packages/katana_form/lib/form/form_chips_field.dart:501 — packages/katana_form/lib/form/form_chips_field.dart:501-552 | packages/katana_form/lib/form/form_container.dart:295-347 | packages/katana_form/lib/form/form_date_field.dart:527-578 | packages/katana_form/lib/form/form_date_time_field.dart:471-522 | packages/katana_form/lib/form/form_date_time_range_field.dart:450-501 | packages/katana_form/lib/form/form_duration_field.dart:479-530 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:371-422 | packages/katana_form/lib/form/form_enum_modal_field.dart:414-465 | packages/katana_form/lib/form/form_future_field.dart:356-407 | packages/katana_form/lib/form/form_map_dropdown_field.dart:298-349 | packages/katana_form/lib/form/form_map_modal_field.dart:351-402 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:392-444 | packages/katana_form/lib/form/form_month_modal_field.dart:361-412 | packages/katana_form/lib/form/form_num_modal_field.dart:331-382 | packages/katana_form/lib/form/form_text_field.dart:747-798 — before extracting anything, compare `packages/katana_form/lib/form/form_chips_field.dart` and `packages/katana_form/lib/form/form_container.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 107 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 `packages/katana_form/lib/form/form_chips_field.dart:501` it begins part-way through the construct above it, so those 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, `packages/katana_form/lib/form/form_chips_field.dart:553` calls `SuggestionStyle` and `packages/katana_form/lib/form/form_container.dart:349` 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 (51–52 lines × 2) · ×1
  • Duplicated block (51–52 lines × 2) packages/katana_model/lib/adapter/rest_api_model_adapter.dart:807 — packages/katana_model/lib/adapter/rest_api_model_adapter.dart:807-858 | packages/katana_model/lib/adapter/rest_api_model_adapter.dart:869-919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_model/lib/adapter/rest_api_model_adapter.dart:859` calls `call`, `value` and `packages/katana_model/lib/adapter/rest_api_model_adapter.dart:920` 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 (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) packages/katana_cli/lib/action/app/location.dart:251 — packages/katana_cli/lib/action/app/location.dart:251-300 | packages/katana_cli/lib/action/app/text_to_speech.dart:90-139 — before extracting anything, compare `packages/katana_cli/lib/action/app/location.dart` and `packages/katana_cli/lib/action/app/text_to_speech.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 125 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 `packages/katana_cli/lib/action/app/location.dart:251` 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 (48 lines × 2) · ×1
  • Duplicated block (48 lines × 2) packages/katana_cli/lib/action/app/geocoding.dart:100 — packages/katana_cli/lib/action/app/geocoding.dart:100-147 | packages/katana_cli/lib/action/mail/send_grid.dart:99-146 — before extracting anything, compare `packages/katana_cli/lib/action/app/geocoding.dart` and `packages/katana_cli/lib/action/mail/send_grid.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×1
  • Duplicated block (45 lines × 2) packages/masamune_markdown/lib/src/markdown_controller.dart:2436 — packages/masamune_markdown/lib/src/markdown_controller.dart:2436-2480 | packages/masamune_markdown/lib/src/markdown_controller.dart:2538-2582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/markdown_controller.dart:2436` it begins part-way through the construct above it, so those 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 (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) packages/katana_cli/lib/command/create.dart:519 — packages/katana_cli/lib/command/create.dart:519-562 | packages/katana_cli/lib/command/create.dart:978-1021 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/create.dart:519` 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 (41–42 lines × 4) · ×1
  • Duplicated block (41–42 lines × 4) packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:305 — packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:305-345 | packages/katana_cli/lib/action/cloudflare/kv.dart:278-319 | packages/katana_cli/lib/action/cloudflare/storage.dart:771-812 | packages/katana_cli/lib/action/cloudflare/turso.dart:604-645 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart` and `packages/katana_cli/lib/action/cloudflare/kv.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 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 `packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:305` it begins part-way through the construct above it, so those 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 (42 lines × 3) · ×1
  • Duplicated block (42 lines × 3) packages/katana_model/lib/src/model_field_value.dart:3291 — packages/katana_model/lib/src/model_field_value.dart:3291-3332 | packages/katana_model/lib/src/model_field_value.dart:3543-3584 | packages/katana_model/lib/src/model_locale.dart:178-219 — before extracting anything, compare `packages/katana_model/lib/src/model_field_value.dart` and `packages/katana_model/lib/src/model_locale.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 86 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 (41 lines × 5) · ×1
  • Duplicated block (41 lines × 5) packages/katana_cli/lib/command/code/page.dart:107 — packages/katana_cli/lib/command/code/page.dart:107-147 | packages/katana_cli/lib/command/code/view/fixedview.dart:97-148 | packages/katana_cli/lib/command/code/view/gridview.dart:108-160 | packages/katana_cli/lib/command/code/view/listview.dart:108-159 | packages/katana_cli/lib/command/code/view/page.dart:107-147 — before extracting anything, compare `packages/katana_cli/lib/command/code/page.dart` and `packages/katana_cli/lib/command/code/view/fixedview.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (38–40 lines × 7) · ×1
  • Duplicated block (38–40 lines × 7) packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:83 — packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:83-120 | packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:123-161 | packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart:67-105 | packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart:108-146 | packages/masamune_painter/lib/tools/inline/property/line_property_painter_inline_tools.dart:69-106 | packages/masamune_painter/lib/tools/inline/property/paragraph_align_property_painter_inline_tools.dart:71-109 | packages/masamune_painter/lib/tools/inline/property/paragraph_align_property_painter_inline_tools.dart:112-151 — before extracting anything, compare `packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart` and `packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 `packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:123` it begins part-way through the construct above it, so those 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, `packages/masamune_painter/lib/tools/inline/property/line_property_painter_inline_tools.dart:108` calls `icon` and `packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart:161` 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 (39–40 lines × 4) · ×1
  • Duplicated block (39–40 lines × 4) packages/katana_cli/lib/command/code/server/call.dart:33 — packages/katana_cli/lib/command/code/server/call.dart:33-72 | packages/katana_cli/lib/command/code/server/firestore_triggered.dart:33-72 | packages/katana_cli/lib/command/code/server/request.dart:33-71 | packages/katana_cli/lib/command/code/server/schedule.dart:53-91 — before extracting anything, compare `packages/katana_cli/lib/command/code/server/call.dart` and `packages/katana_cli/lib/command/code/server/firestore_triggered.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:794 — packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart:794-833 | packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart:304-343 — before extracting anything, compare `packages/katana_model_firestore/lib/adapter/firestore_model_adapter.dart` and `packages/katana_model_firestore/lib/adapter/listenable_firestore_model_adapter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 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 (38–40 lines × 2) · ×1
  • Duplicated block (38–40 lines × 2) packages/masamune_builder/lib/generator/collection_model_generator.dart:47 — packages/masamune_builder/lib/generator/collection_model_generator.dart:47-86 | packages/masamune_builder/lib/generator/document_model_generator.dart:51-88 — before extracting anything, compare `packages/masamune_builder/lib/generator/collection_model_generator.dart` and `packages/masamune_builder/lib/generator/document_model_generator.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 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 `packages/masamune_builder/lib/generator/collection_model_generator.dart:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) packages/katana_cli/lib/action/app/local_notification.dart:74 — packages/katana_cli/lib/action/app/local_notification.dart:74-110 | packages/katana_cli/lib/action/firebase/messaging.dart:172-208 — before extracting anything, compare `packages/katana_cli/lib/action/app/local_notification.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 263 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (36 lines × 14) · ×1
  • Duplicated block (36 lines × 14) packages/katana_model/lib/src/model_field_value.dart:809 — packages/katana_model/lib/src/model_field_value.dart:809-844 | packages/katana_model/lib/src/model_field_value.dart:1213-1248 | packages/katana_model/lib/src/model_field_value.dart:1596-1631 | packages/katana_model/lib/src/model_field_value.dart:2036-2071 | packages/katana_model/lib/src/model_field_value.dart:2393-2428 | packages/katana_model/lib/src/model_field_value.dart:2724-2759 | packages/katana_model/lib/src/model_field_value.dart:3068-3103 | packages/katana_model/lib/src/model_geo_value.dart:214-249 | packages/katana_model/lib/src/model_locale.dart:765-800 | packages/katana_model/lib/src/model_ref.dart:370-405 | packages/katana_model/lib/src/model_server_command.dart:277-312 | packages/katana_model/lib/src/model_uri.dart:215-250 | packages/katana_model/lib/src/model_uri.dart:511-546 | packages/katana_model/lib/src/model_uri.dart:820-855 — before extracting anything, compare `packages/katana_model/lib/src/model_field_value.dart` and `packages/katana_model/lib/src/model_locale.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model/lib/src/model_field_value.dart:809` it begins part-way through the construct above it, so those 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 (35–36 lines × 2) · ×1
  • Duplicated block (35–36 lines × 2) packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:685 — packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:685-719 | packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:1038-1073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_auth_firebase/lib/adapter/firebase_auth_adapter.dart:685` it begins part-way through the construct above it, so those 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 (34–35 lines × 4) · ×1
  • Duplicated block (34–35 lines × 4) packages/katana_cli/lib/action/app/deeplink.dart:231 — packages/katana_cli/lib/action/app/deeplink.dart:231-264 | packages/katana_cli/lib/action/firebase/authentication.dart:790-823 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:148-181 | packages/katana_cli/lib/action/firebase/init.dart:1214-1248 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:231` it does not close everything it opens, so those 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 (35 lines × 4) · ×1
  • Duplicated block (35 lines × 4) packages/katana_cli/lib/action/app/deeplink.dart:369 — packages/katana_cli/lib/action/app/deeplink.dart:369-403 | packages/katana_cli/lib/action/firebase/authentication.dart:190-224 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:254-288 | packages/katana_cli/lib/action/stripe/stripe.dart:205-239 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:369` it begins part-way through the construct above it, so those 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 (33–35 lines × 2) · ×1
  • Duplicated block (33–35 lines × 2) packages/katana_form/lib/form/form_enum_dropdown_field.dart:446 — packages/katana_form/lib/form/form_enum_dropdown_field.dart:446-480 | packages/katana_form/lib/form/form_map_dropdown_field.dart:373-405 — before extracting anything, compare `packages/katana_form/lib/form/form_enum_dropdown_field.dart` and `packages/katana_form/lib/form/form_map_dropdown_field.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 185 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 `packages/katana_form/lib/form/form_enum_dropdown_field.dart:446` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (33–34 lines × 5) · ×1
  • Duplicated block (33–34 lines × 5) packages/katana_cli/lib/action/app/deeplink.dart:145 — packages/katana_cli/lib/action/app/deeplink.dart:145-178 | packages/katana_cli/lib/action/app/local_notification.dart:213-245 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:94-127 | packages/katana_cli/lib/action/firebase/messaging.dart:372-404 | packages/katana_cli/lib/action/stripe/stripe.dart:142-174 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/dynamic_links.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 379 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:145` it begins part-way through the construct above it, so those 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 (33 lines × 8) · ×1
  • Duplicated block (33 lines × 8) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:140 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:140-172 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:195-227 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:138-170 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:138-170 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:138-170 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:134-166 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:149-181 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:172-204 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_code_block_value.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:140` it begins part-way through the construct above it, so those 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 (33 lines × 4) · ×1
  • Duplicated block (33 lines × 4) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:32 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:32-64 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:41-73 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:32-64 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:41-73 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 123 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 (32 lines × 4) · ×1
  • Duplicated block (32 lines × 4) packages/masamune_markdown/lib/src/markdown_controller.dart:2413 — packages/masamune_markdown/lib/src/markdown_controller.dart:2413-2444 | packages/masamune_markdown/lib/src/markdown_controller.dart:2515-2546 | packages/masamune_markdown/lib/src/markdown_controller.dart:2655-2686 | packages/masamune_markdown/lib/src/markdown_controller.dart:2746-2777 — 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 `packages/masamune_markdown/lib/src/markdown_controller.dart: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.
D4 · Code Duplication · Duplicated block (31 lines × 3) · ×1
  • Duplicated block (31 lines × 3) packages/masamune_model_d1_builder/lib/src/builder.dart:22 — packages/masamune_model_d1_builder/lib/src/builder.dart:22-52 | packages/masamune_model_do_builder/lib/src/builder.dart:22-52 | packages/masamune_model_tidb_builder/lib/src/builder.dart:22-52 — before extracting anything, compare `packages/masamune_model_d1_builder/lib/src/builder.dart` and `packages/masamune_model_do_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 192 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29 lines × 10) · ×1
  • Duplicated block (29 lines × 10) packages/katana_cli/lib/action/app/deeplink.dart:384 — packages/katana_cli/lib/action/app/deeplink.dart:384-412 | packages/katana_cli/lib/action/app/deeplink.dart:447-475 | packages/katana_cli/lib/action/firebase/authentication.dart:205-233 | packages/katana_cli/lib/action/firebase/authentication.dart:286-314 | packages/katana_cli/lib/action/firebase/authentication.dart:341-369 | packages/katana_cli/lib/action/firebase/authentication.dart:396-424 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:269-297 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:332-360 | packages/katana_cli/lib/action/stripe/stripe.dart:220-248 | packages/katana_cli/lib/action/stripe/stripe.dart:283-311 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:384` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (29 lines × 8) · ×1
  • Duplicated block (29 lines × 8) packages/katana_form/lib/form/form_date_field.dart:849 — packages/katana_form/lib/form/form_date_field.dart:849-877 | packages/katana_form/lib/form/form_date_time_field.dart:795-823 | packages/katana_form/lib/form/form_date_time_range_field.dart:772-800 | packages/katana_form/lib/form/form_duration_field.dart:799-827 | packages/katana_form/lib/form/form_enum_modal_field.dart:729-757 | packages/katana_form/lib/form/form_map_modal_field.dart:665-693 | packages/katana_form/lib/form/form_month_modal_field.dart:683-711 | packages/katana_form/lib/form/form_num_modal_field.dart:644-672 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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 `packages/katana_form/lib/form/form_date_field.dart:849` it begins part-way through the construct above it, so those 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 `oldWidget` to `_DateTextField<TValue>` in one and `_DateTimeTextField<TValue>` 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 (28 lines × 4) · ×1
  • Duplicated block (28 lines × 4) packages/katana_cli/lib/command/code/view/fixedform.dart:35 — packages/katana_cli/lib/command/code/view/fixedform.dart:35-62 | packages/katana_cli/lib/command/code/view/fixedform_add.dart:35-62 | packages/katana_cli/lib/command/code/view/fixedform_edit.dart:35-62 | packages/katana_cli/lib/command/code/view/fixedview.dart:35-62 — before extracting anything, compare `packages/katana_cli/lib/command/code/view/fixedform.dart` and `packages/katana_cli/lib/command/code/view/fixedform_add.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/code/view/fixedform.dart:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/command/code/view/fixedform.dart:79` calls `split`, `distinct`, `join` and `packages/katana_cli/lib/command/code/view/fixedform_add.dart:69` 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 (24–28 lines × 2) · ×1
  • Duplicated block (24–28 lines × 2) packages/katana_cli/lib/command/code/function.dart:59 — packages/katana_cli/lib/command/code/function.dart:59-82 | packages/katana_cli/lib/command/create.dart:3075-3102 — 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 `packages/katana_cli/lib/command/code/function.dart:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (27 lines × 9) · ×1
  • Duplicated block (27 lines × 9) packages/katana_form/lib/form/form_date_field.dart:671 — packages/katana_form/lib/form/form_date_field.dart:671-697 | packages/katana_form/lib/form/form_date_time_field.dart:615-641 | packages/katana_form/lib/form/form_date_time_range_field.dart:594-620 | packages/katana_form/lib/form/form_enum_modal_field.dart:557-583 | packages/katana_form/lib/form/form_future_field.dart:526-552 | packages/katana_form/lib/form/form_map_modal_field.dart:495-521 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:550-576 | packages/katana_form/lib/form/form_month_modal_field.dart:505-531 | packages/katana_form/lib/form/form_num_modal_field.dart:475-501 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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 `packages/katana_form/lib/form/form_date_field.dart:671` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:65 — packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:65-91 | packages/katana_localization_builder/lib/generator/yaml_localize_generator.dart:63-89 — 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 `packages/katana_localization_builder/lib/generator/google_spread_sheet_localize_generator.dart:65` it begins part-way through the construct above it, so those 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) packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:171 — packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:171-196 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:171-195 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:172-196 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:171` it begins part-way through the construct above it, so those 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 (26 lines × 3) · ×1
  • Duplicated block (26 lines × 3) packages/masamune_universal_ui/lib/src/universal_app_bar.dart:553 — packages/masamune_universal_ui/lib/src/universal_app_bar.dart:553-578 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:966-991 | packages/masamune_universal_ui/lib/src/universal_app_bar.dart:2081-2106 — 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 (28–40 lines × 2) · ×1
  • Duplicated block (28–40 lines × 2) packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:104 — packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:104-143 | packages/katana_cli/lib/action/stripe/stripe.dart:488-515 — before extracting anything, compare `packages/katana_cli/lib/action/firebase/terms_and_privacy.dart` and `packages/katana_cli/lib/action/stripe/stripe.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (24–25 lines × 6) · ×1
  • Duplicated block (24–25 lines × 6) packages/katana_cli/lib/command/code/view/fixedform.dart:109 — packages/katana_cli/lib/command/code/view/fixedform.dart:109-132 | packages/katana_cli/lib/command/code/view/fixedform_add.dart:97-120 | packages/katana_cli/lib/command/code/view/fixedform_edit.dart:97-121 | packages/katana_cli/lib/command/code/view/listform.dart:120-143 | packages/katana_cli/lib/command/code/view/listform_add.dart:108-131 | packages/katana_cli/lib/command/code/view/listform_edit.dart:108-132 — before extracting anything, compare `packages/katana_cli/lib/command/code/view/fixedform.dart` and `packages/katana_cli/lib/command/code/view/fixedform_add.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/code/view/fixedform.dart:109` it does not close everything it opens, so those 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 (3–24 lines × 16) · ×1
  • Duplicated block (3–24 lines × 16) packages/katana_form/lib/form/form_chips_field.dart:630 — packages/katana_form/lib/form/form_chips_field.dart:630-649 | packages/katana_form/lib/form/form_container.dart:384-386 | packages/katana_form/lib/form/form_container.dart:387-403 | packages/katana_form/lib/form/form_date_field.dart:626-645 | packages/katana_form/lib/form/form_date_time_field.dart:569-588 | packages/katana_form/lib/form/form_date_time_range_field.dart:548-567 | packages/katana_form/lib/form/form_duration_field.dart:578-597 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:491-510 | packages/katana_form/lib/form/form_enum_modal_field.dart:513-532 | packages/katana_form/lib/form/form_future_field.dart:486-505 | packages/katana_form/lib/form/form_map_dropdown_field.dart:416-435 | packages/katana_form/lib/form/form_map_modal_field.dart:451-470 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:520-543 | packages/katana_form/lib/form/form_month_modal_field.dart:460-479 | packages/katana_form/lib/form/form_num_modal_field.dart:430-449 | packages/katana_form/lib/form/form_text_field.dart:869-888 — before extracting anything, compare `packages/katana_form/lib/form/form_chips_field.dart` and `packages/katana_form/lib/form/form_container.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 107 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.
D4 · Code Duplication · Duplicated block (19–23 lines × 9) · ×1
  • Duplicated block (19–23 lines × 9) packages/katana_cli/lib/command/code/page.dart:50 — packages/katana_cli/lib/command/code/page.dart:50-72 | packages/katana_cli/lib/command/code/view/gridview.dart:55-73 | packages/katana_cli/lib/command/code/view/listform.dart:55-73 | packages/katana_cli/lib/command/code/view/listform_add.dart:55-73 | packages/katana_cli/lib/command/code/view/listform_edit.dart:55-73 | packages/katana_cli/lib/command/code/view/listview.dart:55-73 | packages/katana_cli/lib/command/code/view/navigation.dart:55-73 | packages/katana_cli/lib/command/code/view/page.dart:54-72 | packages/katana_cli/lib/command/code/view/tab.dart:55-73 — before extracting anything, compare `packages/katana_cli/lib/command/code/page.dart` and `packages/katana_cli/lib/command/code/view/gridview.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/code/page.dart:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/command/code/view/listform.dart:90` calls `split`, `distinct`, `join` and `packages/katana_cli/lib/command/code/page.dart:79` 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 lines × 8) · ×1
  • Duplicated block (23 lines × 8) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:61 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:61-83 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:53-75 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:49-71 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:52-74 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:47-69 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:46-68 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:49-71 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:49-71 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–23 lines × 5) · ×1
  • Duplicated block (21–23 lines × 5) packages/katana_cli/lib/action/ads/ads.dart:69 — packages/katana_cli/lib/action/ads/ads.dart:69-89 | packages/katana_cli/lib/action/app/local_notification.dart:153-175 | packages/katana_cli/lib/action/app/local_notification.dart:183-205 | packages/katana_cli/lib/action/firebase/messaging.dart:312-334 | packages/katana_cli/lib/action/firebase/messaging.dart:342-364 — before extracting anything, compare `packages/katana_cli/lib/action/ads/ads.dart` and `packages/katana_cli/lib/action/firebase/messaging.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/ads/ads.dart:69` it does not close everything it opens, so those 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–23 lines × 4) · ×1
  • Duplicated block (17–23 lines × 4) packages/katana_cli/lib/action/firebase/init.dart:766 — packages/katana_cli/lib/action/firebase/init.dart:766-782 | packages/katana_cli/lib/action/firebase/init.dart:995-1012 | packages/katana_cli/lib/action/firebase/init.dart:1014-1030 | packages/katana_cli/lib/action/firebase/init.dart:1086-1108 — 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 `packages/katana_cli/lib/action/firebase/init.dart:766` it begins part-way through the construct above it, so those 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–27 lines × 4) · ×1
  • Duplicated block (14–27 lines × 4) packages/katana_cli/lib/command/code/view/fixedform.dart:148 — packages/katana_cli/lib/command/code/view/fixedform.dart:148-161 | packages/katana_cli/lib/command/code/view/listform.dart:159-172 | packages/katana_cli/lib/command/code/view/navigation.dart:176-202 | packages/katana_cli/lib/command/code/view/tab.dart:164-187 — before extracting anything, compare `packages/katana_cli/lib/command/code/view/fixedform.dart` and `packages/katana_cli/lib/command/code/view/listform.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 146 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 `packages/katana_cli/lib/command/code/view/fixedform.dart:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) packages/katana_cli/lib/action/firebase/init.dart:822 — packages/katana_cli/lib/action/firebase/init.dart:822-844 | packages/katana_cli/lib/action/firebase/init.dart:1027-1049 | packages/katana_cli/lib/action/firebase/init.dart:1111-1133 — 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 `packages/katana_cli/lib/action/firebase/init.dart:822` 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 (22–23 lines × 3) · ×1
  • Duplicated block (22–23 lines × 3) packages/katana_cli/lib/action/firebase/init.dart:874 — packages/katana_cli/lib/action/firebase/init.dart:874-895 | packages/katana_cli/lib/action/firebase/init.dart:952-974 | packages/katana_cli/lib/action/firebase/init.dart:1053-1075 — 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 `packages/katana_cli/lib/action/firebase/init.dart:874` it does not close everything it opens, so those 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 (21–22 lines × 3) · ×1
  • Duplicated block (21–22 lines × 3) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:479 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:479-499 | packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:511-532 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:544-564 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:479` 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 (21 lines × 8) · ×1
  • Duplicated block (21 lines × 8) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:130 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:130-150 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:185-205 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:128-148 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:128-148 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:128-148 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:252-272 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:124-144 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:139-159 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_code_block_value.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 4) · ×1
  • Duplicated block (21 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:156 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:156-176 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:158-178 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:146-166 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:971-991 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) packages/katana_cli/lib/command/code/format.dart:21 — packages/katana_cli/lib/command/code/format.dart:21-41 | packages/katana_cli/lib/command/pub/get.dart:21-41 | packages/katana_cli/lib/command/pub/upgrade.dart:22-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/code/format.dart:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/command/pub/upgrade.dart:21` calls `get` and `packages/katana_cli/lib/command/code/format.dart:20` 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 (20 lines × 7) · ×1
  • Duplicated block (20 lines × 7) packages/katana_cli/lib/action/agora/agora.dart:61 — packages/katana_cli/lib/action/agora/agora.dart:61-80 | packages/katana_cli/lib/action/app/geocoding.dart:53-72 | packages/katana_cli/lib/action/ecosystem/ecosystem.dart:119-138 | packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:71-90 | packages/katana_cli/lib/action/mail/send_grid.dart:52-71 | packages/katana_cli/lib/action/purchase/purchase.dart:130-149 | packages/katana_cli/lib/action/stripe/stripe.dart:79-98 — before extracting anything, compare `packages/katana_cli/lib/action/agora/agora.dart` and `packages/katana_cli/lib/action/app/geocoding.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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, `packages/katana_cli/lib/action/app/geocoding.dart:51` calls `getAsMap`, `get` and `packages/katana_cli/lib/action/agora/agora.dart:60` 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 (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) packages/katana_cli/lib/action/app/deeplink.dart:368 — packages/katana_cli/lib/action/app/deeplink.dart:368-387 | packages/katana_cli/lib/action/firebase/authentication.dart:189-208 | packages/katana_cli/lib/action/firebase/authentication.dart:444-463 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:253-272 | packages/katana_cli/lib/action/stripe/stripe.dart:204-223 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:368` 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, `packages/katana_cli/lib/action/firebase/authentication.dart:464` calls `XmlText` and `packages/katana_cli/lib/action/app/deeplink.dart: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.
D4 · Code Duplication · Duplicated block (17–20 lines × 3) · ×1
  • Duplicated block (17–20 lines × 3) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1102 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1102-1118 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1140-1159 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1644-1660 — 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 `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1102` it begins part-way through the construct above it, so those 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) packages/masamune_model_docs_builder/lib/src/builder.dart:46 — packages/masamune_model_docs_builder/lib/src/builder.dart:46-64 | packages/masamune_model_firestore_builder/lib/src/builder.dart:134-153 — before extracting anything, compare `packages/masamune_model_docs_builder/lib/src/builder.dart` and `packages/masamune_model_firestore_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_docs_builder/lib/src/builder.dart:46` it does not close everything it opens, so those 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–19 lines × 15) · ×1
  • Duplicated block (15–19 lines × 15) packages/katana_form/lib/form/form_chips_field.dart:607 — packages/katana_form/lib/form/form_chips_field.dart:607-621 | packages/katana_form/lib/form/form_container.dart:367-381 | packages/katana_form/lib/form/form_date_field.dart:607-621 | packages/katana_form/lib/form/form_date_time_field.dart:550-564 | packages/katana_form/lib/form/form_date_time_range_field.dart:529-543 | packages/katana_form/lib/form/form_duration_field.dart:559-573 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:472-486 | packages/katana_form/lib/form/form_enum_modal_field.dart:494-508 | packages/katana_form/lib/form/form_future_field.dart:463-477 | packages/katana_form/lib/form/form_map_dropdown_field.dart:397-411 | packages/katana_form/lib/form/form_map_modal_field.dart:432-446 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:494-512 | packages/katana_form/lib/form/form_month_modal_field.dart:441-455 | packages/katana_form/lib/form/form_num_modal_field.dart:411-425 | packages/katana_form/lib/form/form_text_field.dart:847-861 — before extracting anything, compare `packages/katana_form/lib/form/form_chips_field.dart` and `packages/katana_form/lib/form/form_container.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_form/lib/form/form_text_field.dart:863` calls `call` and `packages/katana_form/lib/form/form_date_field.dart:622` 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 (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) packages/katana_cli/lib/command/create.dart:146 — packages/katana_cli/lib/command/create.dart:146-164 | packages/katana_cli/lib/command/create.dart:585-603 | packages/katana_cli/lib/command/create.dart:1043-1061 | packages/katana_cli/lib/command/module.dart:25-43 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/command/create.dart:145` calls `get` and `packages/katana_cli/lib/command/create.dart:1042` 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–19 lines × 4) · ×1
  • Duplicated block (14–19 lines × 4) packages/masamune_markdown/lib/src/markdown_controller.dart:2678 — packages/masamune_markdown/lib/src/markdown_controller.dart:2678-2696 | packages/masamune_markdown/lib/src/markdown_controller.dart:2769-2787 | packages/masamune_markdown/lib/src/markdown_controller.dart:2975-2988 | packages/masamune_markdown/lib/src/markdown_controller.dart:3056-3069 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) packages/masamune_builder/lib/value/parameter_value.dart:90 — packages/masamune_builder/lib/value/parameter_value.dart:90-108 | packages/masamune_builder/lib/value/parameter_value.dart:114-132 | packages/masamune_builder/lib/value/parameter_value.dart:137-155 — 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 `packages/masamune_builder/lib/value/parameter_value.dart:90` it does not close everything it opens, so those 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 (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:992 — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:992-1009 | packages/masamune_painter/lib/src/form_painter_toolbar.dart:959-977 — before extracting anything, compare `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart` and `packages/masamune_painter/lib/src/form_painter_toolbar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:992` it does not close everything it opens, so those 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–18 lines × 4) · ×1
  • Duplicated block (17–18 lines × 4) packages/masamune_markdown/lib/src/markdown_controller.dart:2698 — packages/masamune_markdown/lib/src/markdown_controller.dart:2698-2715 | packages/masamune_markdown/lib/src/markdown_controller.dart:2789-2806 | packages/masamune_markdown/lib/src/markdown_controller.dart:2997-3013 | packages/masamune_markdown/lib/src/markdown_controller.dart:3078-3094 — 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 `packages/masamune_markdown/lib/src/markdown_controller.dart:2698` it begins part-way through the construct above it, so those 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, `packages/masamune_markdown/lib/src/markdown_controller.dart:2718` calls `_mergeSpans` and `packages/masamune_markdown/lib/src/markdown_controller.dart:3015` 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 (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:316 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:316-333 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:324-341 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:307-324 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1201-1218 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:316` it does not close everything it opens, so those 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 (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:475 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:475-492 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:483-500 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:467-484 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:475` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (17 lines × 15) · ×1
  • Duplicated block (17 lines × 15) packages/katana_cli/lib/command/code/cache.dart:31 — packages/katana_cli/lib/command/code/cache.dart:31-47 | packages/katana_cli/lib/command/code/collection.dart:34-50 | packages/katana_cli/lib/command/code/controller.dart:34-50 | packages/katana_cli/lib/command/code/document.dart:34-50 | packages/katana_cli/lib/command/code/enum.dart:31-47 | packages/katana_cli/lib/command/code/exception.dart:34-50 | packages/katana_cli/lib/command/code/log.dart:34-50 | packages/katana_cli/lib/command/code/modal.dart:31-47 | packages/katana_cli/lib/command/code/model_adapter.dart:31-47 | packages/katana_cli/lib/command/code/query.dart:31-47 | packages/katana_cli/lib/command/code/redirect_query.dart:31-47 | packages/katana_cli/lib/command/code/stateful.dart:34-50 | packages/katana_cli/lib/command/code/stateless.dart:34-50 | packages/katana_cli/lib/command/code/value.dart:31-47 | packages/katana_cli/lib/command/code/widget.dart:34-50 — before extracting anything, compare `packages/katana_cli/lib/command/code/cache.dart` and `packages/katana_cli/lib/command/code/collection.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/command/code/cache.dart:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 9) · ×1
  • Duplicated block (17 lines × 9) packages/katana_cli/lib/command/code/page.dart:34 — packages/katana_cli/lib/command/code/page.dart:34-50 | packages/katana_cli/lib/command/code/view/gridview.dart:35-51 | packages/katana_cli/lib/command/code/view/listform.dart:35-51 | packages/katana_cli/lib/command/code/view/listform_add.dart:35-51 | packages/katana_cli/lib/command/code/view/listform_edit.dart:35-51 | packages/katana_cli/lib/command/code/view/listview.dart:35-51 | packages/katana_cli/lib/command/code/view/navigation.dart:35-51 | packages/katana_cli/lib/command/code/view/page.dart:34-50 | packages/katana_cli/lib/command/code/view/tab.dart:35-51 — before extracting anything, compare `packages/katana_cli/lib/command/code/page.dart` and `packages/katana_cli/lib/command/code/view/gridview.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 155 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/code/page.dart:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 4) · ×1
  • Duplicated block (16–17 lines × 4) packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:284 — packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:284-300 | packages/katana_cli/lib/action/cloudflare/kv.dart:258-274 | packages/katana_cli/lib/action/cloudflare/storage.dart:748-764 | packages/katana_cli/lib/action/cloudflare/turso.dart:584-599 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart` and `packages/katana_cli/lib/action/cloudflare/kv.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 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 `packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:284` it begins part-way through the construct above it, so those 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, `packages/katana_cli/lib/action/cloudflare/storage.dart:765` calls `lastIndexOf`, `substring`, `trim` and `packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:301` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) packages/katana_cli/lib/action/cloudflare/kv.dart:59 — packages/katana_cli/lib/action/cloudflare/kv.dart:59-75 | packages/katana_cli/lib/action/cloudflare/storage.dart:328-344 | packages/katana_cli/lib/action/cloudflare/turso.dart:129-144 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 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 `packages/katana_cli/lib/action/cloudflare/kv.dart:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (14–17 lines × 3) · ×1
  • Duplicated block (14–17 lines × 3) packages/katana_cli/lib/action/cloudflare/kv.dart:189 — packages/katana_cli/lib/action/cloudflare/kv.dart:189-202 | packages/katana_cli/lib/action/cloudflare/storage.dart:678-692 | packages/katana_cli/lib/action/cloudflare/turso.dart:425-441 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/kv.dart` and `packages/katana_cli/lib/action/cloudflare/storage.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 195 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 `packages/katana_cli/lib/action/cloudflare/turso.dart:425` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1948 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1948-1962 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1986-2002 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1948` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–16 lines × 7) · ×1
  • Duplicated block (12–16 lines × 7) packages/katana_cli/lib/action/ads/ads.dart:125 — packages/katana_cli/lib/action/ads/ads.dart:125-136 | packages/katana_cli/lib/action/app/location.dart:249-264 | packages/katana_cli/lib/action/app/text_to_speech.dart:88-103 | packages/katana_cli/lib/action/firebase/messaging.dart:434-448 | packages/katana_cli/lib/command/create.dart:437-451 | packages/katana_cli/lib/command/create.dart:890-904 | packages/katana_cli/lib/src/app_info.dart:324-339 — before extracting anything, compare `packages/katana_cli/lib/action/ads/ads.dart` and `packages/katana_cli/lib/action/app/location.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/ads/ads.dart:125` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/action/app/location.dart:265` calls `XmlElement`, `XmlName` and `packages/katana_cli/lib/action/firebase/messaging.dart:448` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) packages/katana_cli/lib/action/firebase/init.dart:761 — packages/katana_cli/lib/action/firebase/init.dart:761-776 | packages/katana_cli/lib/action/firebase/init.dart:886-901 | packages/katana_cli/lib/action/firebase/init.dart:997-1012 | packages/katana_cli/lib/action/firebase/init.dart:1015-1030 | packages/katana_cli/lib/action/firebase/init.dart:1087-1102 — 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 `packages/katana_cli/lib/action/firebase/init.dart: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.
D4 · Code Duplication · Duplicated block (15 lines × 34) · ×1
  • Duplicated block (15 lines × 34) packages/katana_cli/lib/command/code/cache.dart:28 — packages/katana_cli/lib/command/code/cache.dart:28-42 | packages/katana_cli/lib/command/code/code.dart:216-230 | packages/katana_cli/lib/command/code/collection.dart:31-45 | packages/katana_cli/lib/command/code/controller.dart:31-45 | packages/katana_cli/lib/command/code/document.dart:31-45 | packages/katana_cli/lib/command/code/enum.dart:28-42 | packages/katana_cli/lib/command/code/exception.dart:31-45 | packages/katana_cli/lib/command/code/function.dart:28-42 | packages/katana_cli/lib/command/code/log.dart:31-45 | packages/katana_cli/lib/command/code/modal.dart:28-42 | packages/katana_cli/lib/command/code/model_adapter.dart:28-42 | packages/katana_cli/lib/command/code/page.dart:30-44 | packages/katana_cli/lib/command/code/query.dart:28-42 | packages/katana_cli/lib/command/code/redirect_query.dart:28-42 | packages/katana_cli/lib/command/code/server/call.dart:31-45 | packages/katana_cli/lib/command/code/server/firestore_triggered.dart:31-45 | packages/katana_cli/lib/command/code/server/request.dart:31-45 | packages/katana_cli/lib/command/code/server/schedule.dart:51-65 | packages/katana_cli/lib/command/code/stateful.dart:31-45 | packages/katana_cli/lib/command/code/stateless.dart:31-45 | packages/katana_cli/lib/command/code/value.dart:28-42 | packages/katana_cli/lib/command/code/view/fixedform.dart:31-45 | packages/katana_cli/lib/command/code/view/fixedform_add.dart:31-45 | packages/katana_cli/lib/command/code/view/fixedform_edit.dart:31-45 | packages/katana_cli/lib/command/code/view/fixedview.dart:31-45 | packages/katana_cli/lib/command/code/view/gridview.dart:31-45 | packages/katana_cli/lib/command/code/view/listform.dart:31-45 | packages/katana_cli/lib/command/code/view/listform_add.dart:31-45 | packages/katana_cli/lib/command/code/view/listform_edit.dart:31-45 | packages/katana_cli/lib/command/code/view/listview.dart:31-45 | packages/katana_cli/lib/command/code/view/navigation.dart:31-45 | packages/katana_cli/lib/command/code/view/page.dart:30-44 | packages/katana_cli/lib/command/code/view/tab.dart:31-45 | packages/katana_cli/lib/command/code/widget.dart:31-45 — before extracting anything, compare `packages/katana_cli/lib/command/code/cache.dart` and `packages/katana_cli/lib/command/code/collection.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/command/code/cache.dart:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/command/code/page.dart:45` calls `File`, `existsSync` and `packages/katana_cli/lib/command/code/cache.dart:43` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 18) · ×1
  • Duplicated block (15 lines × 18) packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:73 — packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_128px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_12px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_14px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_16px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_18px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_20px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_24px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_28px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_32px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_36px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_40px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_48px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_56px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_64px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_80px_font_painter_block_tools.dart:73-87 | packages/masamune_painter/lib/tools/block/text/size_96px_font_painter_block_tools.dart:73-87 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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 `packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 14) · ×1
  • Duplicated block (15 lines × 14) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:87 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:87-101 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:68-82 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:77-91 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:79-93 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:75-89 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:78-92 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:73-87 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:72-86 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:68-82 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:77-91 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:68-82 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:77-91 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:75-89 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:75-89 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:87` 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 lines × 13) · ×1
  • Duplicated block (15 lines × 13) packages/katana_cli/lib/command/code/page.dart:58 — packages/katana_cli/lib/command/code/page.dart:58-72 | packages/katana_cli/lib/command/code/view/fixedform.dart:48-62 | packages/katana_cli/lib/command/code/view/fixedform_add.dart:48-62 | packages/katana_cli/lib/command/code/view/fixedform_edit.dart:48-62 | packages/katana_cli/lib/command/code/view/fixedview.dart:48-62 | packages/katana_cli/lib/command/code/view/gridview.dart:59-73 | packages/katana_cli/lib/command/code/view/listform.dart:59-73 | packages/katana_cli/lib/command/code/view/listform_add.dart:59-73 | packages/katana_cli/lib/command/code/view/listform_edit.dart:59-73 | packages/katana_cli/lib/command/code/view/listview.dart:59-73 | packages/katana_cli/lib/command/code/view/navigation.dart:59-73 | packages/katana_cli/lib/command/code/view/page.dart:58-72 | packages/katana_cli/lib/command/code/view/tab.dart:59-73 — before extracting anything, compare `packages/katana_cli/lib/command/code/page.dart` and `packages/katana_cli/lib/command/code/view/fixedform_add.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/command/code/page.dart:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_cli/lib/command/code/view/fixedform.dart:79` calls `split`, `distinct`, `join` and `packages/katana_cli/lib/command/code/page.dart:79` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 12) · ×1
  • Duplicated block (15 lines × 12) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:15 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:15-29 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:31-45 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:16-30 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:16-30 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:16-30 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:15-29 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:30-44 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:16-30 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:32-46 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:16-30 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:15-29 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:16-30 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:31` calls `every` and `packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:31` 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 (11–15 lines × 2) · ×1
  • Duplicated block (11–15 lines × 2) packages/katana_cli/lib/action/cloudflare/d1.dart:157 — packages/katana_cli/lib/action/cloudflare/d1.dart:157-171 | packages/katana_cli/lib/action/cloudflare/durable_object.dart:123-133 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/d1.dart` and `packages/katana_cli/lib/action/cloudflare/durable_object.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/cloudflare/d1.dart:157` it begins part-way through the construct above it, so those 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 lines × 18) · ×1
  • Duplicated block (14 lines × 18) packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:51 — packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_128px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_12px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_14px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_16px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_18px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_20px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_24px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_28px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_32px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_36px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_40px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_48px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_56px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_64px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_80px_font_painter_block_tools.dart:51-64 | packages/masamune_painter/lib/tools/block/text/size_96px_font_painter_block_tools.dart:51-64 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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 (12–14 lines × 14) · ×1
  • Duplicated block (12–14 lines × 14) packages/katana_cli/lib/action/ads/ads.dart:117 — packages/katana_cli/lib/action/ads/ads.dart:117-128 | packages/katana_cli/lib/action/app/deeplink.dart:237-249 | packages/katana_cli/lib/action/app/deeplink.dart:358-369 | packages/katana_cli/lib/action/app/location.dart:241-252 | packages/katana_cli/lib/action/app/text_to_speech.dart:80-91 | packages/katana_cli/lib/action/firebase/authentication.dart:179-190 | packages/katana_cli/lib/action/firebase/authentication.dart:796-808 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:154-166 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:243-254 | packages/katana_cli/lib/action/firebase/init.dart:1220-1233 | packages/katana_cli/lib/action/firebase/messaging.dart:426-437 | packages/katana_cli/lib/command/create.dart:428-440 | packages/katana_cli/lib/command/create.dart:881-893 | packages/katana_cli/lib/src/app_info.dart:316-327 — before extracting anything, compare `packages/katana_cli/lib/action/ads/ads.dart` and `packages/katana_cli/lib/action/app/deeplink.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–14 lines × 10) · ×1
  • Duplicated block (13–14 lines × 10) packages/katana_cli/lib/action/ads/ads.dart:55 — packages/katana_cli/lib/action/ads/ads.dart:55-67 | packages/katana_cli/lib/action/app/deeplink.dart:94-106 | packages/katana_cli/lib/action/app/local_notification.dart:114-126 | packages/katana_cli/lib/action/app/location.dart:80-92 | packages/katana_cli/lib/action/firebase/authentication.dart:667-679 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:58-70 | packages/katana_cli/lib/action/firebase/init.dart:1470-1483 | packages/katana_cli/lib/action/purchase/purchase.dart:227-239 | packages/katana_cli/lib/action/stripe/stripe.dart:113-125 | packages/katana_cli/lib/src/app_info.dart:287-299 — before extracting anything, compare `packages/katana_cli/lib/action/ads/ads.dart` and `packages/katana_cli/lib/action/app/deeplink.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/local_notification.dart:112` calls `enablePermission`, `label` and `packages/katana_cli/lib/action/purchase/purchase.dart:226` 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 (13–14 lines × 8) · ×1
  • Duplicated block (13–14 lines × 8) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:47 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:47-60 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:39-51 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:35-47 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:38-50 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:33-45 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:32-44 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:35-47 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:35-47 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–14 lines × 7) · ×1
  • Duplicated block (12–14 lines × 7) packages/katana_cli/lib/action/app/att.dart:28 — packages/katana_cli/lib/action/app/att.dart:28-40 | packages/katana_cli/lib/action/app/icon.dart:89-100 | packages/katana_cli/lib/action/app/info.dart:35-46 | packages/katana_cli/lib/action/app/local_notification.dart:36-49 | packages/katana_cli/lib/action/app/picker.dart:27-38 | packages/katana_cli/lib/action/app/privacy_manifests.dart:27-39 | packages/katana_cli/lib/action/app/spread_sheet.dart:64-75 — before extracting anything, compare `packages/katana_cli/lib/action/app/icon.dart` and `packages/katana_cli/lib/action/app/local_notification.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/att.dart:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–14 lines × 6) · ×1
  • Duplicated block (10–14 lines × 6) packages/masamune_markdown/lib/src/markdown_controller.dart:2433 — packages/masamune_markdown/lib/src/markdown_controller.dart:2433-2446 | packages/masamune_markdown/lib/src/markdown_controller.dart:2535-2548 | packages/masamune_markdown/lib/src/markdown_controller.dart:2675-2688 | packages/masamune_markdown/lib/src/markdown_controller.dart:2766-2779 | packages/masamune_markdown/lib/src/markdown_controller.dart:2973-2982 | packages/masamune_markdown/lib/src/markdown_controller.dart:3054-3063 — 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 `packages/masamune_markdown/lib/src/markdown_controller.dart:2433` it begins part-way through the construct above it, so those 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–13 lines × 15) · ×1
  • Duplicated block (11–13 lines × 15) packages/katana_cli/lib/action/ads/ads.dart:124 — packages/katana_cli/lib/action/ads/ads.dart:124-134 | packages/katana_cli/lib/action/app/deeplink.dart:365-376 | packages/katana_cli/lib/action/app/location.dart:248-258 | packages/katana_cli/lib/action/app/text_to_speech.dart:87-97 | packages/katana_cli/lib/action/firebase/authentication.dart:186-197 | packages/katana_cli/lib/action/firebase/authentication.dart:440-452 | packages/katana_cli/lib/action/firebase/authentication.dart:511-522 | packages/katana_cli/lib/action/firebase/authentication.dart:545-556 | packages/katana_cli/lib/action/firebase/authentication.dart:591-602 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:250-261 | packages/katana_cli/lib/action/firebase/messaging.dart:433-443 | packages/katana_cli/lib/action/stripe/stripe.dart:201-212 | packages/katana_cli/lib/command/create.dart:436-446 | packages/katana_cli/lib/command/create.dart:889-899 | packages/katana_cli/lib/src/app_info.dart:323-333 — before extracting anything, compare `packages/katana_cli/lib/action/ads/ads.dart` and `packages/katana_cli/lib/action/app/deeplink.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/ads/ads.dart:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–13 lines × 15) · ×1
  • Duplicated block (7–13 lines × 15) packages/katana_cli/lib/command/code/cache.dart:44 — packages/katana_cli/lib/command/code/cache.dart:44-50 | packages/katana_cli/lib/command/code/collection.dart:47-53 | packages/katana_cli/lib/command/code/document.dart:47-53 | packages/katana_cli/lib/command/code/enum.dart:44-50 | packages/katana_cli/lib/command/code/modal.dart:44-52 | packages/katana_cli/lib/command/code/model_adapter.dart:44-50 | packages/katana_cli/lib/command/code/page.dart:47-59 | packages/katana_cli/lib/command/code/query.dart:44-50 | packages/katana_cli/lib/command/code/redirect_query.dart:44-50 | packages/katana_cli/lib/command/code/server/call.dart:56-62 | packages/katana_cli/lib/command/code/server/firestore_triggered.dart:57-63 | packages/katana_cli/lib/command/code/server/request.dart:56-62 | packages/katana_cli/lib/command/code/server/schedule.dart:76-82 | packages/katana_cli/lib/command/code/server/worker.dart:46-52 | packages/katana_cli/lib/command/code/value.dart:44-50 — before extracting anything, compare `packages/katana_cli/lib/command/code/cache.dart` and `packages/katana_cli/lib/command/code/collection.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/command/code/modal.dart:44` it does not close everything it opens, so those 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, `packages/katana_cli/lib/command/code/page.dart:45` calls `File`, `existsSync` and `packages/katana_cli/lib/command/code/cache.dart:42` 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 × 14) · ×1
  • Duplicated block (11–13 lines × 14) packages/katana_cli/lib/command/code/controller.dart:47 — packages/katana_cli/lib/command/code/controller.dart:47-57 | packages/katana_cli/lib/command/code/exception.dart:47-57 | packages/katana_cli/lib/command/code/log.dart:47-57 | packages/katana_cli/lib/command/code/stateful.dart:47-57 | packages/katana_cli/lib/command/code/stateless.dart:47-57 | packages/katana_cli/lib/command/code/view/gridview.dart:48-60 | packages/katana_cli/lib/command/code/view/listform.dart:48-60 | packages/katana_cli/lib/command/code/view/listform_add.dart:48-60 | packages/katana_cli/lib/command/code/view/listform_edit.dart:48-60 | packages/katana_cli/lib/command/code/view/listview.dart:48-60 | packages/katana_cli/lib/command/code/view/navigation.dart:48-60 | packages/katana_cli/lib/command/code/view/page.dart:47-59 | packages/katana_cli/lib/command/code/view/tab.dart:48-60 | packages/katana_cli/lib/command/code/widget.dart:47-57 — before extracting anything, compare `packages/katana_cli/lib/command/code/controller.dart` and `packages/katana_cli/lib/command/code/exception.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/command/code/view/gridview.dart:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `packages/katana_cli/lib/command/code/controller.dart:59` calls `generateDartTestCode` and `packages/katana_cli/lib/command/code/exception.dart:59` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 11) · ×1
  • Duplicated block (12–13 lines × 11) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:34 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:34-46 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:57-69 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:48-60 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:35-46 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:37-48 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:56-68 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:48-60 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:58-70 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:48-60 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:34-45 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:35-46 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:34` 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 (13 lines × 8) · ×1
  • Duplicated block (13 lines × 8) packages/katana_form/lib/form/form_date_field.dart:475 — packages/katana_form/lib/form/form_date_field.dart:475-487 | packages/katana_form/lib/form/form_date_time_field.dart:419-431 | packages/katana_form/lib/form/form_date_time_range_field.dart:398-410 | packages/katana_form/lib/form/form_duration_field.dart:427-439 | packages/katana_form/lib/form/form_enum_modal_field.dart:361-373 | packages/katana_form/lib/form/form_map_modal_field.dart:299-311 | packages/katana_form/lib/form/form_month_modal_field.dart:309-321 | packages/katana_form/lib/form/form_num_modal_field.dart:279-291 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `oldWidget` to `FormDateField<TValue>` in one and `FormDateTimeField<TValue>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) packages/katana_form/lib/form/form_date_field.dart:956 — packages/katana_form/lib/form/form_date_field.dart:956-968 | packages/katana_form/lib/form/form_duration_field.dart:914-926 | packages/katana_form/lib/form/form_enum_modal_field.dart:808-820 | packages/katana_form/lib/form/form_map_modal_field.dart:739-751 | packages/katana_form/lib/form/form_month_modal_field.dart:789-801 | packages/katana_form/lib/form/form_num_modal_field.dart:730-742 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_duration_field.dart` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 336 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 (11–13 lines × 5) · ×1
  • Duplicated block (11–13 lines × 5) packages/katana_cli/lib/action/app/csr.dart:35 — packages/katana_cli/lib/action/app/csr.dart:35-45 | packages/katana_cli/lib/action/app/icon.dart:91-101 | packages/katana_cli/lib/action/app/keystore.dart:57-67 | packages/katana_cli/lib/action/app/local_notification.dart:38-50 | packages/katana_cli/lib/action/app/spread_sheet.dart:66-76 — before extracting anything, compare `packages/katana_cli/lib/action/app/csr.dart` and `packages/katana_cli/lib/action/app/keystore.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/csr.dart:33` calls `getAsMap`, `get` and `packages/katana_cli/lib/action/app/icon.dart:90` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–13 lines × 4) · ×1
  • Duplicated block (10–13 lines × 4) packages/katana_cli/lib/action/firebase/workflow.dart:147 — packages/katana_cli/lib/action/firebase/workflow.dart:147-156 | packages/katana_cli/lib/action/purchase/purchase.dart:276-286 | packages/katana_cli/lib/action/purchase/purchase.dart:295-307 | packages/katana_cli/lib/action/stripe/stripe.dart:422-432 — `packages/katana_cli/lib/action/purchase/purchase.dart` and `packages/katana_cli/lib/action/stripe/stripe.dart` 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 4 separate duplicated blocks between them, totalling at least 56 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 `packages/katana_cli/lib/action/firebase/workflow.dart:147` it does not close everything it opens, so those 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–13 lines × 4) · ×1
  • Duplicated block (11–13 lines × 4) packages/katana_router_builder/lib/generator/router_generator.dart:38 — packages/katana_router_builder/lib/generator/router_generator.dart:38-48 | packages/masamune_model_docs_builder/lib/src/builder.dart:45-56 | packages/masamune_model_firebase_data_connect_builder/lib/generator/adapter_generator.dart:31-41 | packages/masamune_model_firestore_builder/lib/src/builder.dart:133-145 — before extracting anything, compare `packages/masamune_model_docs_builder/lib/src/builder.dart` and `packages/masamune_model_firestore_builder/lib/src/builder.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_router_builder/lib/generator/router_generator.dart:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:30 — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:30-42 | packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart:29-39 — before extracting anything, compare `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart` and `packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–13 lines × 2) · ×1
  • Duplicated block (8–13 lines × 2) packages/masamune_lints/lib/masamune/masamune_should_use_form_widget.dart:22 — packages/masamune_lints/lib/masamune/masamune_should_use_form_widget.dart:22-29 | packages/masamune_lints/lib/masamune/masamune_should_use_universal_widget.dart:24-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_lints/lib/masamune/masamune_should_use_form_widget.dart:22` it does not close everything it opens, so those 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 (12 lines × 20) · ×1
  • Duplicated block (12 lines × 20) packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:71 — packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_128px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_12px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_14px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_16px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_18px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_20px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_24px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_28px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_32px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_36px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_40px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_48px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_56px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_64px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_80px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/size_96px_font_painter_block_tools.dart:71-82 | packages/masamune_painter/lib/tools/block/text/style_bold_font_painter_block_tools.dart:68-79 | packages/masamune_painter/lib/tools/block/text/style_normal_font_painter_block_tools.dart:71-82 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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 `packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 14) · ×1
  • Duplicated block (12 lines × 14) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:103 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:103-114 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:84-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:93-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:95-106 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:91-102 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:94-105 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:89-100 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:88-99 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:84-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:93-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:84-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:93-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:91-102 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:91-102 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:103` it begins part-way through the construct above it, so those 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 × 9) · ×1
  • Duplicated block (12 lines × 9) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:154 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:154-165 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:209-220 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:152-163 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:152-163 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:152-163 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:276-287 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:148-159 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:163-174 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:186-197 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_code_block_value.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:154` it begins part-way through the construct above it, so those 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–12 lines × 7) · ×1
  • Duplicated block (11–12 lines × 7) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:124 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:124-135 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:180-190 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:123-133 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:123-133 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:123-133 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:134-144 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:149-160 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_code_block_value.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:59 — packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:59-70 | packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:97-108 | packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:131-142 | packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:62-73 | packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:100-111 | packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart:134-145 — before extracting anything, compare `packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart` and `packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 131 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 `packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–12 lines × 4) · ×1
  • Duplicated block (11–12 lines × 4) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:286 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:286-297 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:293-304 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:278-288 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1170-1180 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:286` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 25) · ×1
  • Duplicated block (11 lines × 25) packages/masamune_painter/lib/src/painter_tools.dart:182 — packages/masamune_painter/lib/src/painter_tools.dart:182-192 | packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart:46-56 | packages/masamune_painter/lib/tools/block/text/paragraph_align_justify_text_painter_block_tools.dart:46-56 | packages/masamune_painter/lib/tools/block/text/paragraph_align_left_text_painter_block_tools.dart:46-56 | packages/masamune_painter/lib/tools/block/text/paragraph_align_right_text_painter_block_tools.dart:46-56 | packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_128px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_12px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_14px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_16px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_18px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_20px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_24px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_28px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_32px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_36px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_40px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_48px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_56px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_64px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_80px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/size_96px_font_painter_block_tools.dart:69-79 | packages/masamune_painter/lib/tools/block/text/style_bold_font_painter_block_tools.dart:66-76 | packages/masamune_painter/lib/tools/block/text/style_normal_font_painter_block_tools.dart:69-79 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/text/paragraph_align_center_text_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/text/paragraph_align_justify_text_painter_block_tools.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/masamune_painter/lib/src/painter_tools.dart:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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 × 18) · ×1
  • Duplicated block (11 lines × 18) packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:35 — packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:35-45 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:85-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:66-76 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:75-85 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:77-87 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:73-83 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:76-86 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:71-81 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:70-80 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_search_converter.dart:35-45 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:66-76 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:75-85 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:66-76 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:75-85 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_token_converter.dart:35-45 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:73-83 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_vector_value_converter.dart:35-45 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:73-83 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_search_converter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_command_base_converter.dart:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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 × 15) · ×1
  • Duplicated block (11 lines × 15) packages/katana_cli/lib/action/ads/ads.dart:119 — packages/katana_cli/lib/action/ads/ads.dart:119-129 | packages/katana_cli/lib/action/app/deeplink.dart:240-250 | packages/katana_cli/lib/action/app/deeplink.dart:360-370 | packages/katana_cli/lib/action/app/location.dart:243-253 | packages/katana_cli/lib/action/app/text_to_speech.dart:82-92 | packages/katana_cli/lib/action/firebase/authentication.dart:181-191 | packages/katana_cli/lib/action/firebase/authentication.dart:586-596 | packages/katana_cli/lib/action/firebase/authentication.dart:799-809 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:157-167 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:245-255 | packages/katana_cli/lib/action/firebase/init.dart:1223-1234 | packages/katana_cli/lib/action/firebase/messaging.dart:428-438 | packages/katana_cli/lib/command/create.dart:431-441 | packages/katana_cli/lib/command/create.dart:884-894 | packages/katana_cli/lib/src/app_info.dart:318-328 — before extracting anything, compare `packages/katana_cli/lib/action/ads/ads.dart` and `packages/katana_cli/lib/action/app/deeplink.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/ads/ads.dart: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.
D4 · Code Duplication · Duplicated block (9–11 lines × 15) · ×1
  • Duplicated block (9–11 lines × 15) packages/katana_form/lib/form/form_chips_field.dart:493 — packages/katana_form/lib/form/form_chips_field.dart:493-501 | packages/katana_form/lib/form/form_container.dart:287-295 | packages/katana_form/lib/form/form_date_field.dart:519-527 | packages/katana_form/lib/form/form_date_time_field.dart:463-471 | packages/katana_form/lib/form/form_date_time_range_field.dart:442-450 | packages/katana_form/lib/form/form_duration_field.dart:471-479 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:355-365 | packages/katana_form/lib/form/form_enum_modal_field.dart:406-414 | packages/katana_form/lib/form/form_future_field.dart:348-356 | packages/katana_form/lib/form/form_map_dropdown_field.dart:282-292 | packages/katana_form/lib/form/form_map_modal_field.dart:343-351 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:384-392 | packages/katana_form/lib/form/form_month_modal_field.dart:353-361 | packages/katana_form/lib/form/form_num_modal_field.dart:323-331 | packages/katana_form/lib/form/form_text_field.dart:739-747 — before extracting anything, compare `packages/katana_form/lib/form/form_chips_field.dart` and `packages/katana_form/lib/form/form_container.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 107 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 `packages/katana_form/lib/form/form_chips_field.dart:493` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 9) · ×1
  • Duplicated block (11 lines × 9) packages/katana_form/lib/form/form_date_field.dart:846 — packages/katana_form/lib/form/form_date_field.dart:846-856 | packages/katana_form/lib/form/form_date_time_field.dart:792-802 | packages/katana_form/lib/form/form_date_time_range_field.dart:769-779 | packages/katana_form/lib/form/form_duration_field.dart:796-806 | packages/katana_form/lib/form/form_enum_modal_field.dart:726-736 | packages/katana_form/lib/form/form_map_modal_field.dart:662-672 | packages/katana_form/lib/form/form_month_modal_field.dart:680-690 | packages/katana_form/lib/form/form_num_modal_field.dart:641-651 | packages/katana_form/lib/form/form_rating_bar.dart:373-383 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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 `packages/katana_form/lib/form/form_date_field.dart:846` it does not close everything it opens, so those 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 `oldWidget` to `_DateTextField<TValue>` in one and `_DateTimeTextField<TValue>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (10–11 lines × 5) · ×1
  • Duplicated block (10–11 lines × 5) packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:120 — packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:120-129 | packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart:308-317 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:132-142 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:164-173 | packages/katana_model_local/lib/adapter/json_source_model_adapter.dart:272-281 — before extracting anything, compare `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart` and `packages/katana_model_local/lib/adapter/json_source_model_adapter.dart` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 252 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 `packages/katana_model_local/lib/adapter/csv_source_model_adapter.dart: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 (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) packages/katana_cli/lib/action/app/csr.dart:120 — packages/katana_cli/lib/action/app/csr.dart:120-130 | packages/katana_cli/lib/action/app/keystore.dart:384-393 | packages/katana_cli/lib/action/app/p12.dart:134-144 — before extracting anything, compare `packages/katana_cli/lib/action/app/csr.dart` and `packages/katana_cli/lib/action/app/keystore.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/action/app/csr.dart:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/action/app/csr.dart:118` calls `add` and `packages/katana_cli/lib/action/app/keystore.dart:384` 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–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) packages/katana_cli/lib/action/agora/agora.dart:158 — packages/katana_cli/lib/action/agora/agora.dart:158-168 | packages/katana_cli/lib/action/stripe/stripe.dart:432-440 — `packages/katana_cli/lib/action/agora/agora.dart` and `packages/katana_cli/lib/action/stripe/stripe.dart` 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 7 separate duplicated blocks between them, totalling at least 89 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 `packages/katana_cli/lib/action/agora/agora.dart:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) packages/katana_cli/lib/action/cloudflare/tidb.dart:128 — packages/katana_cli/lib/action/cloudflare/tidb.dart:128-138 | packages/katana_cli/lib/action/cloudflare/tidb.dart:665-671 — both copies are in the same file, so extract the 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 × 17) · ×1
  • Duplicated block (10 lines × 17) packages/katana_model_firestore/lib/converter/firestore_model_command_base_converter.dart:45 — packages/katana_model_firestore/lib/converter/firestore_model_command_base_converter.dart:45-54 | packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:72-81 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:117-126 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:109-118 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:121-130 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:70-79 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:78-87 | packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:41-50 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:38-47 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:116-125 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:109-118 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:114-123 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:109-118 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:38-47 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:69-78 | packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:54-63 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:70-79 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_command_base_converter.dart: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:82` calls `get` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:127` 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 × 12) · ×1
  • Duplicated block (10 lines × 12) packages/katana_form/lib/form/form_chips_field.dart:555 — packages/katana_form/lib/form/form_chips_field.dart:555-564 | packages/katana_form/lib/form/form_date_field.dart:580-589 | packages/katana_form/lib/form/form_date_time_field.dart:524-533 | packages/katana_form/lib/form/form_date_time_range_field.dart:503-512 | packages/katana_form/lib/form/form_duration_field.dart:532-541 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:429-438 | packages/katana_form/lib/form/form_enum_modal_field.dart:467-476 | packages/katana_form/lib/form/form_future_field.dart:414-423 | packages/katana_form/lib/form/form_map_dropdown_field.dart:356-365 | packages/katana_form/lib/form/form_map_modal_field.dart:404-413 | packages/katana_form/lib/form/form_month_modal_field.dart:414-423 | packages/katana_form/lib/form/form_num_modal_field.dart:384-393 — before extracting anything, compare `packages/katana_form/lib/form/form_chips_field.dart` and `packages/katana_form/lib/form/form_date_field.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 117 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 `packages/katana_form/lib/form/form_chips_field.dart:555` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_form/lib/form/form_chips_field.dart:553` calls `SuggestionStyle` and `packages/katana_form/lib/form/form_date_field.dart:578` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 12) · ×1
  • Duplicated block (12 lines × 12) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:116 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:116-127 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:153-164 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:152-163 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:169-180 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:106-117 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:125-136 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:164-175 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:152-163 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:171-182 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:152-163 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:105-116 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:106-117 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:270 — packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:270-278 | packages/katana_cli/lib/action/cloudflare/kv.dart:243-252 | packages/katana_cli/lib/action/cloudflare/storage.dart:733-742 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart` and `packages/katana_cli/lib/action/cloudflare/kv.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7–10 lines × 3) · ×1
  • Duplicated block (7–10 lines × 3) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1738 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1738-1744 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1792-1801 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1974-1980 — 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 `packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1738` it begins part-way through the construct above it, so those 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) · ×1
  • Duplicated block (8–10 lines × 2) packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:199 — packages/katana_cli/lib/action/firebase/terms_and_privacy.dart:199-206 | packages/katana_cli/lib/action/stripe/stripe.dart:518-527 — before extracting anything, compare `packages/katana_cli/lib/action/firebase/terms_and_privacy.dart` and `packages/katana_cli/lib/action/stripe/stripe.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) packages/katana_storage_firebase/lib/adapter/others/firebase_storage_adapter.dart:253 — packages/katana_storage_firebase/lib/adapter/others/firebase_storage_adapter.dart:253-262 | packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:174-182 — 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 `packages/katana_storage_firebase/lib/adapter/others/firebase_storage_adapter.dart:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `packages/katana_storage_firebase/lib/adapter/others/firebase_storage_adapter.dart:252` calls `initialize` and `packages/masamune_storage_functions/lib/adapter/others/functions_storage_adapter.dart:173` 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 (4–10 lines × 3) · ×1
  • Duplicated block (4–10 lines × 3) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1135 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1135-1144 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1177-1180 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1686-1695 — 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 (9 lines × 15) · ×1
  • Duplicated block (9 lines × 15) packages/katana_model_firestore/lib/converter/firestore_model_ref_converter.dart:104 — packages/katana_model_firestore/lib/converter/firestore_model_ref_converter.dart:104-112 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:106-114 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:87-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:96-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:98-106 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:94-102 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:97-105 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:92-100 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:91-99 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:87-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:96-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:87-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:96-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:94-102 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:94-102 — before extracting anything, compare `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart` and `packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_model_firestore/lib/converter/firestore_model_ref_converter.dart:104` 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 lines × 9) · ×1
  • Duplicated block (9 lines × 9) packages/katana_form/lib/form/form_builder.dart:337 — packages/katana_form/lib/form/form_builder.dart:337-345 | packages/katana_form/lib/form/form_checkbox.dart:467-475 | packages/katana_form/lib/form/form_chips_field.dart:442-450 | packages/katana_form/lib/form/form_enum_dropdown_field.dart:322-330 | packages/katana_form/lib/form/form_map_dropdown_field.dart:249-257 | packages/katana_form/lib/form/form_map_tag_dropdown_field.dart:349-357 | packages/katana_form/lib/form/form_media.dart:262-270 | packages/katana_form/lib/form/form_multi_media.dart:260-268 | packages/katana_form/lib/form/form_switch.dart:398-406 — before extracting anything, compare `packages/katana_form/lib/form/form_chips_field.dart` and `packages/katana_form/lib/form/form_enum_dropdown_field.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `oldWidget` to `FormBuilder<T, TValue>` in one and `FormCheckbox<TValue>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8–9 lines × 6) · ×1
  • Duplicated block (8–9 lines × 6) packages/katana_cli/lib/action/app/deeplink.dart:436 — packages/katana_cli/lib/action/app/deeplink.dart:436-443 | packages/katana_cli/lib/action/firebase/authentication.dart:274-282 | packages/katana_cli/lib/action/firebase/authentication.dart:329-337 | packages/katana_cli/lib/action/firebase/authentication.dart:384-392 | packages/katana_cli/lib/action/firebase/dynamic_links.dart:321-328 | packages/katana_cli/lib/action/stripe/stripe.dart:272-279 — before extracting anything, compare `packages/katana_cli/lib/action/app/deeplink.dart` and `packages/katana_cli/lib/action/firebase/authentication.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 245 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/app/deeplink.dart:436` it does not close everything it opens, so those 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–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:213 — packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:213-219 | packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart:188-194 | packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:161-169 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:167-175 — before extracting anything, compare `packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart` and `packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 82 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 `packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:213` it does not close everything it opens, so those 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, `packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:211` calls `onPostloadCollection` and `packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:159` 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–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) packages/katana_cli/lib/action/cloudflare/d1.dart:140 — packages/katana_cli/lib/action/cloudflare/d1.dart:140-146 | packages/katana_cli/lib/action/cloudflare/durable_object.dart:107-115 — before extracting anything, compare `packages/katana_cli/lib/action/cloudflare/d1.dart` and `packages/katana_cli/lib/action/cloudflare/durable_object.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/cloudflare/d1.dart:140` it does not close everything it opens, so those 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 (7–8 lines × 29) · ×1
  • Duplicated block (7–8 lines × 29) packages/katana_cli/lib/command/code/cache.dart:43 — packages/katana_cli/lib/command/code/cache.dart:43-49 | packages/katana_cli/lib/command/code/collection.dart:46-52 | packages/katana_cli/lib/command/code/controller.dart:46-52 | packages/katana_cli/lib/command/code/document.dart:46-52 | packages/katana_cli/lib/command/code/enum.dart:43-49 | packages/katana_cli/lib/command/code/exception.dart:46-52 | packages/katana_cli/lib/command/code/log.dart:46-52 | packages/katana_cli/lib/command/code/modal.dart:43-49 | packages/katana_cli/lib/command/code/model_adapter.dart:43-49 | packages/katana_cli/lib/command/code/page.dart:46-52 | packages/katana_cli/lib/command/code/query.dart:43-49 | packages/katana_cli/lib/command/code/redirect_query.dart:43-49 | packages/katana_cli/lib/command/code/server/call.dart:55-61 | packages/katana_cli/lib/command/code/server/firestore_triggered.dart:55-62 | packages/katana_cli/lib/command/code/server/request.dart:55-61 | packages/katana_cli/lib/command/code/server/schedule.dart:75-81 | packages/katana_cli/lib/command/code/server/worker.dart:44-51 | packages/katana_cli/lib/command/code/stateful.dart:46-52 | packages/katana_cli/lib/command/code/stateless.dart:46-52 | packages/katana_cli/lib/command/code/value.dart:43-49 | packages/katana_cli/lib/command/code/view/gridview.dart:47-53 | packages/katana_cli/lib/command/code/view/listform.dart:47-53 | packages/katana_cli/lib/command/code/view/listform_add.dart:47-53 | packages/katana_cli/lib/command/code/view/listform_edit.dart:47-53 | packages/katana_cli/lib/command/code/view/listview.dart:47-53 | packages/katana_cli/lib/command/code/view/navigation.dart:47-53 | packages/katana_cli/lib/command/code/view/page.dart:46-52 | packages/katana_cli/lib/command/code/view/tab.dart:47-53 | packages/katana_cli/lib/command/code/widget.dart:46-52 — before extracting anything, compare `packages/katana_cli/lib/command/code/cache.dart` and `packages/katana_cli/lib/command/code/collection.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `packages/katana_cli/lib/command/code/cache.dart:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/katana_cli/lib/command/code/page.dart:45` calls `File`, `existsSync` and `packages/katana_cli/lib/command/code/cache.dart:42` 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 × 27) · ×1
  • Duplicated block (8 lines × 27) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:118 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:118-125 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:155-162 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:154-161 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:171-178 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:108-115 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:127-134 | packages/katana_model_firestore/lib/converter/firestore_model_ref_converter.dart:105-112 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:166-173 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:154-161 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:173-180 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:154-161 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:107-114 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:108-115 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:107-114 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:88-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:97-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:99-106 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:95-102 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:98-105 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:93-100 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:92-99 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:88-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:97-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:88-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:97-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:95-102 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:95-102 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:118` 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 lines × 15) · ×1
  • Duplicated block (8 lines × 15) packages/katana_model/lib/src/model_field_value.dart:793 — packages/katana_model/lib/src/model_field_value.dart:793-800 | packages/katana_model/lib/src/model_field_value.dart:1197-1204 | packages/katana_model/lib/src/model_field_value.dart:1580-1587 | packages/katana_model/lib/src/model_field_value.dart:2020-2027 | packages/katana_model/lib/src/model_field_value.dart:2380-2387 | packages/katana_model/lib/src/model_field_value.dart:2711-2718 | packages/katana_model/lib/src/model_field_value.dart:3055-3062 | packages/katana_model/lib/src/model_geo_value.dart:206-213 | packages/katana_model/lib/src/model_locale.dart:757-764 | packages/katana_model/lib/src/model_ref.dart:362-369 | packages/katana_model/lib/src/model_server_command.dart:269-276 | packages/katana_model/lib/src/model_uri.dart:202-209 | packages/katana_model/lib/src/model_uri.dart:498-505 | packages/katana_model/lib/src/model_uri.dart:807-814 | packages/katana_model/lib/src/model_vector_value.dart:382-389 — before extracting anything, compare `packages/katana_model/lib/src/model_field_value.dart` and `packages/katana_model/lib/src/model_locale.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model/lib/src/model_field_value.dart:793` it does not close everything it opens, so those 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 × 12) · ×1
  • Duplicated block (8 lines × 12) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:37 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:37-44 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:60-67 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:51-58 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:56-63 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:38-45 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:40-47 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:59-66 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:51-58 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:61-68 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:51-58 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:37-44 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:38-45 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:64` calls `every` and `packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:46` 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 (7 lines × 9) · ×1
  • Duplicated block (7 lines × 9) packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:126 — packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:126-136 | packages/masamune_markdown/lib/value/markdown_code_block_value.dart:182-191 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:125-134 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:125-134 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:125-134 | packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart:252-258 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:121-130 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:136-145 | packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart:151-161 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_code_block_value.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 99 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 `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:126` it begins part-way through the construct above it, so those 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 × 8) · ×1
  • Duplicated block (7 lines × 8) packages/katana_cli/lib/action/agora/agora.dart:155 — packages/katana_cli/lib/action/agora/agora.dart:155-161 | packages/katana_cli/lib/action/app/geocoding.dart:82-88 | packages/katana_cli/lib/action/firebase/algolia.dart:77-83 | packages/katana_cli/lib/action/firebase/authentication.dart:887-893 | packages/katana_cli/lib/action/firebase/messaging.dart:500-506 | packages/katana_cli/lib/action/mail/send_grid.dart:81-87 | packages/katana_cli/lib/action/stripe/stripe.dart:419-425 | packages/katana_cli/lib/action/stripe/stripe.dart:443-449 — before extracting anything, compare `packages/katana_cli/lib/action/agora/agora.dart` and `packages/katana_cli/lib/action/app/geocoding.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_cli/lib/action/agora/agora.dart: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 (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:165 — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:165-171 | packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart:165-171 | packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:212-218 | packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart:187-193 | packages/masamune_model_tidb/lib/adapter/cached_tidb_model_adapter.dart:160-166 | packages/masamune_model_turso/lib/adapter/cached_turso_model_adapter.dart:166-172 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart:211` calls `onPostloadCollection` and `packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:164` 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–7 lines × 2) · ×1
  • Duplicated block (5–7 lines × 2) packages/katana_model/lib/src/model_locale.dart:283 — packages/katana_model/lib/src/model_locale.dart:283-287 | packages/katana_model/lib/src/model_locale.dart:306-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_model/lib/src/model_locale.dart:283` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 12) · ×1
  • Duplicated block (6 lines × 12) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:95 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:95-100 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:136-141 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:131-136 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:145-150 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:89-94 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:102-107 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:141-146 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:131-136 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:143-148 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:131-136 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:88-93 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:89-94 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:95` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 31) · ×1
  • Duplicated block (5 lines × 31) packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:121 — packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:121-125 | packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart:158-162 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:157-161 | packages/katana_model_firestore/lib/converter/firestore_model_geo_value_converter.dart:174-178 | packages/katana_model_firestore/lib/converter/firestore_model_image_uri_converter.dart:111-115 | packages/katana_model_firestore/lib/converter/firestore_model_locale_converter.dart:130-134 | packages/katana_model_firestore/lib/converter/firestore_model_localized_value_converter.dart:70-74 | packages/katana_model_firestore/lib/converter/firestore_model_ref_converter.dart:108-112 | packages/katana_model_firestore/lib/converter/firestore_model_search_converter.dart:76-80 | packages/katana_model_firestore/lib/converter/firestore_model_time_converter.dart:169-173 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:157-161 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_converter.dart:176-180 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:157-161 | packages/katana_model_firestore/lib/converter/firestore_model_token_converter.dart:77-81 | packages/katana_model_firestore/lib/converter/firestore_model_uri_converter.dart:110-114 | packages/katana_model_firestore/lib/converter/firestore_model_vector_value_converter.dart:86-90 | packages/katana_model_firestore/lib/converter/firestore_model_video_uri_converter.dart:111-115 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_counter_converter.dart:110-114 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_converter.dart:91-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:100-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_geo_value_converter.dart:102-106 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_image_uri_converter.dart:98-102 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_locale_converter.dart:101-105 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_localized_value_converter.dart:96-100 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_ref_converter.dart:95-99 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_converter.dart:91-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:100-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_converter.dart:91-95 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:100-104 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_uri_converter.dart:98-102 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_video_uri_converter.dart:98-102 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_date_converter.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 86 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 `packages/katana_model_firestore/lib/converter/firestore_model_counter_converter.dart:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 9) · ×1
  • Duplicated block (5 lines × 9) packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:34 — packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:34-38 | packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:63-67 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:34-38 | packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart:63-67 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:34-38 | packages/katana_model_firestore/lib/converter/firestore_model_timestamp_range_converter.dart:63-67 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_date_range_converter.dart:20-24 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_time_range_converter.dart:20-24 | packages/masamune_model_firebase_data_connect/lib/converter/firebase_data_connect_model_timestamp_range_converter.dart:20-24 — before extracting anything, compare `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart` and `packages/katana_model_firestore/lib/converter/firestore_model_time_range_converter.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 136 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 `packages/katana_model_firestore/lib/converter/firestore_model_date_range_converter.dart:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • Duplicated block (5 lines × 6) packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1209 — packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1209-1213 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:1254-1260 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2086-2090 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2149-2155 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2322-2326 | packages/masamune_model_github/lib/adapter/github_model_adapter.dart:2358-2364 — 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 (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) packages/katana_model/lib/src/model_field_value.dart:1255 — packages/katana_model/lib/src/model_field_value.dart:1255-1293 | packages/katana_model/lib/src/model_ref.dart:412-445 — before extracting anything, compare `packages/katana_model/lib/src/model_field_value.dart` and `packages/katana_model/lib/src/model_ref.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 6) · ×1
  • Duplicated block (22 lines × 6) packages/katana_cli/lib/action/ai/openai.dart:13 — packages/katana_cli/lib/action/ai/openai.dart:13-34 | packages/katana_cli/lib/action/app/animate.dart:13-34 | packages/katana_cli/lib/action/app/app_review.dart:13-34 | packages/katana_cli/lib/action/app/calendar.dart:13-34 | packages/katana_cli/lib/action/app/force_updater.dart:13-34 | packages/katana_cli/lib/action/app/introduction.dart:13-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
D4 · Code Duplication · Duplicated block (20 lines × 6) · ×1
  • Duplicated block (20 lines × 6) packages/katana_cli/lib/snippet/modals/confirmation.dart:13 — packages/katana_cli/lib/snippet/modals/confirmation.dart:13-65 | packages/katana_cli/lib/snippet/models/user.dart:13-32 | packages/katana_cli/lib/snippet/pages/logic/retrieve_user.dart:13-32 | packages/katana_cli/lib/snippet/pages/page/login.dart:13-120 | packages/katana_cli/lib/snippet/redirects/login.dart:13-53 | packages/katana_cli/lib/snippet/theme/form/auth_button.dart:13-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) packages/katana_router_builder/lib/value/path_value.dart:11 — packages/katana_router_builder/lib/value/path_value.dart:11-53 | packages/masamune_builder/lib/value/path_value.dart:13-100 — before extracting anything, compare `packages/katana_router_builder/lib/value/path_value.dart` and `packages/masamune_builder/lib/value/path_value.dart` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/katana_router_builder/lib/value/path_value.dart:11` 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 (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) packages/masamune_markdown/lib/tools/block/media/image_from_camera_media_markdown_block_tools.dart:36 — packages/masamune_markdown/lib/tools/block/media/image_from_camera_media_markdown_block_tools.dart:36-88 | packages/masamune_markdown/lib/tools/block/media/image_from_library_media_markdown_block_tools.dart:36-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (32 lines × 3) · ×1
  • Duplicated block (32 lines × 3) packages/masamune_markdown/lib/tools/primary/add_markdown_primary_tools.dart:47 — packages/masamune_markdown/lib/tools/primary/add_markdown_primary_tools.dart:47-81 | packages/masamune_markdown/lib/tools/primary/exchange_markdown_primary_tools.dart:43-77 | packages/masamune_markdown/lib/tools/primary/media_markdown_primary_tools.dart:34-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. 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 (34 lines × 3) · ×1
  • Duplicated block (34 lines × 3) packages/katana_cli/lib/action/git/platform/android.dart:543 — packages/katana_cli/lib/action/git/platform/android.dart:543-576 | packages/katana_cli/lib/action/git/platform/ios.dart:667-700 | packages/katana_cli/lib/action/git/platform/web.dart:294-327 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) packages/katana_cli/lib/command/code/collection.dart:260 — packages/katana_cli/lib/command/code/collection.dart:260-265 | packages/katana_cli/lib/command/code/collection.dart:325-330 | packages/katana_cli/lib/command/code/document.dart:260-265 | packages/katana_cli/lib/command/code/document.dart:320-325 | packages/katana_cli/lib/command/code/value.dart:136-141 — before extracting anything, compare `packages/katana_cli/lib/command/code/collection.dart` and `packages/katana_cli/lib/command/code/document.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21 lines × 15) · ×1
  • Duplicated block (21 lines × 15) packages/katana_cli/lib/command/code/document.dart:213 — packages/katana_cli/lib/command/code/document.dart:213-236 | packages/katana_cli/lib/command/code/page.dart:149-169 | packages/katana_cli/lib/command/code/stateful.dart:114-134 | packages/katana_cli/lib/command/code/stateless.dart:109-129 | packages/katana_cli/lib/command/code/view/fixedform_add.dart:157-177 | packages/katana_cli/lib/command/code/view/fixedform_edit.dart:158-178 | packages/katana_cli/lib/command/code/view/fixedview.dart:150-170 | packages/katana_cli/lib/command/code/view/gridview.dart:162-182 | packages/katana_cli/lib/command/code/view/listform_add.dart:168-188 | packages/katana_cli/lib/command/code/view/listform_edit.dart:169-189 | packages/katana_cli/lib/command/code/view/listview.dart:161-181 | packages/katana_cli/lib/command/code/view/navigation.dart:226-246 | packages/katana_cli/lib/command/code/view/page.dart:149-169 | packages/katana_cli/lib/command/code/view/tab.dart:208-228 | packages/katana_cli/lib/command/code/widget.dart:114-134 — before extracting anything, compare `packages/katana_cli/lib/command/code/document.dart` and `packages/katana_cli/lib/command/code/page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `ref` to `PageRef` in one and `FormRef` 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 (37 lines × 5) · ×1
  • Duplicated block (37 lines × 5) packages/katana_cli/lib/command/code/server/call.dart:97 — packages/katana_cli/lib/command/code/server/call.dart:97-137 | packages/katana_cli/lib/command/code/server/firestore_triggered.dart:92-143 | packages/katana_cli/lib/command/code/server/request.dart:92-132 | packages/katana_cli/lib/command/code/server/schedule.dart:110-146 | packages/katana_cli/lib/command/code/server/worker.dart:83-151 — before extracting anything, compare `packages/katana_cli/lib/command/code/server/call.dart` and `packages/katana_cli/lib/command/code/server/firestore_triggered.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (61 lines × 4) · ×1
  • Duplicated block (61 lines × 4) packages/katana_cli/lib/command/code/server/call.dart:139 — packages/katana_cli/lib/command/code/server/call.dart:139-207 | packages/katana_cli/lib/command/code/server/firestore_triggered.dart:145-232 | packages/katana_cli/lib/command/code/server/request.dart:134-202 | packages/katana_cli/lib/command/code/server/schedule.dart:148-208 — before extracting anything, compare `packages/katana_cli/lib/command/code/server/call.dart` and `packages/katana_cli/lib/command/code/server/firestore_triggered.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (8 lines × 8) · ×1
  • Duplicated block (8 lines × 8) packages/katana_form/lib/form/form_date_field.dart:980 — packages/katana_form/lib/form/form_date_field.dart:980-987 | packages/katana_form/lib/form/form_date_time_field.dart:904-911 | packages/katana_form/lib/form/form_date_time_range_field.dart:884-891 | packages/katana_form/lib/form/form_duration_field.dart:938-945 | packages/katana_form/lib/form/form_enum_modal_field.dart:832-839 | packages/katana_form/lib/form/form_map_modal_field.dart:763-770 | packages/katana_form/lib/form/form_month_modal_field.dart:813-820 | packages/katana_form/lib/form/form_num_modal_field.dart:754-761 — before extracting anything, compare `packages/katana_form/lib/form/form_date_field.dart` and `packages/katana_form/lib/form/form_date_time_field.dart` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 321 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 (8 lines × 9) · ×1
  • Duplicated block (8 lines × 9) packages/masamune_markdown/lib/src/markdown_value.dart:571 — packages/masamune_markdown/lib/src/markdown_value.dart:571-578 | packages/masamune_markdown/lib/src/markdown_value.dart:873-880 | packages/masamune_markdown/lib/src/markdown_value.dart:1182-1189 | packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart:253-260 | packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart:208-215 | packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart:208-215 | packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart:208-215 | packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart:204-211 | packages/masamune_markdown/lib/value/markdown_quote_block_value.dart:219-226 — before extracting anything, compare `packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart` and `packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/masamune_markdown/lib/src/markdown_value.dart:581` calls `toString`, `_textBuilder`, `StringBuffer` and `packages/masamune_markdown/lib/src/markdown_value.dart:881` 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 × 18) · ×1
  • Duplicated block (8 lines × 18) packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:36 — packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_128px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_12px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_14px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_16px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_18px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_20px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_24px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_28px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_32px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_36px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_40px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_48px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_56px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_64px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_80px_font_painter_block_tools.dart:36-43 | packages/masamune_painter/lib/tools/block/text/size_96px_font_painter_block_tools.dart:36-43 — before extracting anything, compare `packages/masamune_painter/lib/tools/block/text/size_10px_font_painter_block_tools.dart` and `packages/masamune_painter/lib/tools/block/text/size_112px_font_painter_block_tools.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 60 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 (14 lines × 8) · ×1
  • Duplicated block (14 lines × 8) packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart:56 — packages/masamune_markdown/lib/tools/block/add/bulleted_list_add_markdown_block_tools.dart:56-69 | packages/masamune_markdown/lib/tools/block/add/code_add_markdown_block_tools.dart:55-68 | packages/masamune_markdown/lib/tools/block/add/headline_1_add_markdown_block_tools.dart:55-68 | packages/masamune_markdown/lib/tools/block/add/headline_2_add_markdown_block_tools.dart:55-68 | packages/masamune_markdown/lib/tools/block/add/headline_3_add_markdown_block_tools.dart:55-68 | packages/masamune_markdown/lib/tools/block/add/quote_add_markdown_block_tools.dart:55-68 | packages/masamune_markdown/lib/tools/block/add/text_add_markdown_block_tools.dart:51-64 | packages/masamune_markdown/lib/tools/block/add/toggle_list_add_markdown_block_tools.dart:55-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 8 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×1
  • Duplicated block (7 lines × 7) packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:221 — packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:221-227 | packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart:229-236 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:223-229 | packages/masamune_model_do/lib/adapter/do_model_adapter.dart:231-238 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:211-217 | packages/masamune_model_tidb/lib/adapter/tidb_model_adapter.dart:219-226 | packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart:1062-1068 — before extracting anything, compare `packages/masamune_model_d1/lib/adapter/d1_model_adapter.dart` and `packages/masamune_model_do/lib/adapter/do_model_adapter.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 313 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) packages/masamune_model_d1_builder/lib/src/schema_spec.dart:157 — packages/masamune_model_d1_builder/lib/src/schema_spec.dart:157-175 | packages/masamune_model_do_builder/lib/src/schema_spec.dart:138-159 | packages/masamune_model_tidb_builder/lib/src/schema_spec.dart:186-205 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 23) · ×1
  • Duplicated block (7 lines × 23) packages/katana_auth/example/ios/Runner/AppDelegate.swift:7 — packages/katana_auth/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_form/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_functions/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_indicator/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_localization/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_logger/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_model/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_router/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_scoped/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_shorten/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_storage/example/ios/Runner/AppDelegate.swift:7-13 | packages/katana_theme/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_agora/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_animate/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_calendar/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_camera/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_introduction/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_location/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_logger_firebase/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_notification/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_picker/example/ios/Runner/AppDelegate.swift:7-13 | packages/masamune_universal_ui/example/ios/Runner/AppDelegate.swift:7-13 — before extracting anything, compare `packages/katana_auth/example/ios/Runner/AppDelegate.swift` and `packages/katana_form/example/ios/Runner/AppDelegate.swift` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 23) · ×1
  • Duplicated block (10 lines × 23) packages/katana_auth/example/macos/Runner/MainFlutterWindow.swift:6 — packages/katana_auth/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_form/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_functions/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_indicator/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_localization/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_logger/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_model/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_router/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_scoped/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_shorten/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_storage/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/katana_theme/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_agora/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_animate/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_calendar/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_camera/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_introduction/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_location/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_logger_firebase/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_notification/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_picker/example/macos/Runner/MainFlutterWindow.swift:6-15 | packages/masamune_universal_ui/example/macos/Runner/MainFlutterWindow.swift:6-15 — before extracting anything, compare `packages/katana_auth/example/macos/Runner/MainFlutterWindow.swift` and `packages/katana_form/example/macos/Runner/MainFlutterWindow.swift` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Minor — 247 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×101
  • Orphaned file packages/masamune_markdown/lib/src/markdown_tools.dart: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 packages/masamune_model_github/lib/src/github_copilot_agent_controller.dart: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 packages/katana_model/lib/src/vector_converter.dart: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 packages/katana_model/lib/src/model_vector_value.dart: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 packages/masamune_speech_to_text_mobile/lib/src/speech_to_text.dart: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 packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart: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 packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart: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 packages/masamune_markdown/lib/src/markdown_history.dart: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 packages/masamune_markdown/lib/value/markdown_code_block_value.dart: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 packages/masamune_markdown/lib/value/markdown_bulleted_list_block_value.dart: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 packages/masamune_painter/lib/value/group_painting_value.dart: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 packages/masamune_speech_to_text_google/lib/adapter/google_speech_to_text_masamune_adapter.dart: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 packages/masamune_painter/lib/value/clipping_group_painting_value.dart: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 packages/masamune_markdown/lib/value/markdown_quote_block_value.dart: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 packages/masamune_markdown/lib/value/markdown_headline_3_block_value.dart: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 packages/masamune_markdown/lib/value/markdown_headline_2_block_value.dart: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 packages/masamune_markdown/lib/value/markdown_headline_1_block_value.dart: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 packages/masamune_markdown/lib/value/markdown_paragraph_block_value.dart: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 packages/masamune_painter/lib/value/text_painting_value.dart: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 packages/katana_model/lib/extension/vector_collection_mixin.dart: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 packages/masamune_painter/lib/value/media_painting_value.dart: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 packages/masamune_model_github/lib/models/github_actions_job.dart: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 packages/masamune_ai/lib/src/ai_agent_memory.dart: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 packages/masamune_markdown/lib/value/markdown_image_block_value.dart: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 packages/masamune_model_github/lib/models/github_copilot_session_log.dart: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.
  • + 76 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate packages/masamune/lib/ui/grid_builder.dart:305 — `!listenWhenListenable || item is! Listenable` appears character-identically in 2 files — packages/masamune/lib/ui/grid_builder.dart, packages/masamune/lib/ui/list_builder.dart. 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 packages/katana_form/lib/form/form_list_builder.dart:304 — `!oldWidget.initialValue.equalsTo(widget.initialValue) && widget.initialValue != null` appears character-identically in 2 files — packages/katana_form/lib/form/form_list_builder.dart, packages/masamune_painter/lib/src/form_painter_field.dart. 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 packages/masamune_model_d1_builder/lib/src/builder.dart:182 — `!segment.startsWith(":") && !(segment.startsWith("{") && segment.endsWith("}"))` appears character-identically in 3 files — packages/masamune_model_d1_builder/lib/src/builder.dart, packages/masamune_model_do_builder/lib/src/builder.dart, packages/masamune_model_tidb_builder/lib/src/builder.dart. 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 packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:1180 — `!selection.isValid || selection.isCollapsed` appears character-identically in 3 files — packages/masamune_markdown/lib/src/form_markdown_toolbar.dart, packages/masamune_markdown/lib/src/markdown_clipboard.dart, packages/masamune_markdown/lib/src/markdown_controller.dart. 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 packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:117 — `(backgroundColor == null || backgroundColor.a <= 0.0) && (foregroundColor == null || foregroundColor.a <= 0.0 || line == null)` appears character-identically in 2 files — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart, packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart. 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 packages/katana_form/lib/form/form_builder.dart:246 — `(form == null && onSaved == null) || (form != null && onSaved != null)` appears character-identically in 24 files — packages/katana_form/lib/form/form_builder.dart, packages/katana_form/lib/form/form_checkbox.dart, packages/katana_form/lib/form/form_chips_field.dart, packages/katana_form/lib/form/form_date_field.dart. 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 packages/katana_form/lib/form/form_date_time_field.dart:924 — `(hasText || hasFocus) && decoration?.suffixIcon == null && !widget.readOnly` appears character-identically in 2 files — packages/katana_form/lib/form/form_date_time_field.dart, packages/katana_form/lib/form/form_date_time_range_field.dart. 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 packages/masamune_notification_firebase/lib/adapter/firebase_remote_notification_masamune_adapter.dart:213 — `_platformInfo.isIOS || _platformInfo.isMacOS` appears character-identically in 2 files — packages/masamune_notification_firebase/lib/adapter/firebase_remote_notification_masamune_adapter.dart, packages/masamune_notification_local/lib/adapter/mobile_local_notification_masamune_adapter.dart. 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 packages/katana_form/lib/form/form_chips_field.dart:827 — `_textInputConnection != null && _textInputConnection!.attached` appears character-identically in 2 files — packages/katana_form/lib/form/form_chips_field.dart, packages/masamune_markdown/lib/src/markdown_field.dart. 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 packages/masamune_location/lib/src/location.dart:328 — `_updateInterval == updateInterval && listening` appears character-identically in 3 files — packages/masamune_location/lib/src/location.dart, packages/masamune_location/lib/src/others/compass.dart, packages/masamune_location/lib/src/web/compass.dart. 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 packages/katana_cli/lib/action/ads/ads.dart:43 — `androidAppId.isEmpty && iosAppId.isEmpty` appears character-identically in 2 files — packages/katana_cli/lib/action/ads/ads.dart, packages/katana_cli/lib/action/ecosystem/ecosystem.dart. 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 packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart:123 — `backgroundColor != null && backgroundColor.a > 0.0` appears character-identically in 2 files — packages/masamune_painter/lib/value/ellipse_shape_painting_value.dart, packages/masamune_painter/lib/value/rectangle_shape_painting_value.dart. 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 packages/masamune_lints/lib/masamune/masamune_model_should_load.dart:19 — `buildMethod == null || buildMethod.name.lexeme != "build"` appears character-identically in 2 files — packages/masamune_lints/lib/masamune/masamune_model_should_load.dart, packages/masamune_lints/lib/masamune/masamune_model_should_show_indicator_while_loading.dart. 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 packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:103 — `cacheFilter == null || cacheFilter!.call(query.query, value)` appears character-identically in 6 files — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart, packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart, packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart, packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart. 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 packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart:167 — `cacheFilter == null || cacheFilter!.call(query.query.create(entry.key), entry.value)` appears character-identically in 6 files — packages/masamune_model_d1/lib/adapter/cached_d1_model_adapter.dart, packages/masamune_model_do/lib/adapter/cached_do_model_adapter.dart, packages/masamune_model_firestore/lib/adapter/cached_firestore_model_adapter.dart, packages/masamune_model_firestore/lib/adapter/cached_listenable_firestore_model_adapter.dart. 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 packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart:329 — `char == '"' || char == "'" || char == "`"` appears character-identically in 4 files — packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart, packages/katana_cli/lib/action/cloudflare/storage.dart, packages/katana_cli/lib/action/cloudflare/turso.dart, packages/katana_cli/lib/action/cloudflare/turso_shared.dart. 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 packages/masamune_notification/lib/src/notification_target_query.dart:256 — `collectionPath.trimQuery().trimString("/").splitLength() <= 0 || collectionPath.trimQuery().trimString("/").splitLength() % 2 != 1` appears character-identically in 2 files — packages/masamune_notification/lib/src/notification_target_query.dart, packages/masamune_scheduler/lib/src/model_server_command_delete_documents_schedule.dart. 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 packages/masamune_model_d1_builder/lib/src/schema_spec.dart:95 — `column.name == "id" && column.sqlType.toUpperCase() != "TEXT"` appears character-identically in 2 files — packages/masamune_model_d1_builder/lib/src/schema_spec.dart, packages/masamune_model_do_builder/lib/src/schema_spec.dart. 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 packages/masamune_universal_ui/lib/src/universal_grid_view.dart:153 — `controller == null && identical(scrollDirection, Axis.vertical)` appears character-identically in 2 files — packages/masamune_universal_ui/lib/src/universal_grid_view.dart, packages/masamune_universal_ui/lib/src/universal_list_view.dart. 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 packages/katana_ui/lib/ui/others/cached_image_builder.dart:19 — `coverBackgroundColor == null || showLoadingIndicator` appears character-identically in 2 files — packages/katana_ui/lib/ui/others/cached_image_builder.dart, packages/katana_ui/lib/ui/web/cached_image_builder.dart. 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 packages/masamune_lints/lib/buttons/masamune_button_add_icon.dart:22 — `creation == null || !_isMaterialButtonType(creation.type)` appears character-identically in 3 files — packages/masamune_lints/lib/buttons/masamune_button_add_icon.dart, packages/masamune_lints/lib/buttons/masamune_button_convert.dart, packages/masamune_lints/lib/buttons/masamune_button_remove_icon.dart. 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 packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart:76 — `currentTool is PainterInlinePrimaryTools && currentTool != this` appears character-identically in 6 files — packages/masamune_painter/lib/tools/inline/property/filter_property_painter_inline_tools.dart, packages/masamune_painter/lib/tools/inline/property/font_size_property_painter_inline_tools.dart, packages/masamune_painter/lib/tools/inline/property/font_style_property_painter_inline_tools.dart, packages/masamune_painter/lib/tools/inline/property/group_property_painter_inline_tools.dart. 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 packages/masamune_model_d1_builder/lib/src/builder.dart:168 — `databasePath && segments.length > 1 && !segments[1].startsWith(":") && !(segments[1].startsWith("{") && segments[1].endsWith("}")) && segmen…` appears character-identically in 3 files — packages/masamune_model_d1_builder/lib/src/builder.dart, packages/masamune_model_do_builder/lib/src/builder.dart, packages/masamune_model_tidb_builder/lib/src/builder.dart. 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 packages/katana_model/lib/adapter/rest_api_model_adapter.dart:204 — `documentBuilder == null || deleteBuilder == null || !await documentBuilder.match(query)` appears character-identically in 2 files — packages/katana_model/lib/adapter/rest_api_model_adapter.dart, packages/katana_model_local/lib/src/local_async_saving_manager.dart. 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 packages/katana_model/lib/adapter/rest_api_model_adapter.dart:188 — `documentBuilder == null || saveBuilder == null || !await documentBuilder.match(query)` appears character-identically in 2 files — packages/katana_model/lib/adapter/rest_api_model_adapter.dart, packages/katana_model_local/lib/src/local_async_saving_manager.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×29
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/android_manifest.dart:312 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:43 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:77 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:81 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:128 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:192 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:214 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:277 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:332 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:379 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:446 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:493 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/cloudflare_environment.dart:504 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/debuggable.dart:144 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/debuggable.dart:163 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/src/debuggable.dart:180 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/command/fix.dart:187 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/action/cloudflare/d1.dart:238 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/action/cloudflare/d1.dart:390 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/action/cloudflare/d1.dart:406 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/action/cloudflare/d1.dart:416 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/action/cloudflare/deploy.dart:135 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/action/cloudflare/durable_object.dart:160 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/action/cloudflare/durable_object.dart:216 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/katana_cli/lib/action/cloudflare/init.dart:425 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • + 4 more in this group — see findings.md.
D19 · Documentation Quality · Documentation · ×6
  • Documentation: no build, run or usage example packages/masamune_functions_cloudflare/README.md:1 — `masamune_functions_cloudflare` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `packages/masamune_functions_cloudflare/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/masamune_google_cloud/README.md:1 — `masamune_google_cloud` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `packages/masamune_google_cloud/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/masamune_markdown/README.md:1 — `masamune_markdown` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `packages/masamune_markdown/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/masamune_test/README.md:1 — `masamune_test` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `packages/masamune_test/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/masamune_util/README.md:1 — `masamune_util` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `packages/masamune_util/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/masamune_workflow/README.md:1 — `masamune_workflow` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `packages/masamune_workflow/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
IC1 · Incompleteness & stubs · Member throws UnsupportedError · ×6
  • Member throws UnsupportedError packages/katana_router/lib/src/route_query_builder.dart:249 — `key`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/katana_router/lib/src/route_query_builder.dart:252 — `widget`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/katana_router/lib/src/route_query_builder.dart:312 — `key`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/katana_router/lib/src/route_query_builder.dart:315 — `widget`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/katana_router/lib/src/route_query_builder.dart:339 — `key`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/katana_router/lib/src/route_query_builder.dart:342 — `widget`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
AX6 · Interface segregation · Fat interface · ×5
  • Fat interface: AuthAdapter (25 abstract methods) packages/katana_auth/lib/src/auth_adapter.dart:3 — `AuthAdapter` declares 25 abstract methods: `isSignedIn`, `isVerified`, `isAnonymously`, `isWaitingConfirmation`, `userId`, `userName`, `userEmail`, `userPhoneNumber`, `userPhotoURL`, `activeProviderIds`, `refreshToken`, `accessToken`, `tryRestoreAuth`, `create`, `register`, `signIn`, `confirmSignIn`, `reauth`, `reset`, `verify`, `change`, `confirmChange`, `signOut`, `delete`, `dispose`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ModelAdapter (20 abstract methods) packages/katana_model/lib/src/model_adapter.dart:3 — `ModelAdapter` declares 20 abstract methods: `vectorConverter`, `loadDocument`, `loadCollection`, `loadAggregation`, `saveDocument`, `deleteDocument`, `disposeDocument`, `disposeCollection`, `availableListen`, `listenDocument`, `listenCollection`, `runTransaction`, `loadOnTransaction`, `saveOnTransaction`, `deleteOnTransaction`, `runBatch`, `saveOnBatch`, `deleteOnBatch`, `clearAll`, `clearCache`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: PlatformInfoAdapter (16 abstract methods) packages/katana_platform_info/lib/src/platform_info_adapter.dart:3 — `PlatformInfoAdapter` declares 16 abstract methods: `getApplicationId`, `getApplicationVersion`, `getApplicationBuildNumber`, `getTemporaryDirectory`, `getApplicationDocumentsDirectory`, `getLibraryDirectory`, `isIOS`, `isAndroid`, `isWeb`, `isDesktop`, `isMacOS`, `isLinux`, `isWindows`, `isFuchsia`, `isMobile`, `debugImageData`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: MarkdownToolRef (16 abstract methods) packages/masamune_markdown/lib/src/form_markdown_toolbar.dart:1044 — `MarkdownToolRef` declares 16 abstract methods: `toggleMode`, `deleteMode`, `closeKeyboard`, `isTextSelected`, `currentTool`, `controller`, `selection`, `field`, `isKeyboardShowing`, `canPaste`, `toggleLinkDialog`, `mentionBuilder`, `insertImage`, `insertVideo`, `insertBlock`, `exchangeBlock`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: RenderContext (16 abstract methods) packages/masamune_markdown/lib/src/markdown_field.dart:4799 — `RenderContext` declares 16 abstract methods: `focusNode`, `selection`, `composingRegion`, `showCursor`, `expands`, `style`, `cursorWidth`, `cursorHeight`, `cursorRadius`, `cursorColor`, `selectionColor`, `theme`, `textAlign`, `textDirection`, `textWidthBasis`, `textHeightBehavior`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×3
  • Projects may be oversized for their cohesion packages/katana_cli/pubspec.yaml:1 — `packages/katana_cli` (49932 LoC, 335 module-visible types across 35 directories) overshoots its size bounds. 3 of 106 build unit(s) (Gradle, pub) overshoot their size bounds, lowering Project Cohesion to 9.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion packages/katana_model/pubspec.yaml:1 — `packages/katana_model` (17716 LoC, 149 module-visible types across 3 directories) overshoots its size bounds. 3 of 106 build unit(s) (Gradle, pub) overshoot their size bounds, lowering Project Cohesion to 9.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion packages/masamune_painter/pubspec.yaml:1 — `packages/masamune_painter` (13309 LoC, 100 module-visible types across 13 directories) overshoots its size bounds. 3 of 106 build unit(s) (Gradle, pub) overshoot their size bounds, lowering Project Cohesion to 9.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 58 significant file(s) lose their only recent owner: packages/masamune_model_turso/lib/adapter/turso_model_adapter.dart, packages/katana_cli/lib/katana.dart, packages/masamune_ai_debugger/lib/src/ai_debug_overlay.dart, packages/katana_cli/lib/src/xcode.dart, packages/masamune_agora/lib/src/agora_controller.dart, packages/katana_cli/lib/action/cloudflare/storage.dart, packages/katana_cli/lib/action/cloudflare/tidb.dart, packages/katana_cli/lib/action/cloudflare/cloudflare_source_utils.dart (+50 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 10 significant file(s) lose their only recent owner: packages/masamune_introduction/lib/src/masamune_introduction.dart, packages/katana_ui/lib/ui/chat_tile.dart, packages/masamune/lib/src/masamune_adapter.dart, packages/masamune_animate/lib/src/animate_controller.dart, packages/masamune_painter/lib/src/painter_tools.dart, packages/masamune_painter/lib/tools/inline/property/foreground_property_color_painter_inline_tools.dart, packages/masamune_painter/lib/src/color_picker_modal.dart, packages/masamune_painter/lib/tools/inline/property/background_property_color_painter_inline_tools.dart (+2 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (69 single-owned of 845 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 845 of the 1382 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: packages/masamune_markdown/lib/src/markdown_field.dart.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found packages/masamune_lints/lib/main.dart:1 — 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 `packages/masamune_lints/lib/main.dart` makes this repository a deployable product (line 1).
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 101 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: packages/masamune_markdown/lib/src/markdown_tools.dart, packages/masamune_model_github/lib/src/github_copilot_agent_controller.dart, packages/katana_model/lib/src/vector_converter.dart, packages/katana_model/lib/src/model_vector_value.dart, packages/masamune_speech_to_text_mobile/lib/src/speech_to_text.dart, packages/masamune_markdown/lib/value/markdown_number_list_block_value.dart, packages/masamune_markdown/lib/value/markdown_toggle_list_block_value.dart, packages/masamune_markdown/lib/src/markdown_history.dart (and 93 more) (105 orphaned of 845 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 845 of the 1382 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P1 · CI/CD gates · CI build step not evidenced · ×1
  • CI build step not evidenced — A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/73 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/katana_auth/example`, `packages/katana_auth/example/ios`, `packages/katana_auth/example/macos`, `packages/katana_cli`, `packages/katana_firebase` and 66 more.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:3 — No static application security testing detected. For this repository's stack, add the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 4 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 packages/katana_auth/example/android/app/build.gradle.kts:62 — `packages/katana_auth/example/android/app/build.gradle.kts` 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 · Published package `katana` commits its lockfile · ×1
  • Published package `katana` commits its lockfile packages/katana/pubspec.lock:1 — `packages/katana/pubspec.yaml` publishes `katana` 3.5.0 to a pub registry, and `packages/katana/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_auth` commits its lockfile · ×1
  • Published package `katana_auth` commits its lockfile packages/katana_auth/pubspec.lock:1 — `packages/katana_auth/pubspec.yaml` publishes `katana_auth` 3.2.0 to a pub registry, and `packages/katana_auth/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_auth_firebase` commits its lockfile · ×1
  • Published package `katana_auth_firebase` commits its lockfile packages/katana_auth_firebase/pubspec.lock:1 — `packages/katana_auth_firebase/pubspec.yaml` publishes `katana_auth_firebase` 3.6.0 to a pub registry, and `packages/katana_auth_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_builder` commits its lockfile · ×1
  • Published package `katana_builder` commits its lockfile packages/katana_builder/pubspec.lock:1 — `packages/katana_builder/pubspec.yaml` publishes `katana_builder` 3.3.0 to a pub registry, and `packages/katana_builder/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_cli` commits its lockfile · ×1
  • Published package `katana_cli` commits its lockfile packages/katana_cli/pubspec.lock:1 — `packages/katana_cli/pubspec.yaml` publishes `katana_cli` 3.41.0 to a pub registry, and `packages/katana_cli/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_firebase` commits its lockfile · ×1
  • Published package `katana_firebase` commits its lockfile packages/katana_firebase/pubspec.lock:1 — `packages/katana_firebase/pubspec.yaml` publishes `katana_firebase` 3.4.0 to a pub registry, and `packages/katana_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_form` commits its lockfile · ×1
  • Published package `katana_form` commits its lockfile packages/katana_form/pubspec.lock:1 — `packages/katana_form/pubspec.yaml` publishes `katana_form` 3.3.0 to a pub registry, and `packages/katana_form/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_functions` commits its lockfile · ×1
  • Published package `katana_functions` commits its lockfile packages/katana_functions/pubspec.lock:1 — `packages/katana_functions/pubspec.yaml` publishes `katana_functions` 3.3.0 to a pub registry, and `packages/katana_functions/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_functions_firebase` commits its lockfile · ×1
  • Published package `katana_functions_firebase` commits its lockfile packages/katana_functions_firebase/pubspec.lock:1 — `packages/katana_functions_firebase/pubspec.yaml` publishes `katana_functions_firebase` 3.3.0 to a pub registry, and `packages/katana_functions_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_indicator` commits its lockfile · ×1
  • Published package `katana_indicator` commits its lockfile packages/katana_indicator/pubspec.lock:1 — `packages/katana_indicator/pubspec.yaml` publishes `katana_indicator` 3.4.1 to a pub registry, and `packages/katana_indicator/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_localization` commits its lockfile · ×1
  • Published package `katana_localization` commits its lockfile packages/katana_localization/pubspec.lock:1 — `packages/katana_localization/pubspec.yaml` publishes `katana_localization` 3.2.0 to a pub registry, and `packages/katana_localization/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_localization_annotation` commits its lockfile · ×1
  • Published package `katana_localization_annotation` commits its lockfile packages/katana_localization_annotation/pubspec.lock:1 — `packages/katana_localization_annotation/pubspec.yaml` publishes `katana_localization_annotation` 3.3.0 to a pub registry, and `packages/katana_localization_annotation/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_localization_builder` commits its lockfile · ×1
  • Published package `katana_localization_builder` commits its lockfile packages/katana_localization_builder/pubspec.lock:1 — `packages/katana_localization_builder/pubspec.yaml` publishes `katana_localization_builder` 3.3.0 to a pub registry, and `packages/katana_localization_builder/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_logger` commits its lockfile · ×1
  • Published package `katana_logger` commits its lockfile packages/katana_logger/pubspec.lock:1 — `packages/katana_logger/pubspec.yaml` publishes `katana_logger` 3.4.0 to a pub registry, and `packages/katana_logger/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_model` commits its lockfile · ×1
  • Published package `katana_model` commits its lockfile packages/katana_model/pubspec.lock:1 — `packages/katana_model/pubspec.yaml` publishes `katana_model` 3.9.0 to a pub registry, and `packages/katana_model/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_model_firestore` commits its lockfile · ×1
  • Published package `katana_model_firestore` commits its lockfile packages/katana_model_firestore/pubspec.lock:1 — `packages/katana_model_firestore/pubspec.yaml` publishes `katana_model_firestore` 3.6.0 to a pub registry, and `packages/katana_model_firestore/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_model_local` commits its lockfile · ×1
  • Published package `katana_model_local` commits its lockfile packages/katana_model_local/pubspec.lock:1 — `packages/katana_model_local/pubspec.yaml` publishes `katana_model_local` 3.4.0 to a pub registry, and `packages/katana_model_local/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_platform_info` commits its lockfile · ×1
  • Published package `katana_platform_info` commits its lockfile packages/katana_platform_info/pubspec.lock:1 — `packages/katana_platform_info/pubspec.yaml` publishes `katana_platform_info` 3.3.0 to a pub registry, and `packages/katana_platform_info/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_router` commits its lockfile · ×1
  • Published package `katana_router` commits its lockfile packages/katana_router/pubspec.lock:1 — `packages/katana_router/pubspec.yaml` publishes `katana_router` 3.4.0 to a pub registry, and `packages/katana_router/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_router_annotation` commits its lockfile · ×1
  • Published package `katana_router_annotation` commits its lockfile packages/katana_router_annotation/pubspec.lock:1 — `packages/katana_router_annotation/pubspec.yaml` publishes `katana_router_annotation` 3.2.0 to a pub registry, and `packages/katana_router_annotation/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_router_builder` commits its lockfile · ×1
  • Published package `katana_router_builder` commits its lockfile packages/katana_router_builder/pubspec.lock:1 — `packages/katana_router_builder/pubspec.yaml` publishes `katana_router_builder` 3.2.0 to a pub registry, and `packages/katana_router_builder/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_scoped` commits its lockfile · ×1
  • Published package `katana_scoped` commits its lockfile packages/katana_scoped/pubspec.lock:1 — `packages/katana_scoped/pubspec.yaml` publishes `katana_scoped` 3.2.0 to a pub registry, and `packages/katana_scoped/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_shorten` commits its lockfile · ×1
  • Published package `katana_shorten` commits its lockfile packages/katana_shorten/pubspec.lock:1 — `packages/katana_shorten/pubspec.yaml` publishes `katana_shorten` 3.2.0 to a pub registry, and `packages/katana_shorten/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_storage` commits its lockfile · ×1
  • Published package `katana_storage` commits its lockfile packages/katana_storage/pubspec.lock:1 — `packages/katana_storage/pubspec.yaml` publishes `katana_storage` 3.2.0 to a pub registry, and `packages/katana_storage/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_storage_firebase` commits its lockfile · ×1
  • Published package `katana_storage_firebase` commits its lockfile packages/katana_storage_firebase/pubspec.lock:1 — `packages/katana_storage_firebase/pubspec.yaml` publishes `katana_storage_firebase` 3.3.0 to a pub registry, and `packages/katana_storage_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_test` commits its lockfile · ×1
  • Published package `katana_test` commits its lockfile packages/katana_test/pubspec.lock:1 — `packages/katana_test/pubspec.yaml` publishes `katana_test` 3.1.1 to a pub registry, and `packages/katana_test/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_theme` commits its lockfile · ×1
  • Published package `katana_theme` commits its lockfile packages/katana_theme/pubspec.lock:1 — `packages/katana_theme/pubspec.yaml` publishes `katana_theme` 3.5.0 to a pub registry, and `packages/katana_theme/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_theme_annotation` commits its lockfile · ×1
  • Published package `katana_theme_annotation` commits its lockfile packages/katana_theme_annotation/pubspec.lock:1 — `packages/katana_theme_annotation/pubspec.yaml` publishes `katana_theme_annotation` 3.2.0 to a pub registry, and `packages/katana_theme_annotation/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_theme_builder` commits its lockfile · ×1
  • Published package `katana_theme_builder` commits its lockfile packages/katana_theme_builder/pubspec.lock:1 — `packages/katana_theme_builder/pubspec.yaml` publishes `katana_theme_builder` 3.2.0 to a pub registry, and `packages/katana_theme_builder/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `katana_ui` commits its lockfile · ×1
  • Published package `katana_ui` commits its lockfile packages/katana_ui/pubspec.lock:1 — `packages/katana_ui/pubspec.yaml` publishes `katana_ui` 3.5.0 to a pub registry, and `packages/katana_ui/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune` commits its lockfile · ×1
  • Published package `masamune` commits its lockfile packages/masamune/pubspec.lock:1 — `packages/masamune/pubspec.yaml` publishes `masamune` 3.6.2 to a pub registry, and `packages/masamune/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_ads_google` commits its lockfile · ×1
  • Published package `masamune_ads_google` commits its lockfile packages/masamune_ads_google/pubspec.lock:1 — `packages/masamune_ads_google/pubspec.yaml` publishes `masamune_ads_google` 3.2.2 to a pub registry, and `packages/masamune_ads_google/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_agora` commits its lockfile · ×1
  • Published package `masamune_agora` commits its lockfile packages/masamune_agora/pubspec.lock:1 — `packages/masamune_agora/pubspec.yaml` publishes `masamune_agora` 3.3.2 to a pub registry, and `packages/masamune_agora/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_ai` commits its lockfile · ×1
  • Published package `masamune_ai` commits its lockfile packages/masamune_ai/pubspec.lock:1 — `packages/masamune_ai/pubspec.yaml` publishes `masamune_ai` 3.5.2 to a pub registry, and `packages/masamune_ai/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_ai_firebase` commits its lockfile · ×1
  • Published package `masamune_ai_firebase` commits its lockfile packages/masamune_ai_firebase/pubspec.lock:1 — `packages/masamune_ai_firebase/pubspec.yaml` publishes `masamune_ai_firebase` 3.6.0 to a pub registry, and `packages/masamune_ai_firebase/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_ai_openai` commits its lockfile · ×1
  • Published package `masamune_ai_openai` commits its lockfile packages/masamune_ai_openai/pubspec.lock:1 — `packages/masamune_ai_openai/pubspec.yaml` publishes `masamune_ai_openai` 3.4.2 to a pub registry, and `packages/masamune_ai_openai/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_animate` commits its lockfile · ×1
  • Published package `masamune_animate` commits its lockfile packages/masamune_animate/pubspec.lock:1 — `packages/masamune_animate/pubspec.yaml` publishes `masamune_animate` 3.2.2 to a pub registry, and `packages/masamune_animate/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_annotation` commits its lockfile · ×1
  • Published package `masamune_annotation` commits its lockfile packages/masamune_annotation/pubspec.lock:1 — `packages/masamune_annotation/pubspec.yaml` publishes `masamune_annotation` 3.2.0 to a pub registry, and `packages/masamune_annotation/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_app_review` commits its lockfile · ×1
  • Published package `masamune_app_review` commits its lockfile packages/masamune_app_review/pubspec.lock:1 — `packages/masamune_app_review/pubspec.yaml` publishes `masamune_app_review` 3.2.2 to a pub registry, and `packages/masamune_app_review/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
P6 · Release Hygiene · Published package `masamune_auth_apple` commits its lockfile · ×1
  • Published package `masamune_auth_apple` commits its lockfile packages/masamune_auth_apple/pubspec.lock:1 — `packages/masamune_auth_apple/pubspec.yaml` publishes `masamune_auth_apple` 3.2.2 to a pub registry, and `packages/masamune_auth_apple/pubspec.lock` is committed beside it. pub's guidance splits on exactly this: an application commits `pubspec.lock` because the resolution it records is the one that runs, and a package does not, because no consumer ever uses it — they resolve your declared version ranges against their own dependency set. The cost is not tidiness: the committed lockfile is what your own CI resolves against, so the ranges you publish are never exercised, and the first consumer to resolve a newer compatible version is the one who discovers whether the range was right. Remove it with `git rm --cached pubspec.lock` and add `pubspec.lock` to `.gitignore`.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 0/4 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-b4d8d00ba26f462696889a9e339c56e3/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-b4d8d00ba26f462696889a9e339c56e3/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3200" --report-format json --report-path /tmp/watchdog-gitleaks-b4d8d00ba26f462696889a9e339c56e3/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=559" --report-format json --report-path /tmp/watchdog-gitleaks-b4d8d00ba26f462696889a9e339c56e3/history-3.json --exit-code 0 --source .4artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-b4d8d00ba26f462696889a9e339c56e3/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .12artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.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 .0artifacts/raw/osv-scanner.json

Run 01a1ea3e-2ad7-7b45-8804-ea77b00338c4 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

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