Public report of leonardkorir/Nolive, 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 reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 17:42 UTC · Survey ID cd_5158e8a876374a8fb38301953b791878
leonardkorir/Nolive
Measured 17 November 2026, 17:42 UTC, at code version 6dd37bc
First survey, so nothing to compare with yet
CAI scoreAdequate
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: 100,452 lines of product code in 20 projects, tests not counted · Estimated rebuild effort: about 1.2 person-years · Weakest lens: Security and Compliance, 39.6
Findings by how serious they are
19 critical817 serious69 minor
7 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 17:42 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 ▸
59of 59 dimensions measured by tools.
892of 905 findings point to an exact file and line, so you can open each one in the code. The other 13 concern the repository as a whole, such as missing documentation.
59dimensions across 8 lenses, read from 100,452 lines of product code in 20 projects.
leonardkorir/Nolive falls short of our standard for production, held back most by its Security and Compliance lens, the code's security and compliance. It scores 50.6 out of 100 and is rated Adequate, and seven of its 19 critical findings are security problems in the build pipeline.
Security and Compliance, at 39.6, is the weakest lens and counts most in the score. The best first step is naming the access rules, worth about 7.4 points. Recording design decisions comes next, worth about 2.8 points. Raising Security and Compliance to 70 would lift the score to about 58.3.
Six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One secret can leak from the build pipeline. Pinning each tool to an exact version and limiting the secret to its own step would close both risks. Saving the change and the message together would take care of the 12 places where data is saved and a message sent separately.
The product code is 100,452 lines, about €180,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Security and Compliance rose from 39.6 to 70, the lowest score rated Strong, the score would rise from 50.6 to about 58.3.
Code composition: what the lines of code are
Product code 60%Tests 40%
Rebuild cost: about €180,000 · Estimate
Cost to rebuild
€60,000 to €300,000, for 1,003 to 3,181 hours of work, about 1.2 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 51. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 100,452 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Name the access rules — Serverpod scopes (requiredScopes, a Scope subclass) or roles and permissions declared once — and consult them where access is checked, so the rule set is reviewable and testable on its own.
Raises the score by about 7.4 points · Medium effort · Access Controls
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.
Raises the score by about 2.8 points · Low effort · ADR Quality
3
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
This repository constructs a collision-broken hash (MD5/SHA1) at 8 sites, not one: `apps/main_app/lib/src/app/platform/douyin_danmaku_signature_service.dart:54` (md5.convert(…)), `apps/main_app/lib/src/shared/presentation/widgets/persisted_network_image.dart:267` (sha1.convert(…)), `packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3854` (sha1.convert(…)), `packages/live_providers/lib/src/providers/bilibili/bilibili_sign_service.dart:157` (md5.convert(…)), `packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:253` (md5.convert(…)), `packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:255` (md5.convert(…)), `packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:69` (md5.convert(…)), `packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:84` (md5.convert(…)). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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 €180,000 to build again, about 1.2 person-years of work. Its weakest lens is Security and Compliance, at 39.6 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Name the access rules — Serverpod scopes (requiredScopes, a Scope subclass) or roles and permissions declared once — and consult them where access is checked, so the rule set is reviewable and testable on its own. Of all the actions in this report, it raises the score most for the work it takes: about 7.4 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.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 162,553 lines over the last 90 days, which is about 659,243 lines a year. At that pace, the extra work comes to an estimated 93.3 to 559.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.
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.
14 modules, with 2 dependencies between them. Every module uses only modules listed above it, so there are no loops.
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.
app.nolive.mobile.ResumeOrientationAction uses app.nolive.mobile, so a change to app.nolive.mobile can break app.nolive.mobile.ResumeOrientationAction, while a change to app.nolive.mobile.ResumeOrientationAction can't break app.nolive.mobile.
Position
Below the diagonal: app.nolive.mobile.ResumeOrientationAction uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
10
High / Critical
A03:2025 — Software Supply Chain Failures
5
Medium
Roadmap
Top priorities: Name the access rules — Serverpod scopes (requiredScopes, a Scope subclass) or roles and permissions declared once — and consult them where access is checked, so the rule set is reviewable and testable on its own; Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 8 sites, not one: `apps/main_app/lib/src/app/platform/douyin_danmaku_signature_service.dart:54` (md5.convert(…)), `apps/main_app/lib/src/shared/presentation/widgets/persisted_network_image.dart:267` (sha1.convert(…)), `packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3854` (sha1.convert(…)), `packages/live_providers/lib/src/providers/bilibili/bilibili_sign_service.dart:157` (md5.convert(…)), `packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:253` (md5.convert(…)), `packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:255` (md5.convert(…)), `packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:69` (md5.convert(…)), `packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:84` (md5.convert(…)). Each is a separate decision — fixing only the line this row cites leaves the others in place; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Name the access rules — Serverpod scopes (requiredScopes, a Scope subclass) or roles and permissions declared once — and consult them where access is checked, so the rule set is reviewable and testable on its own.
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 8 sites, not one: `apps/main_app/lib/src/app/platform/douyin_danmaku_signature_service.dart:54` (md5.convert(…)), `apps/main_app/lib/src/shared/presentation/widgets/persisted_network_image.dart:267` (sha1.convert(…)), `packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3854` (sha1.convert(…)), `packages/live_providers/lib/src/providers/bilibili/bilibili_sign_service.dart:157` (md5.convert(…)), `packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:253` (md5.convert(…)), `packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:255` (md5.convert(…)), `packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:69` (md5.convert(…)), `packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:84` (md5.convert(…)). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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.
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.
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 — 19
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 — 817
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 — 69
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 7
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 59 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 59 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 892 of 905 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.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 — 8 Maven/Gradle manifest(s) were read, stating a version for 1 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.
D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Git history depth insufficient — this repository has 13 commit(s), too few for a reliable trend signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 13 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
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.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — 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.
D34 Knowledge Freshness — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Too few commits to judge knowledge freshness (13 commit(s) sampled).
D35 Change Coupling — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Git history depth insufficient — this repository has 13 commit(s), too few for a reliable change-coupling signal. The clone is complete, so there is no deeper history to fetch: the signal returns as the project accumulates history.
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 (third_party/media_kit_video/android/src/main/AndroidManifest.xml). 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).
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.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 61 further occurrence(s) are not listed individually; the score already reflects all 101.
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 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
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.
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.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
81 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was _0x385d19 at 106. A further 1 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 AppRouter.onGenerateRoute at 25 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: apps/main_app/lib/src/app/routing/app_router.dart (AppRouter.onGenerateRoute at 25). 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.
+ 73 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 6 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with _0x385d19 (cyclomatic 106), w_0x5c3140::_0x970e7 (cyclomatic 96), StripchatLlHlsProxy._materializePlaylistImpl (cyclomatic 81). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cyclomatic Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 149 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 240 down to 240 or less in Cognitive Complexity — start with w_0x5c3140::_0x970e7 (cognitive 496). — Refactoring it lifts Cognitive Complexity from 2.0 to about 3.2/10.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.1 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 43 MethodTooLong finding(s) in God Classes — start with stripchat_llhls_proxy.dart (4), follow_watch_row.dart (2), room_preview_page.dart (2). — One of this dimension's main actionable groups (43 warning-level).
Resolve the 40 FileTooLong finding(s) in God Classes — start with REDACTED, stripchat_llhls_proxy.dart, chaturbate_llhls_proxy.dart. — One of this dimension's main actionable groups (40 warning-level).
Resolve the 30 ClassTooLong finding(s) in God Classes — start with stripchat_llhls_proxy.dart, chaturbate_llhls_proxy.dart, room_preview_page.dart. — One of this dimension's main actionable groups (30 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
205 duplicated block group(s) detected. 10.0 % of the production lines (9,997 of 100,452) are in a reported copy. A further 137 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (12 corresponding lines) · ×11packages/live_sync/lib/src/local_sync/local_sync_client.dart:69
+ 132 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 15 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with layout_settings_page.dart, manage_local_sync_use_case.dart, chaturbate_llhls_proxy.dart. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 14 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with chaturbate_hls_master_playlist_parser.dart (2), local_storage_file_store.dart (2), youtube_nsig_webview_solver.dart. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 12 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with follow_settings_page.dart (2), chaturbate_llhls_proxy.dart (2), home_page.dart. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
17 production modules (Gradle+Cargo+SwiftPM+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; 0 module(s) off the main sequence, with abstractness counted on 9 of the 17 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 24 Low cohesion finding(s) in Cohesion (LCOM4) — start with room_fullscreen_session_platform_adapters.dart (2), migration_placeholder_provider.dart, mpv_player.dart. — One of this dimension's main actionable groups (24 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 34 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 5 package(s) locked at an older version the licence read is that of the package's latest analysed release, not of the locked one.
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.
Resolve the 24 Hotspot finding(s) in Churn × Complexity Hotspots — start with room_preview_page_player_surface.dart, stripchat_llhls_proxy.dart, room_preview_page.dart. — One of this dimension's main actionable groups (24 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 100452 LoC (0.0/KLoC) → score 10.0. 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.
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.
2 of 2 documentation facets pass in full. 14 document(s) read across 12 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
No ADRs foundapps/main_app/macos/Runner.xcodeproj/project.pbxproj:1
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj. — 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.
2 of 20 build units (Cargo, Gradle, SwiftPM, Xcode, pub) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×2apps/main_app/pubspec.yaml:1
What to do
Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with pubspec.yaml (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
10 finding(s): 0 critical, 7 high, 3 medium, 0 low. 6 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 38 file(s) — `apps/main_app/android/gradlew` (lines 140–141, line 142, line 143, …), `REDACTED`, `apps/main_app/assets/js/youtube-nsig-solver.js`, `scripts/manage_main_app_android_capture.sh` (line 265), `third_party/dart_quickjs/third_party/quickjs-ng/cutils.c` (line 194, line 1072), … (+33 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 6 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 (6 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 7 platform declaration(s) and 1 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`BasePlayer` declares 16 abstract methods: `backend`, `states`, `diagnostics`, `currentState`, `currentDiagnostics`, `supportsEmbeddedView`, `supportsScreenshot`, `initialize`, `setSource`, `play`, `pause`, `stop`, `setVolume`, `captureScreenshot`, `buildView`, `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/live_player/lib/src/base_player.dart:9
`Webview` declares 28 abstract methods: `onClose`, `isNavigating`, `registerJavaScriptMessageHandler`, `unregisterJavaScriptMessageHandler`, `setPromptHandler`, `launch`, `setBrightness`, `addScriptToExecuteOnDocumentCreated`, `setApplicationNameForUserAgent`, `back`, `forward`, `setWebviewWindowVisibility`, `moveWebviewWindow`, `bringToForeground`, `getPositionalParameters`, `reload`, `stop`, `openDevToolsWindow`, `setOnHistoryChangedCallback`, `setOnUrlRequestCallback`, `addOnWebMessageReceivedCallback`, `removeOnWebMessageReceivedCallback`, `removeAllWebMessageReceivedCallback`, `close`, `evaluateJavaScript`, `postWebMessageAsString`, `postWebMessageAsJson`, `getAllCookies`. 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. — third_party/desktop_webview_window/lib/src/webview.dart:20
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
Only 1 place(s) refuse an unauthorized caller — too few to demonstrate default-deny across handlers.
What to do
Name the access rules — Serverpod scopes (requiredScopes, a Scope subclass) or roles and permissions declared once — and consult them where access is checked, so the rule set is reviewable and testable on its own.
Enforce authorization at every handler — a guard on each route, or a global authentication guard/middleware with explicit public opt-outs, so protected-by-default is demonstrable.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour — a data-only entity with public mutable state whose logic lives in a foreign service is anemic. Rich models enforce their own invariants; an immutable `@freezed`/`@immutable` value class is rich by construction.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
Other · Domain Modelling — Whether an entity protects its own invariants — a class whose identity is derived from its fields (value equality) but whose fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.
Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.
`ImportFollowListJsonUseCase.call` performs two independent DURABLE writes — `followRepository` (a durable store) and `tagRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/features/library/application/manage_follow_transfer_use_case.dart:67
`ImportFollowListJsonUseCase._restoreFollowImportSnapshot` performs two independent DURABLE writes — `followRepository` (a durable store) and `tagRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/features/library/application/manage_follow_transfer_use_case.dart:119
`RemoveTagUseCase.call` performs two independent DURABLE writes — `tagRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/features/library/application/remove_tag_use_case.dart:13
`UpdateFollowTagsUseCase.call` performs two independent DURABLE writes — `tagRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/features/library/application/update_follow_tags_use_case.dart:39
`UpdateProviderAccountSettingsUseCase.call` performs two independent DURABLE writes — `secureCredentialStore` (a durable store) and `settingsRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:238
`ImportSyncSnapshotJsonUseCase._importLegacyFollowList` performs two independent DURABLE writes — `tagRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/features/settings/application/manage_snapshot_data_use_case.dart:136
`UpdateSyncPreferencesUseCase.call` performs two independent DURABLE writes — `secureCredentialStore` (a durable store) and `settingsRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/features/sync/application/sync_preferences_use_case.dart:154
`UpdateSyncPreferencesUseCase._restoreSnapshot` performs two independent DURABLE writes — `settingsRepository` (a durable store) and `secureCredentialStore` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/features/sync/application/sync_preferences_use_case.dart:222
`LazySecureCredentialStore.delete` performs two independent DURABLE writes — `_activeStore` (a durable store) and `_fallbackStore` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/shared/application/secure_credential_store.dart:575
`LazySecureCredentialStore.write` performs two independent DURABLE writes — `_activeStore` (a durable store) and `_fallbackStore` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — apps/main_app/lib/src/shared/application/secure_credential_store.dart:624
`RepositorySyncSnapshotService.importSnapshot` performs two independent DURABLE writes — `settingsRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart:87
`RepositorySyncSnapshotService.importCategory` performs two independent DURABLE writes — `settingsRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart:160
What to do
Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
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.
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.
`selectTwitchRecoveryQuality` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — apps/main_app/lib/src/features/room/application/twitch_playback_recovery.dart:157
`disposeIsolate` has an empty body — confirm it's an intentional no-op and not an unfinished method. — packages/live_providers/lib/src/providers/youtube/youtube_decipher_service.dart:167
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.
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
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Do you agree with this assessment?
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
What to do
Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.
Do you agree with this assessment?
P2 · Observability5.7 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 4/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `apps/main_app`, `apps/main_app/ios`, `apps/main_app/macos`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add 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 1 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.
`apps/main_app/rust/danmaku_mask/Cargo.toml` 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`. — apps/main_app/rust/danmaku_mask/Cargo.toml:9
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.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release. — REDACTED:104
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
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.
Other · Security — Read from this repository's Dart source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS certificate validation — facts about code that hold whether or not it serves anything itself. The TLS protocol version is not read: `dart:io` leaves the protocol floor to the platform's TLS library and has no switch that admits an obsolete version. This repository serves HTTP itself (packages/live_sync/lib/src/local_sync/local_sync_server.dart:125 — `HttpServer.bind(`), so its Dart source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Dart spelling appears in production source, not proven on every route.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×8) — apps/main_app/lib/src/app/platform/douyin_danmaku_signature_service.dart:54, apps/main_app/lib/src/shared/presentation/widgets/persisted_network_image.dart:267, packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3854, …
This repository runs an HTTP server that is not bound to the loopback interface alone — or binds it at an address its source does not spell out — and nothing in its Dart source secures the transport: no `HttpServer.bindSecure` or `securityContext:`, no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: packages/live_sync/lib/src/local_sync/local_sync_server.dart:125 — `HttpServer.bind(`.
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Dart server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: packages/live_sync/lib/src/local_sync/local_sync_server.dart:125 — `HttpServer.bind(`.
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 8 sites, not one: `apps/main_app/lib/src/app/platform/douyin_danmaku_signature_service.dart:54` (md5.convert(…)), `apps/main_app/lib/src/shared/presentation/widgets/persisted_network_image.dart:267` (sha1.convert(…)), `packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3854` (sha1.convert(…)), `packages/live_providers/lib/src/providers/bilibili/bilibili_sign_service.dart:157` (md5.convert(…)), `packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:253` (md5.convert(…)), `packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:255` (md5.convert(…)), `packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:69` (md5.convert(…)), `packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:84` (md5.convert(…)). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Secure the server's transport: serve TLS itself (`HttpServer.bindSecure(…, context)`, or `shelf_io.serve(…, securityContext: context)`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only. A server only this device needs to reach should bind `InternetAddress.loopbackIPv4` instead.
Set security response headers on what the server sends — `response.headers.set('X-Content-Type-Options', 'nosniff')` in a `dart:io` handler, or a shelf middleware that adds `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy to every `Response`.
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.
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.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
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.
Do you agree with this assessment?
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.
`walk` is public and takes `Object ? v` from its caller, and it calls itself at line 9 (`walk`) with a piece of `v` (and at line 11) — and nowhere in `walk` 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 `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/live_providers/tool/yt_nsig_challenge_probe2.dart:9
`walk` is public and takes `Object ? v` from its caller, and it calls itself at line 10 (`walk`) with a piece of `v` (and at line 14) — and nowhere in `walk` 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 `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/live_providers/tool/yt_nsig_challenge_probe3.dart:10
`walk` is public and takes `Object ? v` from its caller, and it calls itself at line 8 (`walk`) with a piece of `v` (and at line 12) — and nowhere in `walk` 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 `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/live_providers/tool/yt_nsig_challenge_probe4.dart:8
`isTransientTransportFailure` is public and takes `Object ? error` from its caller, and it calls itself at line 37 (`isTransientTransportFailure`) with a piece of `error` — and nowhere in `isTransientTransportFailure` 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 `isTransientTransportFailure` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/live_providers/lib/src/providers/provider_transport_failure.dart:37
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a 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.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. 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.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
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.
`on Object` 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. — packages/live_storage/lib/src/persistence/local_storage_file_store.dart:243
`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. — packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:236
`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. (×13) — packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:476, packages/live_providers/lib/src/providers/chaturbate/chaturbate_room_page_parser.dart:105, packages/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:635, …
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. (×23) — packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:298, packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:301, packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:274, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. (×2) — packages/live_hls_proxy/lib/src/aes_worker.dart:85, packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:124
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether 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.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 7 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 62 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 applicable: this repository's Dart imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Kotlin imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. 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. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. 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
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an Isar, ObjectBox, Floor or Hive entity, or a Serverpod table model — and no database or data-store client (sqflite, Drift, Isar, Hive, Realm, Firestore, Supabase, postgres, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~66758 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 — 8 Maven/Gradle manifest(s) were read, stating a version for 1 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.
D16 Bus Factor — single-contributor repository — bus factor is not applicable
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 — API consistency is measured on C#, TypeScript, Go only; the exposed Swift surface was not measured.
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 — 4 of 7 comment blocks were not judged (4 in a language other than English): 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.
D34 Knowledge Freshness — too few commits to judge knowledge freshness
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 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM6 Domain ↔ infrastructure boundary — this Dart repository maps no type to a persistence framework (drift/floor/isar/objectbox/hive), so DM6's domain↔infrastructure fusion read has no population to be taken over
DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
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
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
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'.
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.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
X2 Cancellation propagation — no C# was loaded; this repository's Dart, Kotlin and Rust were read, and no request in it can be cancelled by a caller (Dio, or package:http's Abortable requests; Ktor, OkHttp's newCall or a URL stream, from a suspend function) — a Kotlin request outside a suspend function has no caller's cancellation to honour; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
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.
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.
Dual write (no outbox): ImportFollowListJsonUseCase.call apps/main_app/lib/src/features/library/application/manage_follow_transfer_use_case.dart:67— `ImportFollowListJsonUseCase.call` performs two independent DURABLE writes — `followRepository` (a durable store) and `tagRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): ImportFollowListJsonUseCase._restoreFollowImportSnapshot apps/main_app/lib/src/features/library/application/manage_follow_transfer_use_case.dart:119— `ImportFollowListJsonUseCase._restoreFollowImportSnapshot` performs two independent DURABLE writes — `followRepository` (a durable store) and `tagRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): RemoveTagUseCase.call apps/main_app/lib/src/features/library/application/remove_tag_use_case.dart:13— `RemoveTagUseCase.call` performs two independent DURABLE writes — `tagRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): UpdateFollowTagsUseCase.call apps/main_app/lib/src/features/library/application/update_follow_tags_use_case.dart:39— `UpdateFollowTagsUseCase.call` performs two independent DURABLE writes — `tagRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): UpdateProviderAccountSettingsUseCase.call apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:238— `UpdateProviderAccountSettingsUseCase.call` performs two independent DURABLE writes — `secureCredentialStore` (a durable store) and `settingsRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): ImportSyncSnapshotJsonUseCase._importLegacyFollowList apps/main_app/lib/src/features/settings/application/manage_snapshot_data_use_case.dart:136— `ImportSyncSnapshotJsonUseCase._importLegacyFollowList` performs two independent DURABLE writes — `tagRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): UpdateSyncPreferencesUseCase.call apps/main_app/lib/src/features/sync/application/sync_preferences_use_case.dart:154— `UpdateSyncPreferencesUseCase.call` performs two independent DURABLE writes — `secureCredentialStore` (a durable store) and `settingsRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): UpdateSyncPreferencesUseCase._restoreSnapshot apps/main_app/lib/src/features/sync/application/sync_preferences_use_case.dart:222— `UpdateSyncPreferencesUseCase._restoreSnapshot` performs two independent DURABLE writes — `settingsRepository` (a durable store) and `secureCredentialStore` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): LazySecureCredentialStore.delete apps/main_app/lib/src/shared/application/secure_credential_store.dart:575— `LazySecureCredentialStore.delete` performs two independent DURABLE writes — `_activeStore` (a durable store) and `_fallbackStore` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): LazySecureCredentialStore.write apps/main_app/lib/src/shared/application/secure_credential_store.dart:624— `LazySecureCredentialStore.write` performs two independent DURABLE writes — `_activeStore` (a durable store) and `_fallbackStore` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): RepositorySyncSnapshotService.importSnapshot packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart:87— `RepositorySyncSnapshotService.importSnapshot` performs two independent DURABLE writes — `settingsRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Dual write (no outbox): RepositorySyncSnapshotService.importCategory packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart:160— `RepositorySyncSnapshotService.importCategory` performs two independent DURABLE writes — `settingsRepository` (a durable store) and `followRepository` (a second durable store) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
MethodTooLong: RoomPlayerSurfaceSection.build apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:348— MethodTooLong — build runs 403 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 303 over it, 4.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: _ProviderCategoriesPageState.build apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:516— MethodTooLong — build runs 318 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 218 over it, 3.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: StripchatLlHlsProxy._materializePlaylistImpl packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:901— MethodTooLong — _materializePlaylistImpl runs 301 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 201 over it, 3.01× 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: FollowWatchRow.build apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:32— MethodTooLong — build runs 291 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 191 over it, 2.91× 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: _RoomPreviewPageState.build apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:1337— MethodTooLong — build runs 277 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 177 over it, 2.77× 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: _SyncLocalPageState.build apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:640— MethodTooLong — build runs 256 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 156 over it, 2.56× 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: _PlayerSettingsPageState.build apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:84— MethodTooLong — build runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RoomTwitchRecoveryController.scheduleRecovery apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:145— MethodTooLong — scheduleRecovery 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: _PlayerSettingsPageState._buildAdvancedOptions apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:429— MethodTooLong — _buildAdvancedOptions runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× 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: _DanmakuSettingsPageState.build apps/main_app/lib/src/features/settings/presentation/danmaku_settings_page.dart:75— MethodTooLong — build runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.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: RoomLoadingRoomShell.build apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:45— MethodTooLong — build runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: _AccountSettingsPageState.build apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:408— MethodTooLong — build runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.15× 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: NoliveTheme._buildTheme apps/main_app/lib/src/shared/presentation/theme/nolive_theme.dart:103— MethodTooLong — _buildTheme 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: _FollowSettingsPageState.build apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:340— MethodTooLong — build runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StripchatLlHlsProxy._handlePlaylistRequest packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:476— MethodTooLong — _handlePlaylistRequest runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× 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: StripchatLlHlsProxy._rewritePlaylist packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2949— MethodTooLong — _rewritePlaylist runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× 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: _RoomPreviewPageState.initState apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:898— MethodTooLong — initState runs 197 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 97 over it, 1.97× 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: MdkPlayer.setSource packages/live_player/lib/src/mdk_player.dart:119— MethodTooLong — setSource runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× 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: RoomFullscreenTopChrome.build apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:240— MethodTooLong — build runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× 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: _ProviderCategoriesTabState.build apps/main_app/lib/src/features/browse/presentation/browse_page.dart:462— MethodTooLong — build runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× 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: YouTubePlaybackDataSource.loadPlaybackBundle packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:299— MethodTooLong — loadPlaybackBundle runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RoomControlsPanel.build apps/main_app/lib/src/features/room/presentation/room_preview_page_controls.dart:48— MethodTooLong — build runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: _RoomSettingsPageState.build apps/main_app/lib/src/features/settings/presentation/room_settings_page.dart:55— MethodTooLong — build runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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: StripchatLlHlsProxy._handleAssetRequest packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1982— MethodTooLong — _handleAssetRequest runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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: LoadPlayerPreferencesUseCase.call apps/main_app/lib/src/features/settings/application/manage_player_preferences_use_case.dart:405— MethodTooLong — call runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× 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.
FileTooLong: REDACTED REDACTED— FileTooLong — 5250 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 100% of them inside a single declaration: crawler (30-7029). The bar is 1500 significant lines; this is 3750 over it, 3.50× 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: stripchat/stripchat_llhls_proxy.dart packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart— FileTooLong — 3232 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: StripchatLlHlsProxy (59-3649). The bar is 500 significant lines; this is 2732 over it, 6.46× 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: chaturbate/chaturbate_llhls_proxy.dart packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart— FileTooLong — 1908 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: ChaturbateLlHlsProxy (132-2249). The bar is 500 significant lines; this is 1408 over it, 3.82× 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: twitch/twitch_ad_guard_proxy.dart packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart— FileTooLong — 1269 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: TwitchAdGuardProxy (13-1235). The bar is 500 significant lines; this is 769 over it, 2.54× 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: presentation/room_preview_page.dart apps/main_app/lib/src/features/room/presentation/room_preview_page.dart— FileTooLong — 1221 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: _RoomPreviewPageState (129-1723). The bar is 500 significant lines; this is 721 over it, 2.44× 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/mpv_player.dart packages/live_player/lib/src/mpv_player.dart— FileTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: MpvPlayer (184-1403). The bar is 500 significant lines; this is 525 over it, 2.05× 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: application/manage_snapshot_data_use_case.dart apps/main_app/lib/src/features/settings/application/manage_snapshot_data_use_case.dart— FileTooLong — 1012 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 512 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: chaturbate/chaturbate_live_data_source.dart packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart— FileTooLong — 1001 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ChaturbateLiveDataSource (56-1354). The bar is 500 significant lines; this is 501 over it, 2.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/mpv_android_surface_manager.dart packages/live_player/lib/src/mpv_android_surface_manager.dart— FileTooLong — 939 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 439 over it, 1.88× 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/mdk_player.dart packages/live_player/lib/src/mdk_player.dart— FileTooLong — 885 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: MdkPlayer (15-1024). The bar is 500 significant lines; this is 385 over it, 1.77× 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: presentation/room_page_session_coordinator.dart apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart— FileTooLong — 877 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: RoomPageSessionCoordinator (52-1176). The bar is 500 significant lines; this is 377 over it, 1.75× 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: presentation/sync_local_page.dart apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart— FileTooLong — 813 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: _SyncLocalPageState (37-968). The bar is 500 significant lines; this is 313 over it, 1.63× 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: application/room_danmaku_controller.dart apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart— FileTooLong — 778 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: RoomDanmakuController (150-1058). The bar is 500 significant lines; this is 278 over it, 1.56× 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: presentation/library_page.dart apps/main_app/lib/src/features/library/presentation/library_page.dart— FileTooLong — 762 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: _LibraryPageState (36-1004). The bar is 500 significant lines; this is 262 over it, 1.52× 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/mpv_property_configurator.dart packages/live_player/lib/src/mpv_property_configurator.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: youtube/youtube_playback_data_source.dart packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart— FileTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: YouTubePlaybackDataSource (15-1026). The bar is 500 significant lines; this is 254 over it, 1.51× 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: bootstrap/bootstrap_internals.dart apps/main_app/lib/src/app/bootstrap/bootstrap_internals.dart— FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 253 over it, 1.51× 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: widgets/follow_watch_row.dart apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart— FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 249 over it, 1.50× 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: presentation/provider_categories_page.dart apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart— FileTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: _ProviderCategoriesPageState (34-946). The bar is 500 significant lines; this is 212 over it, 1.42× 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: presentation/browse_page.dart apps/main_app/lib/src/features/browse/presentation/browse_page.dart— FileTooLong — 694 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 194 over it, 1.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: presentation/account_settings_page.dart apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart— FileTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: _AccountSettingsPageState (24-682). The bar is 500 significant lines; this is 184 over it, 1.37× 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: presentation/room_preview_page_player_surface.dart apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart— FileTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: RoomPlayerSurfaceSection (308-885). The bar is 500 significant lines; this is 174 over it, 1.35× 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: application/manage_provider_accounts_use_case.dart apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart— FileTooLong — 646 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 146 over it, 1.29× 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: twitch/twitch_web_playback_bridge.dart packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart— FileTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: TwitchWebPlaybackBridge (10-855). The bar is 500 significant lines; this is 133 over it, 1.27× 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: youtube/youtube_api_client.dart packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart— FileTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: HttpYouTubeApiClient (188-765). The bar is 500 significant lines; this is 110 over it, 1.22× 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.
ClassTooLong: StripchatLlHlsProxy packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:59— ClassTooLong — 2609 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 2209 over it, 6.52× 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: ChaturbateLlHlsProxy packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:132— ClassTooLong — 1547 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 1147 over it, 3.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.
ClassTooLong: _RoomPreviewPageState apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:129— ClassTooLong — 1159 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods. The bar is 400 significant lines; this is 759 over it, 2.90× 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: ChaturbateLiveDataSource packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:56— ClassTooLong — 964 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 564 over it, 2.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: TwitchAdGuardProxy packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:13— ClassTooLong — 908 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 508 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.
ClassTooLong: MpvPlayer packages/live_player/lib/src/mpv_player.dart:184— ClassTooLong — 884 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 484 over it, 2.21× 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: RoomPageSessionCoordinator apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:52— ClassTooLong — 832 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 432 over it, 2.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MdkPlayer packages/live_player/lib/src/mdk_player.dart:15— ClassTooLong — 760 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 360 over it, 1.90× 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: YouTubePlaybackDataSource packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:15— ClassTooLong — 743 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 343 over it, 1.86× 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: _LibraryPageState apps/main_app/lib/src/features/library/presentation/library_page.dart:36— ClassTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 272 over it, 1.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: _SyncLocalPageState apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:37— ClassTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 272 over it, 1.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: RoomDanmakuController apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart:150— ClassTooLong — 663 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 263 over it, 1.66× 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: _ProviderCategoriesPageState apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:34— ClassTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 262 over it, 1.66× 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: TwitchWebPlaybackBridge packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:10— ClassTooLong — 627 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 227 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: _PlayerSettingsPageState apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:18— ClassTooLong — 548 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 148 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: MainActivity apps/main_app/android/app/src/main/kotlin/app/nolive/mobile/MainActivity.kt:28— ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 143 over it, 1.36× 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: ChaturbateMapper packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:9— ClassTooLong — 541 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 141 over it, 1.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: StripchatMapper packages/live_providers/lib/src/providers/stripchat/stripchat_mapper.dart:6— ClassTooLong — 541 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 141 over it, 1.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: RoomFullscreenSessionController apps/main_app/lib/src/features/room/presentation/room_fullscreen_session_controller.dart:81— ClassTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 126 over it, 1.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: RoomPlaybackController apps/main_app/lib/src/features/room/application/room_playback_controller.dart:77— ClassTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 126 over it, 1.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: BilibiliLiveDataSource packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:11— ClassTooLong — 525 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 125 over it, 1.31× 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: HttpStripchatApiClient packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:109— ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 91 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: HttpChaturbateApiClient packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:85— ClassTooLong — 479 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 79 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: _AccountSettingsPageState apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:24— ClassTooLong — 478 significant lines (blank, comment-only and punctuation-only lines excluded), 16 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: StripchatDanmakuSession packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:13— ClassTooLong — 460 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 60 over it, 1.15× 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.
Swallowed exception (empty catch) packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:298— 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/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:301— 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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:274— 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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:277— 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/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:209— 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/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:212— 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/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:170— 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/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:173— 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/live_providers/lib/src/danmaku/huya_danmaku_session.dart:150— 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/live_providers/lib/src/danmaku/huya_danmaku_session.dart:153— 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/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:545— 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/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:655— 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/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:151— 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/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:154— 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/live_player/lib/src/mpv_player.dart:453— 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/live_player/lib/src/mpv_player.dart:463— 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/live_player/lib/src/mpv_player.dart:469— 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/live_player/lib/src/mpv_player.dart:485— 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/live_player/lib/src/mpv_player.dart:885— 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/live_player/lib/src/mpv_player.dart:888— 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/live_player/lib/src/mpv_property_configurator.dart:137— 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/live_hls_proxy/lib/src/aes_worker.dart:85— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:124— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
Swallowed exception (empty catch) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1325— 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/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1347— 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.
Hotspot: apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:348— apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in RoomPlayerSurfaceSection.build at line 348. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:901— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in StripchatLlHlsProxy._materializePlaylistImpl at line 901. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.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: apps/main_app/lib/src/features/room/presentation/room_preview_page.dart apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:1337— apps/main_app/lib/src/features/room/presentation/room_preview_page.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in _RoomPreviewPageState.build at line 1337. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/room/presentation/room_preview_page.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: apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:32— apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in FollowWatchRow.build 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.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/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:579— packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in TwitchAdGuardProxy._selectPlayablePlaylist at line 579. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.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: apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:640— apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in _SyncLocalPageState.build at line 640. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/sync/presentation/sync_local_page.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: apps/main_app/lib/src/features/room/application/room_playback_controller.dart apps/main_app/lib/src/features/room/application/room_playback_controller.dart:228— apps/main_app/lib/src/features/room/application/room_playback_controller.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in RoomPlaybackController._flushPendingPlaybackBootstrap at line 228. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/room/application/room_playback_controller.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: apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:145— apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in RoomTwitchRecoveryController.scheduleRecovery at line 145. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.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: apps/main_app/lib/src/features/room/application/room_player_runtime_observer.dart apps/main_app/lib/src/features/room/application/room_player_runtime_observer.dart:273— apps/main_app/lib/src/features/room/application/room_player_runtime_observer.dart changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in RoomPlayerRuntimeObserver._handlePlayerDiagnostics at line 273. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/room/application/room_player_runtime_observer.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: apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:429— apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in _PlayerSettingsPageState._buildAdvancedOptions at line 429. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/settings/presentation/player_settings_page.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: apps/main_app/lib/src/features/library/application/load_follow_watchlist_use_case.dart apps/main_app/lib/src/features/library/application/load_follow_watchlist_use_case.dart:67— apps/main_app/lib/src/features/library/application/load_follow_watchlist_use_case.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in LoadFollowWatchlistUseCase.call at line 67. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/library/application/load_follow_watchlist_use_case.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/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:724— packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ChaturbateLiveDataSource._loadDiscoverRoomsBounded at line 724. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.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/live_player/lib/src/mdk_player.dart packages/live_player/lib/src/mdk_player.dart:119— packages/live_player/lib/src/mdk_player.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in MdkPlayer.setSource at line 119. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_player/lib/src/mdk_player.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: apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart:289— apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in RoomDanmakuController.bindSession at line 289. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/room/application/room_danmaku_controller.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: apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:64— apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in LoadProviderAccountSettingsUseCase.call at line 64. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.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: apps/main_app/lib/src/shared/application/secure_credential_store.dart apps/main_app/lib/src/shared/application/secure_credential_store.dart:695— apps/main_app/lib/src/shared/application/secure_credential_store.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in LazySecureCredentialStore._promoteResolvedStore at line 695. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/shared/application/secure_credential_store.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/live_providers/lib/src/providers/huya/huya_mapper.dart packages/live_providers/lib/src/providers/huya/huya_mapper.dart:51— packages/live_providers/lib/src/providers/huya/huya_mapper.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in HuyaMapper.mapRoomDetail at line 51. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_providers/lib/src/providers/huya/huya_mapper.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/live_sync/lib/src/local_sync/local_sync_server.dart packages/live_sync/lib/src/local_sync/local_sync_server.dart:169— packages/live_sync/lib/src/local_sync/local_sync_server.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in HttpLocalSyncServer._handleRequest at line 169. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_sync/lib/src/local_sync/local_sync_server.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/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart:118— packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in RepositorySyncSnapshotService.importCategory at line 118. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.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/live_player/lib/src/playback_failover_policy.dart packages/live_player/lib/src/playback_failover_policy.dart:36— packages/live_player/lib/src/playback_failover_policy.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in PlaybackFailoverPolicy.isHardOpenFailure at line 36. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_player/lib/src/playback_failover_policy.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: apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:340— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in _FollowSettingsPageState.build at line 340. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/settings/presentation/follow_settings_page.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: apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart:184— apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in RoomPictureInPictureCoordinator._handleLifecycleState at line 184. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.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/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:191— packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in TarsInputStream.skipFieldWithType at line 191. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.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: apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:197— apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in _SyncWebDavPageState.build at line 197. 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-05-02..2026-07-31, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-02 16:53:00 +08:00' --until='2026-07-31 16:53:00 +08:00' --full-history --no-merges -- apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.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.
Low cohesion: DefaultRoomAndroidPlaybackBridgeFacade (LCOM4 10) apps/main_app/lib/src/app/platform/room_fullscreen_session_platform_adapters.dart:10— DefaultRoomAndroidPlaybackBridgeFacade's methods fall into 10 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 10 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: MigrationPlaceholderProvider (LCOM4 8) packages/live_providers/lib/src/providers/migration_placeholder_provider.dart:3— MigrationPlaceholderProvider's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: WindowManagerRoomDesktopWindowFacade (LCOM4 7) apps/main_app/lib/src/app/platform/room_fullscreen_session_platform_adapters.dart:177— WindowManagerRoomDesktopWindowFacade's methods fall into 7 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 7 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: MpvPlayer (LCOM4 7) packages/live_player/lib/src/mpv_player.dart:184— MpvPlayer's methods fall into 7 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 7 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: HlsProxyPlatformAdapterImpl (LCOM4 6) apps/main_app/lib/src/app/runtime_bridges/hls_proxy_platform_adapter_impl.dart:15— HlsProxyPlatformAdapterImpl's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MemoryPlayer (LCOM4 6) packages/live_player/lib/src/memory_player.dart:11— MemoryPlayer's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: _RoomPreviewPageState (LCOM4 5) apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:129— _RoomPreviewPageState's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SimulatedBackendPlayer (LCOM4 5) packages/live_player/lib/src/simulated_backend_player.dart:11— SimulatedBackendPlayer's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: _ProviderDiscoveryTabState (LCOM4 4) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:178— _ProviderDiscoveryTabState's methods fall into 4 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 4 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: RoomControlsUtilityActions (LCOM4 4) apps/main_app/lib/src/features/room/application/room_controls_utility_actions.dart:33— RoomControlsUtilityActions's methods fall into 4 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 4 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: _RoomDanmakuOverlayState (LCOM4 4) apps/main_app/lib/src/features/room/presentation/room_preview_page_danmaku.dart:27— _RoomDanmakuOverlayState's methods fall into 4 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 4 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: _StripchatLlHlsSession (LCOM4 4) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3673— _StripchatLlHlsSession's methods fall into 4 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 4 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: MdkPlayer (LCOM4 4) packages/live_player/lib/src/mdk_player.dart:15— MdkPlayer's methods fall into 4 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 4 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: BilibiliProvider (LCOM4 4) packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:14— BilibiliProvider's methods fall into 4 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 4 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: ChaturbateProvider (LCOM4 4) packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.dart:13— ChaturbateProvider's methods fall into 4 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 4 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: DouyinProvider (LCOM4 4) packages/live_providers/lib/src/providers/douyin/douyin_provider.dart:12— DouyinProvider's methods fall into 4 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 4 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: DouyuProvider (LCOM4 4) packages/live_providers/lib/src/providers/douyu/douyu_provider.dart:12— DouyuProvider's methods fall into 4 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 4 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: HuyaProvider (LCOM4 4) packages/live_providers/lib/src/providers/huya/huya_provider.dart:12— HuyaProvider's methods fall into 4 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 4 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: StripchatProvider (LCOM4 4) packages/live_providers/lib/src/providers/stripchat/stripchat_provider.dart:12— StripchatProvider's methods fall into 4 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 4 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: TwitchProvider (LCOM4 4) packages/live_providers/lib/src/providers/twitch/twitch_provider.dart:13— TwitchProvider's methods fall into 4 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 4 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: YouTubeBrowseDataSource (LCOM4 4) packages/live_providers/lib/src/providers/youtube/youtube_browse_data_source.dart:13— YouTubeBrowseDataSource's methods fall into 4 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 4 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: YouTubePlaybackDataSource (LCOM4 4) packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:15— YouTubePlaybackDataSource's methods fall into 4 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 4 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: YouTubeProvider (LCOM4 4) packages/live_providers/lib/src/providers/youtube/youtube_provider.dart:16— YouTubeProvider's methods fall into 4 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 4 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: WebviewImpl (LCOM4 4) third_party/desktop_webview_window/lib/src/webview_impl.dart:11— WebviewImpl's methods fall into 4 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 4 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.
TooManyMethods: ChaturbateLlHlsProxy packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:132— TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StripchatLlHlsProxy packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:59— TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: _RoomPreviewPageState apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:129— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RoomFullscreenSessionController apps/main_app/lib/src/features/room/presentation/room_fullscreen_session_controller.dart:81— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChaturbateLiveDataSource packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:56— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RoomPageSessionCoordinator apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:52— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RoomDanmakuController apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart:150— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× 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: MpvPlayer packages/live_player/lib/src/mpv_player.dart:184— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MainActivity apps/main_app/android/app/src/main/kotlin/app/nolive/mobile/MainActivity.kt:28— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.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: MdkPlayer packages/live_player/lib/src/mdk_player.dart:15— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 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.
TooManyMethods: YouTubePageParser packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:66— 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: TwitchAdGuardProxy packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:13— 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: YouTubePlaybackDataSource packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:15— 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: RoomPlaybackController apps/main_app/lib/src/features/room/application/room_playback_controller.dart:77— 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: ChaturbateMapper packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.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: HttpStripchatApiClient packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:109— 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: PlayerRuntimeController apps/main_app/lib/src/shared/application/player_runtime_controller.dart:7— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HttpChaturbateApiClient packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:85— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (9 lines × 2) apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:182— apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:182-190 | apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:244-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 `apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:182` 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, `apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:253` calls `isEnabled` and `apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:191` 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) apps/main_app/lib/src/features/sync/application/manage_local_sync_use_case.dart:134— apps/main_app/lib/src/features/sync/application/manage_local_sync_use_case.dart:134-142 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:396-404 — 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 `apps/main_app/lib/src/features/sync/application/manage_local_sync_use_case.dart:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2358— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2358-2366 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1528-1536 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2358` it does not close everything it opens, so those exact lines 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/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:408— packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:408-416 | packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:490-498 — 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/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:408` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/youtube/youtube_browse_data_source.dart:370— packages/live_providers/lib/src/providers/youtube/youtube_browse_data_source.dart:370-378 | packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:240-248 — 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/live_sync/lib/src/local_sync/local_sync_client.dart:92— packages/live_sync/lib/src/local_sync/local_sync_client.dart:92-100 | packages/live_sync/lib/src/local_sync/local_sync_client.dart:127-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/live_sync/lib/src/local_sync/local_sync_client.dart:92` it does not close everything it opens, so those exact lines 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) apps/main_app/lib/src/features/parse/application/parse_room_input_use_case.dart:247— apps/main_app/lib/src/features/parse/application/parse_room_input_use_case.dart:247-255 | packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:669-677 — 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 (9 lines × 2) apps/main_app/lib/src/features/settings/application/credential_migration_bundle.dart:188— apps/main_app/lib/src/features/settings/application/credential_migration_bundle.dart:188-196 | packages/live_storage/lib/src/persistence/local_storage_file_store.dart:755-763 — 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 (9 lines × 2) packages/live_player/lib/src/memory_player.dart:138— packages/live_player/lib/src/memory_player.dart:138-146 | packages/live_player/lib/src/simulated_backend_player.dart:152-160 — before extracting anything, compare `packages/live_player/lib/src/memory_player.dart` and `packages/live_player/lib/src/simulated_backend_player.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:495— packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:495-503 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:500-508 — 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/live_providers/lib/src/providers/bilibili/bilibili_mapper.dart:278— packages/live_providers/lib/src/providers/bilibili/bilibili_mapper.dart:278-286 | packages/live_providers/lib/src/providers/douyu/douyu_mapper.dart:390-398 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `String?` in one and `String` 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/live_storage/lib/src/persistence/local_storage_file_store.dart:765— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:765-773 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:234-242 — before extracting anything, compare `packages/live_storage/lib/src/persistence/local_storage_file_store.dart` and `packages/live_sync/lib/src/model/sync_snapshot_codec.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:46— packages/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:46-54 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:483-491 — 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/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:387— packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:387-395 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:447-455 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `values` to `List<String>` in one and `Iterable<String>` 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/live_providers/lib/src/providers/twitch/twitch_api_client.dart:198— packages/live_providers/lib/src/providers/twitch/twitch_api_client.dart:198-206 | packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:713-721 — 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.
Swallowed exception (caught, then discarded) packages/live_storage/lib/src/persistence/local_storage_file_store.dart:243— `on Object` 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/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:236— `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.
Swallowed exception (caught, then discarded) packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:476— `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/live_providers/lib/src/providers/chaturbate/chaturbate_room_page_parser.dart:105— `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/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:635— `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/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:322— `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/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:614— `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/live_player/lib/src/mpv_android_surface_manager.dart:1054— `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/live_player/lib/src/mpv_android_surface_manager.dart:1076— `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/live_player/lib/src/mpv_android_surface_manager.dart:1229— `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/live_player/lib/src/mpv_hls_manifest_service.dart:299— `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/live_player/lib/src/mpv_hls_manifest_service.dart:475— `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/live_player/lib/src/mpv_player.dart:595— `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/live_player/lib/src/mpv_player_runtime_bindings.dart:27— `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/live_hls_proxy/lib/src/aes_worker.dart:363— `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.
Duplicated block (12 lines × 2) apps/main_app/lib/src/app/runtime_bridges/youtube_nsig_webview_solver.dart:216— apps/main_app/lib/src/app/runtime_bridges/youtube_nsig_webview_solver.dart:216-227 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:561-572 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `error` to `PlatformException` in one and `Object` 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) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:196— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:196-207 | apps/main_app/lib/src/features/browse/presentation/browse_page.dart:349-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:615— apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:615-626 | apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:97-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:615` it does not close everything it opens, so those exact lines 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) apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:171— apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:171-182 | apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:544-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/settings/presentation/player_settings_page.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.
Duplicated block (12 lines × 2) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2100— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2100-2111 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2158-2169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2100` it begins part-way through the construct above it, so those exact lines 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/live_player/lib/src/memory_player.dart:86— packages/live_player/lib/src/memory_player.dart:86-97 | packages/live_player/lib/src/simulated_backend_player.dart:103-114 — before extracting anything, compare `packages/live_player/lib/src/memory_player.dart` and `packages/live_player/lib/src/simulated_backend_player.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/live_player/lib/src/memory_player.dart:86` 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/live_player/lib/src/simulated_backend_player.dart:98` calls `_emit`, `copyWith`, `delayed` and `packages/live_player/lib/src/memory_player.dart:82` 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/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:106— packages/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:106-118 | packages/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:179-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/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:106` 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/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:47— packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:47-58 | packages/live_providers/lib/src/providers/youtube/youtube_hls_master_playlist_parser.dart:72-83 — `packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_hls_master_playlist_parser.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 44 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/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:47` 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/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:90— packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:90-101 | packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:83-94 — `packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart` and `packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.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 5 separate duplicated blocks between them, totalling at least 54 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/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.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. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/douyin/douyin_mapper.dart:60— packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:60-71 | packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:132-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/providers/douyin/douyin_mapper.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. The matched lines also transfer control out of the body holding them, which cannot 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/live_storage/lib/src/persistence/local_storage_file_store.dart:620— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:620-631 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:44-55 — before extracting anything, compare `packages/live_storage/lib/src/persistence/local_storage_file_store.dart` and `packages/live_sync/lib/src/model/sync_snapshot_codec.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/live_storage/lib/src/persistence/local_storage_file_store.dart:620` 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/live_storage/lib/src/persistence/local_storage_file_store.dart:775— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:775-786 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:244-255 — before extracting anything, compare `packages/live_storage/lib/src/persistence/local_storage_file_store.dart` and `packages/live_sync/lib/src/model/sync_snapshot_codec.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) packages/live_sync/lib/src/local_sync/local_discovery_service.dart:161— packages/live_sync/lib/src/local_sync/local_discovery_service.dart:161-172 | packages/live_sync/lib/src/local_sync/local_discovery_service.dart:253-264 — both copies are in the same file, so extract the 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/live_sync/lib/src/local_sync/local_sync_server.dart:210— packages/live_sync/lib/src/local_sync/local_sync_server.dart:210-221 | packages/live_sync/lib/src/local_sync/local_sync_server.dart:240-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/live_sync/lib/src/local_sync/local_sync_server.dart:210` it begins part-way through the construct above it, so those exact lines 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) apps/main_app/lib/src/features/home/presentation/home_page.dart:533— apps/main_app/lib/src/features/home/presentation/home_page.dart:533-545 | apps/main_app/lib/src/features/home/presentation/home_page.dart:563-575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/home/presentation/home_page.dart:533` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:161— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:161-173 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:133-145 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart` as WHOLE FILES: this scan already matched 6 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 `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:391— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:391-403 | apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:126-138 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) apps/main_app/lib/src/shared/presentation/theme/nolive_tokens.dart:33— apps/main_app/lib/src/shared/presentation/theme/nolive_tokens.dart:33-45 | apps/main_app/lib/src/shared/presentation/theme/nolive_tokens.dart:48-60 — both copies are in the same file, so extract the 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 (13 lines × 2) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:206— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:206-218 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:196-208 — `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart` and `packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.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 60 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:206` it does not close everything it opens, so those exact lines 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/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:170— packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:170-182 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:111-123 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart` as WHOLE FILES: this scan already matched 8 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.
Duplicated block (13 lines × 2) packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:318— packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:318-330 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:339-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:318` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:352` calls `_readText` and `packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:331` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:229— packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:229-241 | packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:282-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:229` it begins part-way through the construct above it, so those exact lines 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/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:203— packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:203-215 | packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:198-210 — `packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.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 43 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/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:198` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:196` calls `PagedResponse` and `packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:202` 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/live_storage/lib/src/persistence/local_storage_file_store.dart:643— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:643-655 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:67-79 — before extracting anything, compare `packages/live_storage/lib/src/persistence/local_storage_file_store.dart` and `packages/live_sync/lib/src/model/sync_snapshot_codec.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/live_storage/lib/src/persistence/local_storage_file_store.dart:643` 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:754— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:754-767 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2334-2346 — `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart` and `packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.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 60 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 first that the copies are not typed on the same thing: the declarations holding them bind `session` to `_ChaturbateLlHlsSession` in one and `_StripchatLlHlsSession` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) packages/live_providers/lib/src/providers/twitch/twitch_graphql_client.dart:392— packages/live_providers/lib/src/providers/twitch/twitch_graphql_client.dart:392-404 | packages/live_providers/lib/src/providers/twitch/twitch_playback_surface_manager.dart:427-439 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:87— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:87-96 | apps/main_app/lib/src/features/home/presentation/home_page.dart:89-98 — before extracting anything, compare `apps/main_app/lib/src/features/browse/presentation/browse_page.dart` and `apps/main_app/lib/src/features/home/presentation/home_page.dart` as WHOLE FILES: this scan already matched 5 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. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/browse/presentation/browse_page.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `const Key('browse-appbar-search-button')` in one and `const Key('home-appbar-search-button')` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:191— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:191-200 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:213-222 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart` as WHOLE FILES: this scan already matched 6 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.
Duplicated block (10 lines × 2) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:473— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:473-482 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:528-537 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:653— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:653-662 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1110-1119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:653` it begins part-way through the construct above it, so those exact lines 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2980— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2980-2989 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3067-3076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2980` it begins part-way through the construct above it, so those exact lines 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/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:127— packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:127-136 | packages/live_providers/lib/src/providers/huya/huya_transport.dart:71-80 — 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/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:127` it does not close everything it opens, so those exact lines 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/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:161— packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:161-170 | packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:109-118 — `packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart` and `packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.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 5 separate duplicated blocks between them, totalling at least 54 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/live_providers/lib/src/providers/douyin/douyin_mapper.dart:73— packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:73-82 | packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:145-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/live_providers/lib/src/providers/douyin/douyin_mapper.dart:73` it does not close everything it opens, so those exact lines 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/live_providers/lib/src/providers/huya/huya_live_data_source.dart:190— packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:190-199 | packages/live_providers/lib/src/providers/huya/huya_mapper.dart:40-49 — 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/live_providers/lib/src/providers/huya/huya_live_data_source.dart:190` 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/live_providers/lib/src/providers/huya/huya_mapper.dart:104— packages/live_providers/lib/src/providers/huya/huya_mapper.dart:104-113 | packages/live_providers/lib/src/providers/huya/huya_mapper.dart:114-123 — both copies are in the same file, so extract the 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/live_player/lib/src/memory_player.dart:104— packages/live_player/lib/src/memory_player.dart:104-113 | packages/live_player/lib/src/simulated_backend_player.dart:121-130 — before extracting anything, compare `packages/live_player/lib/src/memory_player.dart` and `packages/live_player/lib/src/simulated_backend_player.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) packages/live_player/lib/src/memory_player.dart:127— packages/live_player/lib/src/memory_player.dart:127-136 | packages/live_player/lib/src/simulated_backend_player.dart:141-150 — before extracting anything, compare `packages/live_player/lib/src/memory_player.dart` and `packages/live_player/lib/src/simulated_backend_player.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×11
Edited copy of a member (12 corresponding lines) packages/live_sync/lib/src/local_sync/local_sync_client.dart:69— packages/live_sync/lib/src/local_sync/local_sync_client.dart:69-84 | packages/live_sync/lib/src/local_sync/local_sync_client.dart:107-118 — 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/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:136— packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:136-147 | packages/live_providers/lib/src/providers/stripchat/stripchat_preview_data_source.dart:141-156 — 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/live_hls_proxy/lib/src/aes_worker.dart:103— packages/live_hls_proxy/lib/src/aes_worker.dart:103-114 | packages/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:162-180 — 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) apps/main_app/lib/src/features/category/application/load_category_rooms_use_case.dart:9— apps/main_app/lib/src/features/category/application/load_category_rooms_use_case.dart:9-20 | apps/main_app/lib/src/features/search/application/search_provider_rooms_use_case.dart:9-20 — 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/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:985— packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:985-997 | packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:999-1010 — 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/live_storage/lib/src/repositories/file/file_follow_repository.dart:48— packages/live_storage/lib/src/repositories/file/file_follow_repository.dart:48-62 | packages/live_storage/lib/src/repositories/in_memory/in_memory_follow_repository.dart:37-48 — 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) apps/main_app/lib/src/features/room/application/load_room_use_case.dart:328— apps/main_app/lib/src/features/room/application/load_room_use_case.dart:328-339 | packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:572-583 — 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/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:673— packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:673-686 | packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:693-704 — 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/live_providers/lib/src/providers/douyin/douyin_transport.dart:20— packages/live_providers/lib/src/providers/douyin/douyin_transport.dart:20-31 | packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:35-48 — 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/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:225— packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:225-239 | packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:229-240 — 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/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:75— packages/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:75-86 | packages/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:180-191 — 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.
Duplicated block (14 lines × 2) apps/main_app/lib/src/features/room/application/room_controls_playback_actions.dart:29— apps/main_app/lib/src/features/room/application/room_controls_playback_actions.dart:29-42 | apps/main_app/lib/src/features/room/application/room_controls_playback_actions.dart:82-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/room/application/room_controls_playback_actions.dart:29` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:1549— apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:1549-1562 | apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:1564-1577 — both copies are in the same file, so extract the 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) apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:167— apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:167-180 | apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:229-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:609— apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:609-622 | apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:647-660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:609` it begins part-way through the construct above it, so those exact lines 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) apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:162— apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:162-175 | apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:234-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:249` calls `SizedBox` and `apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:176` 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/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:332— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:332-345 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:765-778 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:332` it begins part-way through the construct above it, so those exact lines 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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:518— packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:518-531 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:182-195 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:518` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:50— packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:50-63 | packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:73-86 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/providers/huya/huya_live_data_source.dart:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) packages/live_sync/lib/src/runtime/sync_snapshot_merger.dart:58— packages/live_sync/lib/src/runtime/sync_snapshot_merger.dart:58-71 | packages/live_sync/lib/src/runtime/sync_snapshot_merger.dart:75-88 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_sync/lib/src/runtime/sync_snapshot_merger.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.
Duplicated block (14 lines × 2) packages/live_storage/lib/src/persistence/local_storage_file_store.dart:727— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:727-740 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:202-215 — before extracting anything, compare `packages/live_storage/lib/src/persistence/local_storage_file_store.dart` and `packages/live_sync/lib/src/model/sync_snapshot_codec.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/live_storage/lib/src/persistence/local_storage_file_store.dart:727` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:264— apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:264-274 | apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:702-712 — 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 `apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:744— apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:744-754 | apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:769-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. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:744` 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) apps/main_app/lib/src/features/settings/presentation/appearance_settings_page.dart:17— apps/main_app/lib/src/features/settings/presentation/appearance_settings_page.dart:17-27 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:522-532 — 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 `apps/main_app/lib/src/features/settings/presentation/appearance_settings_page.dart:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) apps/main_app/lib/src/shared/application/app_log.dart:174— apps/main_app/lib/src/shared/application/app_log.dart:174-185 | apps/main_app/lib/src/shared/application/app_log.dart:354-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/shared/application/app_log.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. 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/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:235— packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:235-245 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:264-274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:235` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:276— packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:276-286 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:297-307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:276` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:246— packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:246-256 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:780-790 — 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/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:246` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/douyu/douyu_mapper.dart:197— packages/live_providers/lib/src/providers/douyu/douyu_mapper.dart:197-207 | packages/live_providers/lib/src/providers/douyu/douyu_mapper.dart:360-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/providers/douyu/douyu_mapper.dart:197` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/douyu/douyu_transport.dart:54— packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:54-64 | packages/live_providers/lib/src/providers/huya/huya_transport.dart:25-35 — `packages/live_providers/lib/src/providers/douyu/douyu_transport.dart` and `packages/live_providers/lib/src/providers/huya/huya_transport.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 30 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/live_providers/lib/src/providers/douyu/douyu_transport.dart:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:419— packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:419-429 | packages/live_providers/lib/src/providers/youtube/youtube_playback_extractor.dart:87-97 — 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/live_providers/lib/src/providers/youtube/youtube_api_client.dart:419` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×8
Edited copy of a member (9 corresponding lines) packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:290— packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:290-298 | packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:535-543 — 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/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:194— packages/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:194-202 | packages/live_providers/lib/src/providers/provider_json.dart:2-10 — 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/live_player/lib/src/simulated_backend_player.dart:56— packages/live_player/lib/src/simulated_backend_player.dart:56-65 | packages/live_player/lib/src/memory_player.dart:50-58 — 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/live_providers/lib/src/providers/douyu/douyu_mapper.dart:400— packages/live_providers/lib/src/providers/douyu/douyu_mapper.dart:400-409 | packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:378-386 — 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2149— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2149-2157 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3574-3582 — 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) apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:741— apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:741-749 | apps/main_app/lib/src/features/settings/presentation/room_settings_page.dart:262-270 — 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:240— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:240-248 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:227-235 — 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) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:240— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:240-248 | apps/main_app/lib/src/features/library/presentation/watch_history_page.dart:118-126 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (8 lines × 2) packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:409— packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:409-416 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:422-429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/twitch/twitch_graphql_client.dart:383— packages/live_providers/lib/src/providers/twitch/twitch_graphql_client.dart:383-390 | packages/live_providers/lib/src/providers/twitch/twitch_playback_surface_manager.dart:418-425 — 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/live_providers/lib/src/providers/youtube/youtube_mapper.dart:291— packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:291-298 | packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:536-543 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) packages/live_sync/lib/src/backup/webdav_backup_service.dart:201— packages/live_sync/lib/src/backup/webdav_backup_service.dart:201-208 | packages/live_sync/lib/src/backup/webdav_backup_service.dart:225-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_sync/lib/src/backup/webdav_backup_service.dart:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) packages/live_sync/lib/src/local_sync/local_sync_client.dart:71— packages/live_sync/lib/src/local_sync/local_sync_client.dart:71-78 | packages/live_sync/lib/src/local_sync/local_sync_client.dart:109-116 — both copies are in the same file, so extract the 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/live_sync/lib/src/runtime/sync_snapshot_merger.dart:99— packages/live_sync/lib/src/runtime/sync_snapshot_merger.dart:99-106 | packages/live_sync/lib/src/runtime/sync_snapshot_merger.dart:109-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_sync/lib/src/runtime/sync_snapshot_merger.dart:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:418— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:418-425 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:380-387 — `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart` and `packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.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 60 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 (8 lines × 2) packages/live_storage/lib/src/repositories/in_memory/in_memory_follow_repository.dart:28— packages/live_storage/lib/src/repositories/in_memory/in_memory_follow_repository.dart:28-35 | packages/live_storage/lib/src/repositories/in_memory/in_memory_history_repository.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.
Duplicated block (7 lines × 2) apps/main_app/lib/src/app/runtime_bridges/linux_desktop_webview_adapter.dart:457— apps/main_app/lib/src/app/runtime_bridges/linux_desktop_webview_adapter.dart:457-463 | apps/main_app/lib/src/features/settings/presentation/linux_desktop_web_login_page.dart:118-124 — 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 `apps/main_app/lib/src/app/runtime_bridges/linux_desktop_webview_adapter.dart:457` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/twitch/twitch_mapper.dart:12— packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:12-18 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:43-49 — both copies are in the same file, so extract the 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/live_providers/lib/src/providers/youtube/youtube_api_client.dart:404— packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:404-410 | packages/live_providers/lib/src/providers/youtube/youtube_playback_extractor.dart:70-76 — 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/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:508— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:508-514 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:520-526 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:506— packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:506-512 | packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:202-208 — 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/live_providers/lib/src/providers/twitch/twitch_live_data_source.dart:276— packages/live_providers/lib/src/providers/twitch/twitch_live_data_source.dart:276-282 | packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:242-248 — 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/live_providers/lib/src/providers/twitch/twitch_mapper.dart:371— packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:371-377 | packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:310-316 — `packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_mapper.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 5 separate duplicated blocks between them, totalling at least 53 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 (7 lines × 2) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:456— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:456-462 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:192-198 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
Weak hash algorithm apps/main_app/lib/src/app/platform/douyin_danmaku_signature_service.dart:54— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm apps/main_app/lib/src/shared/presentation/widgets/persisted_network_image.dart:267— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3854— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/live_providers/lib/src/providers/bilibili/bilibili_sign_service.dart:157— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:253— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/live_providers/lib/src/providers/douyu/douyu_sign_service.dart:255— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:69— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm packages/live_providers/lib/src/providers/huya/huya_sign_service.dart:84— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×7
Edited copy of a member (14 corresponding lines) packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:528— packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:528-541 | packages/live_providers/lib/src/providers/bilibili/bilibili_mapper.dart:28-48 — 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/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:363— packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:363-376 | packages/live_providers/lib/src/providers/douyu/douyu_mapper.dart:33-51 — 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) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:194— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:194-207 | apps/main_app/lib/src/features/browse/presentation/browse_page.dart:347-360 — 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/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:441— packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:441-455 | packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:549-562 — 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) apps/main_app/lib/src/features/room/application/room_page_interaction_coordinator.dart:338— apps/main_app/lib/src/features/room/application/room_page_interaction_coordinator.dart:338-356 | apps/main_app/lib/src/features/room/application/room_page_interaction_coordinator.dart:358-371 — 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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:234— packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:234-248 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:112-125 — 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/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:359— packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:359-375 | packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:385-398 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×6
Edited copy of a member (19 corresponding lines) packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:134— packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:134-155 | packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:157-175 — 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/live_storage/lib/src/repositories/file/file_tag_repository.dart:46— packages/live_storage/lib/src/repositories/file/file_tag_repository.dart:46-66 | packages/live_storage/lib/src/repositories/in_memory/in_memory_tag_repository.dart:34-52 — 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/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:241— packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:241-259 | packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:261-285 — 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/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:330— packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:330-353 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1092-1110 — 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) apps/main_app/lib/src/features/sync/application/sync_preferences_use_case.dart:48— apps/main_app/lib/src/features/sync/application/sync_preferences_use_case.dart:48-68 | packages/live_sync/lib/src/model/discovered_peer.dart:20-38 — 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) apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:347— apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:347-365 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:134-152 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×6
Edited copy of a member (11 corresponding lines) packages/live_storage/lib/src/persistence/local_storage_file_store.dart:742— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:742-753 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:217-227 — 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/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:528— packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:528-538 | packages/live_providers/lib/src/providers/youtube/youtube_playback_extractor.dart:322-332 — 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/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:433— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:433-443 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:815-825 — 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/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:142— packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:142-154 | packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:175-185 — 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2319— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2319-2332 | packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:742-752 — 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) apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart:371— apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart:371-381 | apps/main_app/lib/src/shared/application/player_runtime_controller.dart:213-225 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) apps/main_app/lib/src/app/app.dart:28— apps/main_app/lib/src/app/app.dart:28-44 | apps/main_app/lib/src/app/bootstrap/bootstrap_host_app.dart:120-136 — 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 `apps/main_app/lib/src/app/app.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.
Duplicated block (17 lines × 2) apps/main_app/lib/src/features/room/presentation/room_preview_page_controls.dart:150— apps/main_app/lib/src/features/room/presentation/room_preview_page_controls.dart:150-166 | apps/main_app/lib/src/features/room/presentation/room_preview_page_controls.dart:200-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/room/presentation/room_preview_page_controls.dart:150` it begins part-way through the construct above it, so those exact lines 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) apps/main_app/lib/src/features/settings/presentation/danmaku_settings_page.dart:263— apps/main_app/lib/src/features/settings/presentation/danmaku_settings_page.dart:263-279 | apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:317-333 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/settings/presentation/danmaku_settings_page.dart:263` it begins part-way through the construct above it, so those 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 × 2) apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:650— apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:650-666 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:207-223 — before extracting anything, compare `apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart` and `apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:650` it begins part-way through the construct above it, so those exact lines 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/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:309— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:309-325 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:652-668 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:309` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:271— packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:271-287 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:189-205 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart` as WHOLE FILES: this scan already matched 8 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/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:271` it does not close everything it opens, so those exact lines 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) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:194— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:194-202 | apps/main_app/lib/src/features/browse/presentation/browse_page.dart:347-355 | apps/main_app/lib/src/features/home/presentation/home_page.dart:234-242 — before extracting anything, compare `apps/main_app/lib/src/features/browse/presentation/browse_page.dart` and `apps/main_app/lib/src/features/home/presentation/home_page.dart` as WHOLE FILES: this scan already matched 5 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. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/browse/presentation/browse_page.dart:194` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:379— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:379-387 | apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:121-129 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:345-353 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:379` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:116— packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:116-124 | packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:86-94 | packages/live_providers/lib/src/providers/huya/huya_transport.dart:60-68 — `packages/live_providers/lib/src/providers/douyu/douyu_transport.dart` and `packages/live_providers/lib/src/providers/huya/huya_transport.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 30 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/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:116` it does not close everything it opens, so those exact lines 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/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:432— packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:432-440 | packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:465-473 | packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:475-483 — 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/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:432` it begins part-way through the construct above it, so those exact lines 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/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:688— packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:688-696 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:357-365 | packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:300-308 — `packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_mapper.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 5 separate duplicated blocks between them, totalling at least 53 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:367` calls `_asInt`, `asInt` and `packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:310` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:71— apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:71-79 | apps/main_app/lib/src/features/home/presentation/home_page.dart:294-302 | apps/main_app/lib/src/features/search/presentation/search_page.dart:286-294 — before extracting anything, compare `apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart` and `apps/main_app/lib/src/features/home/presentation/home_page.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 copy of a member (23 corresponding lines) · ×5
Edited copy of a member (23 corresponding lines) packages/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:88— packages/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:88-111 | packages/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:141-163 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) packages/live_player/lib/src/mpv_player.dart:1204— packages/live_player/lib/src/mpv_player.dart:1204-1227 | packages/live_player/lib/src/mpv_player.dart:1229-1251 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:473— packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:473-502 | packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:504-526 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:632— packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:632-654 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:656-681 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) apps/main_app/lib/src/app/runtime_bridges/linux_desktop_webview_adapter.dart:286— apps/main_app/lib/src/app/runtime_bridges/linux_desktop_webview_adapter.dart:286-308 | apps/main_app/lib/src/app/runtime_bridges/linux_desktop_webview_adapter.dart:500-523 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×5
Edited copy of a member (17 corresponding lines) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:329— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:329-345 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:762-778 — 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/live_providers/lib/src/providers/bilibili/bilibili_mapper.dart:10— packages/live_providers/lib/src/providers/bilibili/bilibili_mapper.dart:10-26 | packages/live_providers/lib/src/providers/stripchat/stripchat_mapper.dart:274-292 — 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/live_storage/lib/src/persistence/local_storage_file_store.dart:660— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:660-676 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:83-104 — 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/live_providers/lib/src/providers/twitch/twitch_api_client.dart:179— packages/live_providers/lib/src/providers/twitch/twitch_api_client.dart:179-196 | packages/live_providers/lib/src/providers/twitch/twitch_graphql_client.dart:327-343 — 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) apps/main_app/lib/src/features/room/application/room_controls_action_coordinator.dart:76— apps/main_app/lib/src/features/room/application/room_controls_action_coordinator.dart:76-92 | apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:560-576 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×5
Edited copy of a member (13 corresponding lines) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2358— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2358-2373 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1528-1540 — 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3539— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3539-3557 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1133-1145 — 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:133— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:133-145 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:14-33 — 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/live_providers/lib/src/providers/twitch/twitch_playback_manifest.dart:73— packages/live_providers/lib/src/providers/twitch/twitch_playback_manifest.dart:73-85 | packages/live_providers/lib/src/providers/twitch/twitch_playback_manifest.dart:151-163 — 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) apps/main_app/lib/src/features/room/application/room_controls_action_coordinator.dart:62— apps/main_app/lib/src/features/room/application/room_controls_action_coordinator.dart:62-74 | apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:546-558 — 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.
Duplicated block (12 lines × 3) apps/main_app/lib/src/features/room/application/room_controls_settings_return_actions.dart:106— apps/main_app/lib/src/features/room/application/room_controls_settings_return_actions.dart:106-117 | apps/main_app/lib/src/features/room/application/room_session_controller.dart:361-372 | apps/main_app/lib/src/features/room/presentation/room_follow_room_transition_coordinator.dart:195-206 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 3) packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:60— packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:60-71 | packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:44-55 | packages/live_providers/lib/src/providers/youtube/youtube_hls_master_playlist_parser.dart:85-96 — `packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart` and `packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.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 5 separate duplicated blocks between them, totalling at least 54 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/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.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. The matched lines also transfer control out of the body holding them, 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/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:72` calls `tryParse` and `packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:56` 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 × 3) packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:19— packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:19-30 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:51-62 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:84-95 — 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/live_providers/lib/src/providers/twitch/twitch_mapper.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. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:100— packages/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:100-111 | packages/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:207-218 | packages/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:219-230 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:148— packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:148-159 | packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:96-107 | packages/live_providers/lib/src/providers/youtube/youtube_hls_master_playlist_parser.dart:180-191 — `packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart` and `packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.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 5 separate duplicated blocks between them, totalling at least 54 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 (6 lines × 2) packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:312— packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:312-317 | packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:25-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/douyu/douyu_transport.dart:89— packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:89-94 | packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:102-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/live_providers/lib/src/providers/douyu/douyu_transport.dart:89` 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.
Duplicated block (6 lines × 2) packages/live_sync/lib/src/backup/webdav_backup_service.dart:57— packages/live_sync/lib/src/backup/webdav_backup_service.dart:57-62 | packages/live_sync/lib/src/local_sync/local_sync_client.dart:62-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) packages/live_storage/lib/src/repositories/file/file_settings_repository.dart:21— packages/live_storage/lib/src/repositories/file/file_settings_repository.dart:21-26 | packages/live_storage/lib/src/repositories/file/file_tag_repository.dart:39-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:531— packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:531-536 | packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart:366-371 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (5 members, 50+ identical tokens) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:462— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:462-686 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:340-620 | apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:56-191 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:640-967 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:197-367 — 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2109— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2109-2123 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:329-346 | packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:271-288 | packages/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:94-120 | packages/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:201-247 — 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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:118— packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:118-201 | packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:54-168 | packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:65-127 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:48-109 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:53-110 — 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/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:15— packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:15-37 | packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:91-114 | packages/live_providers/lib/src/providers/douyin/douyin_transport.dart:33-55 | packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:22-33 | packages/live_providers/lib/src/providers/huya/huya_transport.dart:15-40 — 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) · ×4
Edited copy of a member (25 corresponding lines) packages/live_providers/lib/src/providers/twitch/twitch_playback_manifest.dart:44— packages/live_providers/lib/src/providers/twitch/twitch_playback_manifest.dart:44-71 | packages/live_providers/lib/src/providers/twitch/twitch_playback_manifest.dart:125-149 — 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/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:132— packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:132-156 | packages/live_providers/lib/src/providers/stripchat/stripchat_provider.dart:127-161 — 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/live_providers/lib/src/providers/douyin/douyin_provider.dart:141— packages/live_providers/lib/src/providers/douyin/douyin_provider.dart:141-167 | packages/live_providers/lib/src/providers/huya/huya_provider.dart:129-153 — 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) apps/main_app/lib/src/app/runtime_bridges/youtube_nsig_webview_solver.dart:276— apps/main_app/lib/src/app/runtime_bridges/youtube_nsig_webview_solver.dart:276-300 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:606-631 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×4
Edited copy of a member (15 corresponding lines) packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:514— packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:514-531 | packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:24-38 — 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/live_player/lib/src/mdk_player.dart:446— packages/live_player/lib/src/mdk_player.dart:446-460 | packages/live_player/lib/src/mpv_player.dart:539-559 — 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/live_sync/lib/src/local_sync/local_discovery_service.dart:160— packages/live_sync/lib/src/local_sync/local_discovery_service.dart:160-174 | packages/live_sync/lib/src/local_sync/local_discovery_service.dart:252-266 — 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/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:129— packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:129-143 | packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:178-195 — 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 (20 corresponding lines) · ×4
Edited copy of a member (20 corresponding lines) packages/live_sync/lib/src/local_sync/local_sync_client.dart:86— packages/live_sync/lib/src/local_sync/local_sync_client.dart:86-105 | packages/live_sync/lib/src/local_sync/local_sync_client.dart:120-140 — 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) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:949— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:949-968 | apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:957-980 — 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) apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:300— apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:300-319 | apps/main_app/lib/src/features/home/presentation/home_page.dart:402-424 — 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/live_providers/lib/src/providers/twitch/twitch_bootstrap_resolver.dart:123— packages/live_providers/lib/src/providers/twitch/twitch_bootstrap_resolver.dart:123-142 | packages/live_providers/lib/src/providers/twitch/twitch_bootstrap_resolver.dart:144-165 — 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.
Duplicated block (20 lines × 2) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:943— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:943-962 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:806-825 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2186— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2186-2205 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:469-488 — 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2079— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2079-2098 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2137-2156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2079` it does not close everything it opens, so those exact lines 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/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:46— packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:46-65 | packages/live_providers/lib/src/providers/youtube/youtube_hls_master_playlist_parser.dart:87-106 — `packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_hls_master_playlist_parser.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 52 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/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.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.
Duplicated block (15 lines × 2) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:534— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:534-548 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:572-586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:534` it does not close everything it opens, so those exact lines 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) apps/main_app/lib/src/shared/application/player_runtime_controller.dart:197— apps/main_app/lib/src/shared/application/player_runtime_controller.dart:197-211 | packages/live_player/lib/src/switchable_player.dart:156-170 — 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 (15 lines × 2) packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:154— packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:154-168 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:95-109 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart` as WHOLE FILES: this scan already matched 8 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/live_providers/lib/src/danmaku/douyin_danmaku_session.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.
Duplicated block (15 lines × 2) packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:13— packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:13-27 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:78-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/providers/twitch/twitch_mapper.dart:13` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:387— apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:387-397 | apps/main_app/lib/src/features/home/presentation/home_page.dart:491-501 | apps/main_app/lib/src/features/search/presentation/search_page.dart:397-407 — before extracting anything, compare `apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart` and `apps/main_app/lib/src/features/home/presentation/home_page.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:64— apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:64-74 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:648-658 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:205-215 — before extracting anything, compare `apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart` and `apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/sync/presentation/sync_center_page.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. 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 × 3) packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:208— packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:208-218 | packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:180-190 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:173-183 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/huya_danmaku_session.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. If that is what happened, the fix is to keep one copy and have the 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/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:208` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2113— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2113-2123 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:334-344 | packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:276-286 — `packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_mapper.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 5 separate duplicated blocks between them, totalling at least 53 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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.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.
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/live_providers/tool/yt_nsig_challenge_probe2.dart:9— `walk` is public and takes `Object ? v` from its caller, and it calls itself at line 9 (`walk`) with a piece of `v` (and at line 11) — and nowhere in `walk` 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 `walk` 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/live_providers/tool/yt_nsig_challenge_probe3.dart:10— `walk` is public and takes `Object ? v` from its caller, and it calls itself at line 10 (`walk`) with a piece of `v` (and at line 14) — and nowhere in `walk` 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 `walk` 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/live_providers/tool/yt_nsig_challenge_probe4.dart:8— `walk` is public and takes `Object ? v` from its caller, and it calls itself at line 8 (`walk`) with a piece of `v` (and at line 12) — and nowhere in `walk` 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 `walk` 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/live_providers/lib/src/providers/provider_transport_failure.dart:37— `isTransientTransportFailure` is public and takes `Object ? error` from its caller, and it calls itself at line 37 (`isTransientTransportFailure`) with a piece of `error` — and nowhere in `isTransientTransportFailure` 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 `isTransientTransportFailure` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
_0x4591cd::_0x343a1e (cyclomatic 38) REDACTED:1172— _0x4591cd::_0x343a1e 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.
_0x4591cd::_0x4c3a0d (cyclomatic 19) REDACTED:1252— _0x4591cd::_0x4c3a0d 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.
_0x4591cd::_0x39ceae (cyclomatic 17) REDACTED:1088— _0x4591cd::_0x39ceae has cyclomatic complexity 17 (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.
_0x4591cd::_0x343a1e (cognitive 61) REDACTED:1172— _0x4591cd::_0x343a1e has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 19 (36 pts), boolean chains 13, if/else 7 (10 pts), loops 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x4591cd::_0x4c3a0d (cognitive 33) REDACTED:1252— _0x4591cd::_0x4c3a0d has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 3 (12 pts), boolean chains 11, if/else 3 (9 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x4591cd::_0x2de5e4 (cognitive 16) REDACTED:1157— _0x4591cd::_0x2de5e4 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 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. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:208— packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:208-226 | packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:243-269 | packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:180-236 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:173-187 — 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/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:103— packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:103-112 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:133-142 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:100-109 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:93-102 — 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/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:116— packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:116-159 | packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:86-96 | packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:98-112 | packages/live_providers/lib/src/providers/huya/huya_transport.dart:60-103 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2308— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2308-2317 | packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:462-469 — 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/live_storage/lib/src/repositories/file/file_history_repository.dart:12— packages/live_storage/lib/src/repositories/file/file_history_repository.dart:12-22 | packages/live_storage/lib/src/repositories/in_memory/in_memory_history_repository.dart:9-16 — 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/live_sync/lib/src/backup/webdav_backup_service.dart:42— packages/live_sync/lib/src/backup/webdav_backup_service.dart:42-49 | packages/live_sync/lib/src/local_sync/local_sync_client.dart:40-47 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 3) apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:244— apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:244-260 | apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:314-330 | apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:363-379 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:244` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (17 lines × 3) apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:246— apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:246-262 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:450-466 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:489-505 — 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 `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:246` 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 (17 lines × 3) packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:16— packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:16-32 | packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:93-109 | packages/live_providers/lib/src/providers/douyin/douyin_transport.dart:34-50 — 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/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:16` 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 × 3) apps/main_app/lib/src/features/library/presentation/watch_history_page.dart:88— apps/main_app/lib/src/features/library/presentation/watch_history_page.dart:88-101 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:257-270 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:108-121 — before extracting anything, compare `apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart` and `apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `apps/main_app/lib/src/features/library/presentation/watch_history_page.dart:88` 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 × 3) packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:265— packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:265-278 | packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:161-174 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:142-155 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:265` 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/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:176` calls `_send`, `add`, `_serialize` and `packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:157` 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 × 3) packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:186— packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:186-199 | packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:147-160 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:127-140 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:186` 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 (5 lines × 8) packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:99— packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:99-103 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.dart:124-128 | packages/live_providers/lib/src/providers/douyin/douyin_provider.dart:108-112 | packages/live_providers/lib/src/providers/douyu/douyu_provider.dart:103-107 | packages/live_providers/lib/src/providers/huya/huya_provider.dart:96-100 | packages/live_providers/lib/src/providers/stripchat/stripchat_provider.dart:94-98 | packages/live_providers/lib/src/providers/twitch/twitch_provider.dart:100-104 | packages/live_providers/lib/src/providers/youtube/youtube_provider.dart:122-126 — `packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart` and `packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.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 5 separate duplicated blocks between them, totalling at least 31 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 (5 lines × 8) packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:105— packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:105-109 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.dart:130-134 | packages/live_providers/lib/src/providers/douyin/douyin_provider.dart:114-118 | packages/live_providers/lib/src/providers/douyu/douyu_provider.dart:109-113 | packages/live_providers/lib/src/providers/huya/huya_provider.dart:102-106 | packages/live_providers/lib/src/providers/stripchat/stripchat_provider.dart:100-104 | packages/live_providers/lib/src/providers/twitch/twitch_provider.dart:106-110 | packages/live_providers/lib/src/providers/youtube/youtube_provider.dart:128-132 — `packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart` and `packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.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 5 separate duplicated blocks between them, totalling at least 31 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 (5 lines × 8) packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:117— packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:117-121 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.dart:142-146 | packages/live_providers/lib/src/providers/douyin/douyin_provider.dart:126-130 | packages/live_providers/lib/src/providers/douyu/douyu_provider.dart:121-125 | packages/live_providers/lib/src/providers/huya/huya_provider.dart:114-118 | packages/live_providers/lib/src/providers/stripchat/stripchat_provider.dart:112-116 | packages/live_providers/lib/src/providers/twitch/twitch_provider.dart:118-122 | packages/live_providers/lib/src/providers/youtube/youtube_provider.dart:140-144 — `packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart` and `packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.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 5 separate duplicated blocks between them, totalling at least 31 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.
_0x281b3b::_0x3345ab (cyclomatic 38) REDACTED:918— _0x281b3b::_0x3345ab 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.
_0x281b3b::_0x193050 (cyclomatic 17) REDACTED:833— _0x281b3b::_0x193050 has cyclomatic complexity 17 (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.
_0x281b3b::_0x3345ab (cognitive 61) REDACTED:918— _0x281b3b::_0x3345ab has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 19 (36 pts), boolean chains 13, if/else 7 (10 pts), loops 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x281b3b::_0x13d7df (cognitive 16) REDACTED:903— _0x281b3b::_0x13d7df has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 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. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:211— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:211-241 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:561-586 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:588-622 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1145-1172 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1320-1349 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:100-133 — 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/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:204— packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:204-279 | packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:114-127 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:724-825 | packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:149-162 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:111-124 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:104-117 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×2
Edited copy of a member (46 corresponding lines) packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:40— packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:40-91 | packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:118-163 — 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.
Edited copy of a member (46 corresponding lines) packages/live_storage/lib/src/persistence/local_storage_file_store.dart:613— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:613-658 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:35-81 — 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 (39 corresponding lines) · ×2
Edited copy of a member (39 corresponding lines) apps/main_app/lib/src/shared/presentation/theme/nolive_theme.dart:23— apps/main_app/lib/src/shared/presentation/theme/nolive_theme.dart:23-61 | apps/main_app/lib/src/shared/presentation/theme/nolive_theme.dart:63-101 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1202— packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1202-1240 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1242-1284 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:179— packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:179-199 | packages/live_providers/lib/src/providers/huya/huya_mapper.dart:29-49 — 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/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:271— packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:271-291 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:189-209 — 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 (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:38— packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:38-63 | packages/live_providers/lib/src/providers/huya/huya_live_data_source.dart:65-86 — 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/live_providers/lib/src/providers/douyin/douyin_provider.dart:32— packages/live_providers/lib/src/providers/douyin/douyin_provider.dart:32-55 | packages/live_providers/lib/src/providers/douyu/douyu_provider.dart:30-51 — 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 (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) packages/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:53— packages/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:53-70 | packages/live_providers/lib/src/providers/bilibili/bilibili_account_client.dart:72-91 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) apps/main_app/lib/src/features/sync/application/manage_local_sync_use_case.dart:133— apps/main_app/lib/src/features/sync/application/manage_local_sync_use_case.dart:133-150 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:395-412 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×2
Edited copies of one member (3 members, 15+ corresponding lines) apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:145— apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:145-161 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:163-177 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:215-229 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:168— packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:168-184 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:164-180 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:156-170 — 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 (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:202— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:202-217 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:32-47 — 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/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:444— packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:444-462 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:464-479 — 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 (3 members, 11+ corresponding lines) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2125— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2125-2138 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:408-419 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:421-431 — 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) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:416— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:416-426 | apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:140-150 | apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:471-485 — 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 (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) packages/live_providers/lib/src/providers/chaturbate/chaturbate_room_page_parser.dart:81— packages/live_providers/lib/src/providers/chaturbate/chaturbate_room_page_parser.dart:81-94 | packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:561-570 — 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/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:939— packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:939-948 | packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:950-961 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:594— packages/live_providers/lib/src/providers/douyin/douyin_live_data_source.dart:594-600 | packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:374-380 — 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/live_providers/lib/src/danmaku/provider_ticker_danmaku_session.dart:51— packages/live_providers/lib/src/danmaku/provider_ticker_danmaku_session.dart:51-59 | packages/live_providers/lib/src/danmaku/provider_unavailable_danmaku_session.dart:40-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· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:32— apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:32-36 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:30-34 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) packages/live_storage/lib/src/repositories/follow_repository.dart:10— packages/live_storage/lib/src/repositories/follow_repository.dart:10-14 | packages/live_storage/lib/src/repositories/in_memory/in_memory_follow_repository.dart:50-55 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:354— packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:354-359 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:457-462 — 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) apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:1130— apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:1130-1136 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:476-481 — 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.
Duplicated block (30 lines × 2) apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:265— apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:265-294 | apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:326-355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart:326` 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 (30 lines × 2) packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:184— packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:184-213 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:125-154 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart` as WHOLE FILES: this scan already matched 8 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.
Duplicated block (26 lines × 2) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:133— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:133-158 | apps/main_app/lib/src/features/home/presentation/home_page.dart:148-173 — before extracting anything, compare `apps/main_app/lib/src/features/browse/presentation/browse_page.dart` and `apps/main_app/lib/src/features/home/presentation/home_page.dart` as WHOLE FILES: this scan already matched 5 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `key` to `const Key('browse-appbar-search-button')` in one and `const Key('home-appbar-search-button')` 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 (26 lines × 2) apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:108— apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:108-133 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:332-357 — before extracting anything, compare `apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart` and `apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23–24 lines × 2) apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:367— apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:367-390 | apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:415-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 `apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:367` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23–24 lines × 2) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:220— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:220-243 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:225-247 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart` as WHOLE FILES: this scan already matched 6 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 `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) apps/main_app/lib/src/features/library/presentation/library_page.dart:474— apps/main_app/lib/src/features/library/presentation/library_page.dart:474-492 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:305-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 `apps/main_app/lib/src/features/library/presentation/library_page.dart:474` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:267— packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:267-285 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:291-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/providers/twitch/twitch_mapper.dart:267` it begins part-way through the construct above it, so those 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 (18–19 lines × 2) packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:232— packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:232-249 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:255-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:232` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:213— packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:213-231 | packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:268-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_providers/lib/src/providers/youtube/youtube_api_client.dart:213` 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 (18 lines × 2) apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:810— apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:810-827 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:865-882 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:810` it begins part-way through the construct above it, so those exact lines 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/live_providers/lib/src/providers/twitch/twitch_mapper.dart:329— packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:329-346 | packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:271-288 — `packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_mapper.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 5 separate duplicated blocks between them, totalling at least 53 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 (16 lines × 3) packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:235— packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:235-250 | packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:276-291 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:194-209 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/huya_danmaku_session.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. If that is what happened, the fix is to keep one copy and have the 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/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:235` 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/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:89— packages/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:89-104 | packages/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:114-129 | packages/live_providers/lib/src/danmaku/tars/codec/tars_displayer.dart:142-157 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16 lines × 2) packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:261— packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:261-276 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:138-153 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:261` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) packages/live_player/lib/src/mdk_player.dart:823— packages/live_player/lib/src/mdk_player.dart:823-838 | packages/live_player/lib/src/mpv_player.dart:1387-1402 — 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/live_player/lib/src/mpv_player.dart:1387` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) apps/main_app/lib/src/features/home/presentation/home_page.dart:41— apps/main_app/lib/src/features/home/presentation/home_page.dart:41-55 | apps/main_app/lib/src/features/search/presentation/search_page.dart:85-98 — before extracting anything, compare `apps/main_app/lib/src/features/home/presentation/home_page.dart` and `apps/main_app/lib/src/features/search/presentation/search_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `apps/main_app/lib/src/features/home/presentation/home_page.dart:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:55— apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:55-68 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:100-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–15 lines × 2) apps/main_app/lib/src/features/parse/presentation/parse_room_page.dart:90— apps/main_app/lib/src/features/parse/presentation/parse_room_page.dart:90-104 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:518-530 — 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 `apps/main_app/lib/src/features/parse/presentation/parse_room_page.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. 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–15 lines × 2) apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:286— apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:286-300 | apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:329-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:286` 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) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:446— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:446-459 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:489-502 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:531-544 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:569-582 — 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 `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:446` it begins part-way through the construct above it, so those exact lines 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/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:114— packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:114-127 | packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:149-162 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:111-124 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:104-117 — `packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart` and `packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.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 5 separate duplicated blocks between them, totalling at least 62 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 (12–14 lines × 2) apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:909— apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:909-922 | apps/main_app/lib/src/features/home/presentation/home_page.dart:620-631 — before extracting anything, compare `apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart` and `apps/main_app/lib/src/features/home/presentation/home_page.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:909` 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 (12–14 lines × 2) packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:477— packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:477-488 | packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:511-524 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:511` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/huya/huya_mapper.dart:294— packages/live_providers/lib/src/providers/huya/huya_mapper.dart:294-304 | packages/live_providers/lib/src/providers/huya/huya_transport.dart:29-40 — 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/live_providers/lib/src/providers/huya/huya_mapper.dart:294` 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–12 lines × 2) packages/live_storage/lib/src/persistence/local_storage_file_store.dart:705— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:705-715 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:183-194 — before extracting anything, compare `packages/live_storage/lib/src/persistence/local_storage_file_store.dart` and `packages/live_sync/lib/src/model/sync_snapshot_codec.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/live_storage/lib/src/persistence/local_storage_file_store.dart:705` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:73— packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:73-80 | packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:56-63 | packages/live_providers/lib/src/providers/youtube/youtube_hls_master_playlist_parser.dart:97-104 — `packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart` and `packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.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 5 separate duplicated blocks between them, totalling at least 54 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/live_providers/lib/src/providers/chaturbate/chaturbate_hls_master_playlist_parser.dart:72` calls `tryParse` and `packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:55` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:209— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:209-216 | apps/main_app/lib/src/features/browse/presentation/browse_page.dart:362-369 | apps/main_app/lib/src/features/home/presentation/home_page.dart:249-256 — before extracting anything, compare `apps/main_app/lib/src/features/browse/presentation/browse_page.dart` and `apps/main_app/lib/src/features/home/presentation/home_page.dart` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (5 lines × 2) packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:752— packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:752-756 | packages/live_providers/lib/src/providers/twitch/twitch_bootstrap_resolver.dart:183-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:502— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:502-506 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:514-518 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) packages/live_player/lib/src/mdk_player.dart:751— packages/live_player/lib/src/mdk_player.dart:751-756 | packages/live_player/lib/src/memory_player.dart:148-153 | packages/live_player/lib/src/simulated_backend_player.dart:162-167 — before extracting anything, compare `packages/live_player/lib/src/memory_player.dart` and `packages/live_player/lib/src/simulated_backend_player.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) packages/live_storage/lib/src/repositories/file/file_follow_repository.dart:12— packages/live_storage/lib/src/repositories/file/file_follow_repository.dart:12-17 | packages/live_storage/lib/src/repositories/file/file_history_repository.dart:24-29 | packages/live_storage/lib/src/repositories/file/file_tag_repository.dart:9-14 — 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 (8 lines × 8) packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:90— packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:90-97 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.dart:115-122 | packages/live_providers/lib/src/providers/douyin/douyin_provider.dart:99-106 | packages/live_providers/lib/src/providers/douyu/douyu_provider.dart:94-101 | packages/live_providers/lib/src/providers/huya/huya_provider.dart:87-94 | packages/live_providers/lib/src/providers/stripchat/stripchat_provider.dart:85-92 | packages/live_providers/lib/src/providers/twitch/twitch_provider.dart:91-98 | packages/live_providers/lib/src/providers/youtube/youtube_provider.dart:113-120 — `packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart` and `packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.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 5 separate duplicated blocks between them, totalling at least 31 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 × 8) packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:123— packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:123-130 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.dart:148-155 | packages/live_providers/lib/src/providers/douyin/douyin_provider.dart:132-139 | packages/live_providers/lib/src/providers/douyu/douyu_provider.dart:127-134 | packages/live_providers/lib/src/providers/huya/huya_provider.dart:120-127 | packages/live_providers/lib/src/providers/stripchat/stripchat_provider.dart:118-125 | packages/live_providers/lib/src/providers/twitch/twitch_provider.dart:124-131 | packages/live_providers/lib/src/providers/youtube/youtube_provider.dart:146-153 — `packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart` and `packages/live_providers/lib/src/providers/chaturbate/chaturbate_provider.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 5 separate duplicated blocks between them, totalling at least 31 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.
_0x385d19 (cyclomatic 106) REDACTED:1866— _0x385d19 has cyclomatic complexity 106 (threshold 15). Most of this is not in the body itself: 11 of the 106 points are its own statements and the rest belongs to 50 function items inside it that branch (a function literal at line 2002, dispatchException, abrupt, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
w_0x5c3140::_0x970e7 (cyclomatic 96) REDACTED:114— w_0x5c3140::_0x970e7 has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StripchatLlHlsProxy._materializePlaylistImpl (cyclomatic 81) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:901— StripchatLlHlsProxy._materializePlaylistImpl has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
(anonymous) (cyclomatic 69) REDACTED:3793— (anonymous) has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 1 of the 69 points is its own statement and the rest belongs to 19 function items inside it that branch (a function literal at line 3886, a function literal at line 3794, (anonymous)::_0x4d7e2d::_0x3d7396, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
FollowWatchRow.build (cyclomatic 68) apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:32— FollowWatchRow.build 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.
StripchatLlHlsProxy._handlePlaylistRequest (cyclomatic 62) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:476— StripchatLlHlsProxy._handlePlaylistRequest has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RoomPlayerSurfaceSection.build (cyclomatic 57) apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:348— RoomPlayerSurfaceSection.build has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StripchatLlHlsProxy._rewritePlaylist (cyclomatic 52) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2949— StripchatLlHlsProxy._rewritePlaylist 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.
RoomFullscreenTopChrome.build (cyclomatic 46) apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:240— RoomFullscreenTopChrome.build 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.
ParseRoomInputUseCase._parseFromUri (cyclomatic 45) apps/main_app/lib/src/features/parse/application/parse_room_input_use_case.dart:90— ParseRoomInputUseCase._parseFromUri has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StripchatLlHlsProxy._handleAssetRequest (cyclomatic 40) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1982— StripchatLlHlsProxy._handleAssetRequest 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.
_SyncLocalPageState.build (cyclomatic 39) apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:640— _SyncLocalPageState.build has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_0x481bfe (cyclomatic 39) REDACTED:659— _0x481bfe has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_0x23e6b (cyclomatic 39) REDACTED:1477— _0x23e6b has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_0xdaf8f6 (cyclomatic 39) REDACTED:3259— _0xdaf8f6 has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 23 function items inside it that branch (decorateConstructor, toElementDescriptor, decorateElement, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
RoomPlaybackController._flushPendingPlaybackBootstrap (cyclomatic 36) apps/main_app/lib/src/features/room/application/room_playback_controller.dart:228— RoomPlaybackController._flushPendingPlaybackBootstrap has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_RoomPreviewPageState.build (cyclomatic 36) apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:1337— _RoomPreviewPageState.build has cyclomatic complexity 36 (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.
StripchatLlHlsProxy._awaitPublishWarm (cyclomatic 33) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1556— StripchatLlHlsProxy._awaitPublishWarm 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.
TwitchAdGuardProxy._selectPlayablePlaylist (cyclomatic 33) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:579— TwitchAdGuardProxy._selectPlayablePlaylist 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.
ChaturbateMapper.mapPlayUrls (cyclomatic 33) packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:286— ChaturbateMapper.mapPlayUrls has cyclomatic complexity 33 (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.
RoomTwitchRecoveryController.scheduleRecovery (cyclomatic 32) apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:145— RoomTwitchRecoveryController.scheduleRecovery 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.
_ProviderCategoriesPageState.build (cyclomatic 31) apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:516— _ProviderCategoriesPageState.build 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.
YouTubePlaybackDataSource.loadPlaybackBundle (cyclomatic 31) packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:299— YouTubePlaybackDataSource.loadPlaybackBundle 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.
LoadProviderAccountSettingsUseCase.call (cyclomatic 30) apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:64— LoadProviderAccountSettingsUseCase.call has cyclomatic complexity 30 (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.
LazySecureCredentialStore._promoteResolvedStore (cyclomatic 30) apps/main_app/lib/src/shared/application/secure_credential_store.dart:695— LazySecureCredentialStore._promoteResolvedStore 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.
PlaybackFailoverPolicy.isHardOpenFailure (cyclomatic 30) packages/live_player/lib/src/playback_failover_policy.dart:36— PlaybackFailoverPolicy.isHardOpenFailure 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.
StripchatMapper.mapRoomDetail (cyclomatic 29) packages/live_providers/lib/src/providers/stripchat/stripchat_mapper.dart:375— StripchatMapper.mapRoomDetail 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.
LoadFollowWatchlistUseCase.call (cyclomatic 25) apps/main_app/lib/src/features/library/application/load_follow_watchlist_use_case.dart:67— LoadFollowWatchlistUseCase.call 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.
RoomPlayerRuntimeObserver._handlePlayerDiagnostics (cyclomatic 24) apps/main_app/lib/src/features/room/application/room_player_runtime_observer.dart:273— RoomPlayerRuntimeObserver._handlePlayerDiagnostics 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.
_PlayerSettingsPageState._buildAdvancedOptions (cyclomatic 24) apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:429— _PlayerSettingsPageState._buildAdvancedOptions 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.
ChaturbateLiveDataSource._loadDiscoverRoomsBounded (cyclomatic 24) packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:724— ChaturbateLiveDataSource._loadDiscoverRoomsBounded 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.
RoomPictureInPictureCoordinator._handleLifecycleState (cyclomatic 23) apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart:184— RoomPictureInPictureCoordinator._handleLifecycleState 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.
RoomFullscreenBottomChrome.build (cyclomatic 23) apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:481— RoomFullscreenBottomChrome.build has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StripchatLlHlsProxy._orderedCollapseVariantUris (cyclomatic 23) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2830— StripchatLlHlsProxy._orderedCollapseVariantUris 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.
MdkPlayer.setSource (cyclomatic 23) packages/live_player/lib/src/mdk_player.dart:119— MdkPlayer.setSource has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HttpLocalSyncServer._handleRequest (cyclomatic 23) packages/live_sync/lib/src/local_sync/local_sync_server.dart:169— HttpLocalSyncServer._handleRequest 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.
RepositorySyncSnapshotService.importCategory (cyclomatic 23) packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart:118— RepositorySyncSnapshotService.importCategory has cyclomatic complexity 23 (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.
_0x151762 (cyclomatic 23) REDACTED:1347— _0x151762 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.
TarsInputStream.skipFieldWithType (cyclomatic 22) packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:191— TarsInputStream.skipFieldWithType has cyclomatic complexity 22 (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.
YouTubePlaybackDataSource.fetchPlayUrls (cyclomatic 22) packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:133— YouTubePlaybackDataSource.fetchPlayUrls 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.
FollowRecord.== (cyclomatic 22) packages/live_storage/lib/src/models/follow_record.dart:108— FollowRecord.== 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.
_0x25bfe1 (cyclomatic 22) REDACTED:4386— _0x25bfe1 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.
HuyaMapper.mapRoomDetail (cyclomatic 21) packages/live_providers/lib/src/providers/huya/huya_mapper.dart:51— HuyaMapper.mapRoomDetail 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.
_0x754898 (cyclomatic 21) REDACTED:1558— _0x754898 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.
_0x45fbef (cyclomatic 21) REDACTED:4343— _0x45fbef 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.
RoomFullscreenChromeController.scheduleFullscreenChromeAutoHide (cyclomatic 20) apps/main_app/lib/src/features/room/presentation/room_fullscreen_chrome_controller.dart:184— RoomFullscreenChromeController.scheduleFullscreenChromeAutoHide 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.
StripchatLlHlsProxy._prefetchAssetOnce (cyclomatic 20) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2220— StripchatLlHlsProxy._prefetchAssetOnce 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.
TwitchAdGuardProxy._sanitizePlaylist (cyclomatic 20) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:992— TwitchAdGuardProxy._sanitizePlaylist 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.
(anonymous) (cyclomatic 20) REDACTED:404— (anonymous) 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.
RoomViewUiState.== (cyclomatic 19) apps/main_app/lib/src/features/room/application/room_view_ui_state.dart:100— RoomViewUiState.== 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.
_0xa6bc9e (cyclomatic 19) REDACTED:739— _0xa6bc9e 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.
RoomDanmakuController.bindSession (cyclomatic 18) apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart:289— RoomDanmakuController.bindSession 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.
RoomPlaybackController.schedulePlaybackBootstrap (cyclomatic 18) apps/main_app/lib/src/features/room/application/room_playback_controller.dart:150— RoomPlaybackController.schedulePlaybackBootstrap has cyclomatic complexity 18 (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.
_RustDanmakuBatchMask.allowListBatch (cyclomatic 18) apps/main_app/lib/src/rust/danmaku_batch_mask_ffi.dart:91— _RustDanmakuBatchMask.allowListBatch has cyclomatic complexity 18 (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.
_0x2e4b86 (cyclomatic 18) REDACTED:1806— _0x2e4b86 has cyclomatic complexity 18 (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.
_0x2c9158 (cyclomatic 18) REDACTED:2717— _0x2c9158 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.
RoomChatPanel.build (cyclomatic 17) apps/main_app/lib/src/features/room/presentation/room_preview_page_chat_panels.dart:98— RoomChatPanel.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.
DanmakuPreferences.== (cyclomatic 17) apps/main_app/lib/src/features/settings/application/manage_danmaku_preferences_use_case.dart:106— DanmakuPreferences.== 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.
_FollowSettingsPageState.build (cyclomatic 17) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:340— _FollowSettingsPageState.build 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.
LiveRoomDetail.== (cyclomatic 17) packages/live_core/lib/src/model/live_room_detail.dart:49— LiveRoomDetail.== 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.
TarsInputStream.read (cyclomatic 17) packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:271— TarsInputStream.read 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.
TarsOutputStream.write (cyclomatic 17) packages/live_providers/lib/src/danmaku/tars/codec/tars_output_stream.dart:81— TarsOutputStream.write 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.
SyncSnapshotMerger.mergeFollows (cyclomatic 17) packages/live_sync/lib/src/runtime/sync_snapshot_merger.dart:44— SyncSnapshotMerger.mergeFollows 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.
_0x5bbaf0 (cyclomatic 17) REDACTED:5011— _0x5bbaf0 has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 5034, a function literal at line 5015, a function literal at line 5028, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_ProviderCategoriesTabState.build (cyclomatic 16) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:462— _ProviderCategoriesTabState.build 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.
LoadFollowWatchlistUseCase._buildSyncedRecord (cyclomatic 16) apps/main_app/lib/src/features/library/application/load_follow_watchlist_use_case.dart:303— LoadFollowWatchlistUseCase._buildSyncedRecord 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.
RoomFollowActionCoordinator.toggleCurrentRoomFollow (cyclomatic 16) apps/main_app/lib/src/features/room/presentation/room_follow_action_coordinator.dart:50— RoomFollowActionCoordinator.toggleCurrentRoomFollow 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.
_PlayerSettingsPageState.build (cyclomatic 16) apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:84— _PlayerSettingsPageState.build 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.
_SyncWebDavPageState.build (cyclomatic 16) apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:197— _SyncWebDavPageState.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.
StripchatLlHlsProxy._prewarmAutoMediaVariants (cyclomatic 16) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2383— StripchatLlHlsProxy._prewarmAutoMediaVariants 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.
StripchatLlHlsProxy._fetchPlaylistWithFallbacks (cyclomatic 16) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2644— StripchatLlHlsProxy._fetchPlaylistWithFallbacks 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.
DouyuDanmakuSession._handleRawMessage (cyclomatic 16) packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:180— DouyuDanmakuSession._handleRawMessage 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.
_DanmakuParserWorker._handleMessage (cyclomatic 16) packages/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:253— _DanmakuParserWorker._handleMessage 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.
DouyuMapper.douyuPlayUrlHostPreferenceScore (cyclomatic 16) packages/live_providers/lib/src/providers/douyu/douyu_mapper.dart:345— DouyuMapper.douyuPlayUrlHostPreferenceScore 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.
YouTubeDecipherService.decryptUrl (cyclomatic 16) packages/live_providers/lib/src/providers/youtube/youtube_decipher_service.dart:27— YouTubeDecipherService.decryptUrl 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.
_0x5d3845 (cyclomatic 16) REDACTED:6124— _0x5d3845 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.
w_0x5c3140::_0x970e7 (cognitive 496) REDACTED:114— w_0x5c3140::_0x970e7 has cognitive complexity 496 (threshold 15). Drivers by points: ternaries 44 (220 pts), if/else 56 (216 pts), loops 10 (51 pts), boolean chains 8, error handling 1 (nesting depth added 377). 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 file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
(anonymous) (cognitive 139) REDACTED:3793— (anonymous) has cognitive complexity 139 (threshold 15). Drivers by points: ternaries 13 (45 pts), if/else 21 (40 pts), boolean chains 30, loops 7 (24 pts) (nesting depth added 68). None of this is in the body itself: all 139 points belong to 19 function items inside it that branch (a function literal at line 3886, a function literal at line 3794, (anonymous)::_0x4d7e2d::_0x3d7396, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
FollowWatchRow.build (cognitive 135) apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:32— FollowWatchRow.build has cognitive complexity 135 (threshold 15). Drivers by points: ternaries 51 (102 pts), if/else 15 (28 pts), boolean chains 5 (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._rewritePlaylist (cognitive 116) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2949— StripchatLlHlsProxy._rewritePlaylist has cognitive complexity 116 (threshold 15). Drivers by points: if/else 36 (96 pts), boolean chains 11, ternaries 2 (5 pts), loops 3 (4 pts) (nesting depth added 64). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
StripchatLlHlsProxy._materializePlaylistImpl (cognitive 109) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:901— StripchatLlHlsProxy._materializePlaylistImpl has cognitive complexity 109 (threshold 15). Drivers by points: if/else 42 (62 pts), boolean chains 29, loops 5 (10 pts), error handling 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._handlePlaylistRequest (cognitive 94) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:476— StripchatLlHlsProxy._handlePlaylistRequest has cognitive complexity 94 (threshold 15). Drivers by points: if/else 24 (49 pts), boolean chains 30, loops 3 (9 pts), ternaries 4, error handling 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoomPlayerSurfaceSection.build (cognitive 84) apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:348— RoomPlayerSurfaceSection.build has cognitive complexity 84 (threshold 15). Drivers by points: ternaries 19 (38 pts), if/else 20 (27 pts), boolean chains 19 (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.
LazySecureCredentialStore._promoteResolvedStore (cognitive 74) apps/main_app/lib/src/shared/application/secure_credential_store.dart:695— LazySecureCredentialStore._promoteResolvedStore has cognitive complexity 74 (threshold 15). Drivers by points: if/else 17 (51 pts), loops 5 (13 pts), boolean chains 5, error handling 3 (5 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwitchAdGuardProxy._selectPlayablePlaylist (cognitive 72) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:579— TwitchAdGuardProxy._selectPlayablePlaylist has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (56 pts), boolean chains 9, loops 4 (7 pts) (nesting depth added 40). 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.
YouTubePlaybackDataSource.fetchPlayUrls (cognitive 65) packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:133— YouTubePlaybackDataSource.fetchPlayUrls has cognitive complexity 65 (threshold 15). Drivers by points: if/else 11 (34 pts), error handling 3 (17 pts), loops 4 (10 pts), boolean chains 3, ternaries 1 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
_0x481bfe (cognitive 65) REDACTED:659— _0x481bfe has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 19 (36 pts), boolean chains 13, if/else 7 (10 pts), loops 2 (6 pts) (nesting depth added 24). Of this number, 61 points are the body's own statements and 4 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x23e6b (cognitive 65) REDACTED:1477— _0x23e6b has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 19 (36 pts), boolean chains 13, if/else 7 (10 pts), loops 2 (6 pts) (nesting depth added 24). Of this number, 61 points are the body's own statements and 4 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
ParseRoomInputUseCase._parseFromUri (cognitive 64) apps/main_app/lib/src/features/parse/application/parse_room_input_use_case.dart:90— ParseRoomInputUseCase._parseFromUri has cognitive complexity 64 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 22, ternaries 3 (10 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.
YouTubePlaybackDataSource.loadPlaybackBundle (cognitive 63) packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:299— YouTubePlaybackDataSource.loadPlaybackBundle has cognitive complexity 63 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 6 (14 pts), ternaries 5 (9 pts), boolean chains 5, error handling 2 (4 pts) (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.
_SyncLocalPageState.build (cognitive 58) apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:640— _SyncLocalPageState.build has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 19 (32 pts), boolean chains 10, if/else 9 (10 pts), loops 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_ProviderCategoriesPageState.build (cognitive 55) apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:516— _ProviderCategoriesPageState.build has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 15 (24 pts), if/else 14 (20 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._handleAssetRequest (cognitive 53) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1982— StripchatLlHlsProxy._handleAssetRequest has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (35 pts), boolean chains 15, ternaries 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoomPlaybackController._flushPendingPlaybackBootstrap (cognitive 47) apps/main_app/lib/src/features/room/application/room_playback_controller.dart:228— RoomPlaybackController._flushPendingPlaybackBootstrap has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 16, ternaries 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoomFullscreenTopChrome.build (cognitive 47) apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:240— RoomFullscreenTopChrome.build has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 26 (28 pts), boolean chains 14, if/else 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
StripchatLlHlsProxy._awaitPublishWarm (cognitive 47) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1556— StripchatLlHlsProxy._awaitPublishWarm has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 15, loops 3 (6 pts), ternaries 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpLocalSyncServer._handleRequest (cognitive 47) packages/live_sync/lib/src/local_sync/local_sync_server.dart:169— HttpLocalSyncServer._handleRequest has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (40 pts), boolean chains 4, error handling 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.
RoomTwitchRecoveryController.scheduleRecovery (cognitive 40) apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:145— RoomTwitchRecoveryController.scheduleRecovery has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 8, match/switch 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.
_RoomPreviewPageState.build (cognitive 39) apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:1337— _RoomPreviewPageState.build has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 11 (12 pts), boolean chains 11 (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.
_0x385d19::dispatchException (cognitive 39) REDACTED:2248— _0x385d19::dispatchException has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (37 pts), boolean chains 1, loops 1 (nesting depth added 25). 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 file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
ChaturbateLiveDataSource._loadDiscoverRoomsBounded (cognitive 38) packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:724— ChaturbateLiveDataSource._loadDiscoverRoomsBounded has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (2 pts), ternaries 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.
_PlayerSettingsPageState._buildAdvancedOptions (cognitive 37) apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:429— _PlayerSettingsPageState._buildAdvancedOptions has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 13 (26 pts), if/else 3 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 16). 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.
TwitchAdGuardProxy._sanitizePlaylist (cognitive 37) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:992— TwitchAdGuardProxy._sanitizePlaylist has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 5, 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.
RepositorySyncSnapshotService.importCategory (cognitive 37) packages/live_sync/lib/src/runtime/repository_sync_snapshot_service.dart:118— RepositorySyncSnapshotService.importCategory has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 7 (17 pts), match/switch 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoadProviderAccountSettingsUseCase.call (cognitive 36) apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:64— LoadProviderAccountSettingsUseCase.call has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 7, ternaries 7 (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.
LoadFollowWatchlistUseCase.call (cognitive 35) apps/main_app/lib/src/features/library/application/load_follow_watchlist_use_case.dart:67— LoadFollowWatchlistUseCase.call has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 5 (7 pts), boolean chains 4, ternaries 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_0x754898 (cognitive 34) REDACTED:1558— _0x754898 has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 12, ternaries 3 (12 pts), if/else 3 (9 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
ChaturbateMapper.mapPlayUrls (cognitive 33) packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:286— ChaturbateMapper.mapPlayUrls has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15, boolean chains 13, ternaries 4 (5 pts) (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.
_0xa6bc9e (cognitive 33) REDACTED:739— _0xa6bc9e has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 3 (12 pts), boolean chains 11, if/else 3 (9 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
StripchatLlHlsProxy._orderedCollapseVariantUris (cognitive 32) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2830— StripchatLlHlsProxy._orderedCollapseVariantUris has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, ternaries 3 (6 pts), loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlaybackFailoverPolicy.isHardOpenFailure (cognitive 31) packages/live_player/lib/src/playback_failover_policy.dart:36— PlaybackFailoverPolicy.isHardOpenFailure has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 21, if/else 8 (10 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.
HuyaMapper.mapRoomDetail (cognitive 31) packages/live_providers/lib/src/providers/huya/huya_mapper.dart:51— HuyaMapper.mapRoomDetail has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 2 (4 pts), ternaries 4, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_ParseRoomPageState.build (cognitive 30) apps/main_app/lib/src/features/parse/presentation/parse_room_page.dart:90— _ParseRoomPageState.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (25 pts), ternaries 4, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
RoomPlayerRuntimeObserver._handlePlayerDiagnostics (cognitive 30) apps/main_app/lib/src/features/room/application/room_player_runtime_observer.dart:273— RoomPlayerRuntimeObserver._handlePlayerDiagnostics has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 2, match/switch 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoomPictureInPictureCoordinator._handleLifecycleState (cognitive 30) apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart:184— RoomPictureInPictureCoordinator._handleLifecycleState has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 6 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChaturbateLlHlsProxy._primeSession (cognitive 30) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:769— ChaturbateLlHlsProxy._primeSession has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 2 (5 pts), error handling 1 (3 pts), 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.
SyncSnapshotMerger.mergeFollows (cognitive 30) packages/live_sync/lib/src/runtime/sync_snapshot_merger.dart:44— SyncSnapshotMerger.mergeFollows has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 4, loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BilibiliMapper.mapPlayUrls (cognitive 29) packages/live_providers/lib/src/providers/bilibili/bilibili_mapper.dart:166— BilibiliMapper.mapPlayUrls has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 5 (11 pts), ternaries 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatMapper.mapRoomDetail (cognitive 29) packages/live_providers/lib/src/providers/stripchat/stripchat_mapper.dart:375— StripchatMapper.mapRoomDetail has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17, boolean chains 7, ternaries 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.
LoadFollowWatchlistUseCase._inspectFollow (cognitive 27) apps/main_app/lib/src/features/library/application/load_follow_watchlist_use_case.dart:229— LoadFollowWatchlistUseCase._inspectFollow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (16 pts), error handling 2 (5 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoomPlaybackController._setPlaybackSourceWithMdkRecovery (cognitive 27) apps/main_app/lib/src/features/room/application/room_playback_controller.dart:531— RoomPlaybackController._setPlaybackSourceWithMdkRecovery has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 1 (3 pts), loops 1 (2 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.
TwitchAdGuardProxy._handleRequest (cognitive 27) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:355— TwitchAdGuardProxy._handleRequest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, 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.
StripchatMapper.mapCategories (cognitive 27) packages/live_providers/lib/src/providers/stripchat/stripchat_mapper.dart:190— StripchatMapper.mapCategories has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (7 pts), ternaries 1 (4 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.
_0xb48e77 (cognitive 27) REDACTED:6696— _0xb48e77 has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (6 pts), boolean chains 5 (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. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
RoomChatPanel.build (cognitive 26) apps/main_app/lib/src/features/room/presentation/room_preview_page_chat_panels.dart:98— RoomChatPanel.build has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (20 pts), boolean chains 3, if/else 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChaturbateLiveDataSource._tryFetchRoomPageBootstrap (cognitive 26) packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:312— ChaturbateLiveDataSource._tryFetchRoomPageBootstrap has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 4 (8 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_0x151762 (cognitive 26) REDACTED:1347— _0x151762 has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (10 pts), if/else 4 (5 pts), match/switch 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. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x532596 (cognitive 26) REDACTED:4311— _0x532596 has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
RoomPlaybackFailoverCoordinator._handleUnexpectedPlaybackStopBody (cognitive 25) apps/main_app/lib/src/features/room/application/room_playback_failover_coordinator.dart:119— RoomPlaybackFailoverCoordinator._handleUnexpectedPlaybackStopBody has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 3, 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.
RoomFullscreenSessionController.applyFullscreenSystemUi (cognitive 25) apps/main_app/lib/src/features/room/presentation/room_fullscreen_session_controller.dart:399— RoomFullscreenSessionController.applyFullscreenSystemUi has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (7 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.
StripchatLlHlsProxy._buildCachedOnlyPlaylist (cognitive 25) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1809— StripchatLlHlsProxy._buildCachedOnlyPlaylist has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (24 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.
MdkPlayer.setSource (cognitive 25) packages/live_player/lib/src/mdk_player.dart:119— MdkPlayer.setSource has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (21 pts), match/switch 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
BilibiliLiveDataSource._fallbackRecommendRooms (cognitive 25) packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:204— BilibiliLiveDataSource._fallbackRecommendRooms has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), error handling 3 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_0x872852 (cognitive 25) REDACTED:3530— _0x872852 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 4, loops 1 (nesting depth added 13). Of this number, 24 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_LibraryPageState._buildBody (cognitive 24) apps/main_app/lib/src/features/library/presentation/library_page.dart:799— _LibraryPageState._buildBody has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 8 (11 pts), boolean chains 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.
RoomDanmakuController.bindSession (cognitive 24) apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart:289— RoomDanmakuController.bindSession has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, error handling 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.
PushLocalSyncSnapshotUseCase.call (cognitive 24) apps/main_app/lib/src/features/sync/application/manage_local_sync_use_case.dart:22— PushLocalSyncSnapshotUseCase.call has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (10 pts), loops 3 (6 pts), if/else 3 (5 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._fetchPlaylistWithFallbacks (cognitive 24) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2644— StripchatLlHlsProxy._fetchPlaylistWithFallbacks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (6 pts), boolean chains 2, loops 2, 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.
FollowWatchEntry.isPasswordProtected (cognitive 23) apps/main_app/lib/src/shared/domain/follow_watch_entry.dart:83— FollowWatchEntry.isPasswordProtected has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._prefetchAssetOnce (cognitive 23) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2220— StripchatLlHlsProxy._prefetchAssetOnce has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7 (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.
TarsInputStream.readBytes (cognitive 23) packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:420— TarsInputStream.readBytes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 1 (3 pts), loops 1 (3 pts), match/switch 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.
YouTubeDecipherService.decryptUrl (cognitive 23) packages/live_providers/lib/src/providers/youtube/youtube_decipher_service.dart:27— YouTubeDecipherService.decryptUrl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 1 (4 pts), loops 1 (3 pts), 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.
RoomFollowActionCoordinator.toggleCurrentRoomFollow (cognitive 22) apps/main_app/lib/src/features/room/presentation/room_follow_action_coordinator.dart:50— RoomFollowActionCoordinator.toggleCurrentRoomFollow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5 (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.
RoomFullscreenBottomChrome.build (cognitive 22) apps/main_app/lib/src/features/room/presentation/widgets/room_fullscreen_overlay.dart:481— RoomFullscreenBottomChrome.build has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 20, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CredentialMigrationBundleCodec.decode (cognitive 22) apps/main_app/lib/src/features/settings/application/credential_migration_bundle.dart:84— CredentialMigrationBundleCodec.decode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 1 (2 pts), 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.
_FollowStatusPresentation.resolve (cognitive 22) apps/main_app/lib/src/shared/presentation/widgets/follow_watch_row.dart:909— _FollowStatusPresentation.resolve has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (18 pts), if/else 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChaturbateWebRoomDetailLoader._loadWithWebView (cognitive 22) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:117— ChaturbateWebRoomDetailLoader._loadWithWebView has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (14 pts), error handling 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._shouldDropMapForPlaylist (cognitive 22) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:3238— StripchatLlHlsProxy._shouldDropMapForPlaylist has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (3 pts), error handling 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.
StripchatDanmakuSession._handleLine (cognitive 22) packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:318— StripchatDanmakuSession._handleLine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, error handling 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TarsInputStream.readMap (cognitive 22) packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:476— TarsInputStream.readMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (3 pts) (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.
DouyinMapper.mapPlayQualities (cognitive 22) packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:165— DouyinMapper.mapPlayQualities has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FollowRecord.== (cognitive 22) packages/live_storage/lib/src/models/follow_record.dart:108— FollowRecord.== has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, if/else 4 (5 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_0x43bce4 (cognitive 22) REDACTED:526— _0x43bce4 has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (10 pts), boolean chains 6, if/else 2 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x19d66a (cognitive 22) REDACTED:1758— _0x19d66a has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (3 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x5bbaf0 (cognitive 22) REDACTED:5011— _0x5bbaf0 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 5034, a function literal at line 5015, a function literal at line 5028, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_LibraryPageState._refresh (cognitive 21) apps/main_app/lib/src/features/library/presentation/library_page.dart:356— _LibraryPageState._refresh has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, 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.
RoomFullscreenChromeController.scheduleFullscreenChromeAutoHide (cognitive 21) apps/main_app/lib/src/features/room/presentation/room_fullscreen_chrome_controller.dart:184— RoomFullscreenChromeController.scheduleFullscreenChromeAutoHide has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (7 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.
ChaturbateLlHlsProxy._parseMediaPlaylist (cognitive 21) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:964— ChaturbateLlHlsProxy._parseMediaPlaylist has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 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.
ChaturbateDanmakuSession._handleRawMessage (cognitive 21) packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:319— ChaturbateDanmakuSession._handleRawMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (2 pts), boolean chains 1, error handling 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.
TarsInputStream.readMapList (cognitive 21) packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:520— TarsInputStream.readMapList has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (3 pts) (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. This shape REPEATS in the file: one other method here (TarsInputStream.readMapMap) 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.
TarsInputStream.readMapMap (cognitive 21) packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:562— TarsInputStream.readMapMap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (3 pts) (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. This shape REPEATS in the file: one other method here (TarsInputStream.readMapList) 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.
_0x2c9158 (cognitive 21) REDACTED:2717— _0x2c9158 has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, ternaries 2 (6 pts), if/else 4 (5 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. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x1d26db (cognitive 21) REDACTED:5626— _0x1d26db has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_ProviderCategoriesTabState.build (cognitive 20) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:462— _ProviderCategoriesTabState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 5 (6 pts), boolean chains 4, 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.
ResolvePlaySourceUseCase.call (cognitive 20) apps/main_app/lib/src/features/room/application/resolve_play_source_use_case.dart:41— ResolvePlaySourceUseCase.call has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (6 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.
RoomFullscreenSessionController.applyFullscreenControlsLock (cognitive 20) apps/main_app/lib/src/features/room/presentation/room_fullscreen_session_controller.dart:537— RoomFullscreenSessionController.applyFullscreenControlsLock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, 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.
ChaturbateLlHlsProxy._awaitAssetPayloadForServe (cognitive 20) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:1792— ChaturbateLlHlsProxy._awaitAssetPayloadForServe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (3 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._prewarmAutoMediaVariants (cognitive 20) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2383— StripchatLlHlsProxy._prewarmAutoMediaVariants has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, ternaries 1 (2 pts), error handling 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.
DanmakuIsolateParseOutput.fromWire (cognitive 20) packages/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:100— DanmakuIsolateParseOutput.fromWire has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (8 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YouTubeDanmakuSession._pump (cognitive 20) packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:83— YouTubeDanmakuSession._pump has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChaturbateLiveDataSource.fetchRoomDetail (cognitive 20) packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:169— ChaturbateLiveDataSource.fetchRoomDetail has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 3 (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.
(anonymous) (cognitive 20) REDACTED:404— (anonymous) has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, ternaries 6 (7 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x2e4b86 (cognitive 20) REDACTED:1806— _0x2e4b86 has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), loops 2 (5 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x25bfe1 (cognitive 20) REDACTED:4386— _0x25bfe1 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, match/switch 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. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x2d2578 (cognitive 20) REDACTED:6314— _0x2d2578 has cognitive complexity 20 (threshold 15). Drivers by points: error handling 4 (8 pts), ternaries 2 (5 pts), if/else 3 (4 pts), boolean chains 3 (nesting depth added 8). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 6315, 6332, 6348, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
LoadProviderHighlightsUseCase._loadForDescriptor (cognitive 19) apps/main_app/lib/src/features/browse/application/load_provider_highlights_use_case.dart:40— LoadProviderHighlightsUseCase._loadForDescriptor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 2 (5 pts), loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RoomPlaybackController.schedulePlaybackBootstrap (cognitive 19) apps/main_app/lib/src/features/room/application/room_playback_controller.dart:150— RoomPlaybackController.schedulePlaybackBootstrap has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (9 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_FollowSettingsPageState.build (cognitive 19) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:340— _FollowSettingsPageState.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10 (11 pts), if/else 5, loops 1 (2 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StripchatLlHlsProxy.wrapPlayUrls (cognitive 19) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:123— StripchatLlHlsProxy.wrapPlayUrls has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (5 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._awaitSpecificAssetsWarm (cognitive 19) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1708— StripchatLlHlsProxy._awaitSpecificAssetsWarm has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwitchAdGuardProxy._prewarmAutoVariantGroups (cognitive 19) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:527— TwitchAdGuardProxy._prewarmAutoVariantGroups has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_DanmakuParserWorker._handleMessage (cognitive 19) packages/live_providers/lib/src/danmaku/isolate_danmaku_session.dart:253— _DanmakuParserWorker._handleMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8 (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.
_0x1d9867.getMetadata (cognitive 19) REDACTED:482— _0x1d9867.getMetadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (19 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x58210c (cognitive 19) REDACTED:6074— _0x58210c has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
LinuxDesktopWebLoginSession._mergeDocumentCookies (cognitive 18) apps/main_app/lib/src/app/runtime_bridges/linux_desktop_webview_adapter.dart:445— LinuxDesktopWebLoginSession._mergeDocumentCookies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 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.
RoomDanmakuController._attemptDanmakuReconnect (cognitive 18) apps/main_app/lib/src/features/room/application/room_danmaku_controller.dart:690— RoomDanmakuController._attemptDanmakuReconnect has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), error handling 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RoomViewUiState.== (cognitive 18) apps/main_app/lib/src/features/room/application/room_view_ui_state.dart:100— RoomViewUiState.== has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 18. 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.
RoomPictureInPictureCoordinator.enterPictureInPicture (cognitive 18) apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart:95— RoomPictureInPictureCoordinator.enterPictureInPicture has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, error handling 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.
_PlayerSettingsPageState.build (cognitive 18) apps/main_app/lib/src/features/settings/presentation/player_settings_page.dart:84— _PlayerSettingsPageState.build has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 3 (4 pts), loops 4, boolean chains 2 (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.
_RustDanmakuBatchMask.allowListBatch (cognitive 18) apps/main_app/lib/src/rust/danmaku_batch_mask_ffi.dart:91— _RustDanmakuBatchMask.allowListBatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 1 (2 pts), error handling 1, match/switch 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.
ChaturbateLlHlsProxy._resolveStartupSegmentsForInitialPlaylist (cognitive 18) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:1106— ChaturbateLlHlsProxy._resolveStartupSegmentsForInitialPlaylist has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, ternaries 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.
StripchatLlHlsProxy._prefetchAsset (cognitive 18) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2172— StripchatLlHlsProxy._prefetchAsset has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwitchProxyResponseGate.streamChunks (cognitive 18) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1352— TwitchProxyResponseGate.streamChunks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChaturbateMapper.mapDanmakuPayload (cognitive 18) packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:535— ChaturbateMapper.mapDanmakuPayload has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (7 pts), 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.
HuyaMapper._extractJsonObject (cognitive 18) packages/live_providers/lib/src/providers/huya/huya_mapper.dart:230— HuyaMapper._extractJsonObject has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YouTubePageParser._scanJsonValue (cognitive 18) packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:300— YouTubePageParser._scanJsonValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SyncSnapshotJsonCodec._decodeHistory (cognitive 18) packages/live_sync/lib/src/model/sync_snapshot_codec.dart:106— SyncSnapshotJsonCodec._decodeHistory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 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.
_0xdaf8f6::decorateConstructor (cognitive 18) REDACTED:3368— _0xdaf8f6::decorateConstructor has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 2 (7 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x45fbef (cognitive 18) REDACTED:4343— _0x45fbef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_HomeProviderFeedTabState._loadRecommendPageWithRetry (cognitive 17) apps/main_app/lib/src/features/home/presentation/home_page.dart:433— _HomeProviderFeedTabState._loadRecommendPageWithRetry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImportFollowListJsonUseCase.call (cognitive 17) apps/main_app/lib/src/features/library/application/manage_follow_transfer_use_case.dart:51— ImportFollowListJsonUseCase.call has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 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.
_PersistedImageCache._refresh (cognitive 17) apps/main_app/lib/src/shared/presentation/widgets/persisted_network_image.dart:228— _PersistedImageCache._refresh has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4 (7 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.
StripchatMouflonKeyCache.mergeRecords (cognitive 17) packages/live_hls_proxy/lib/src/stripchat/stripchat_mouflon_key_cache.dart:250— StripchatMouflonKeyCache.mergeRecords has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (3 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwitchAdGuardProxy._writeVariantPlaylist (cognitive 17) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:461— TwitchAdGuardProxy._writeVariantPlaylist has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7 (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.
MpvPlayer._escalateArcDecodeTierAndReplay (cognitive 17) packages/live_player/lib/src/mpv_player.dart:952— MpvPlayer._escalateArcDecodeTierAndReplay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatDanmakuSession._replayHistory (cognitive 17) packages/live_providers/lib/src/danmaku/stripchat_danmaku_session.dart:387— StripchatDanmakuSession._replayHistory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 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.
TarsInputStream.read (cognitive 17) packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:271— TarsInputStream.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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.
TarsOutputStream.write (cognitive 17) packages/live_providers/lib/src/danmaku/tars/codec/tars_output_stream.dart:81— TarsOutputStream.write has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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.
_0x32dfd4 (cognitive 17) REDACTED:637— _0x32dfd4 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 pts), boolean chains 5 (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 file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_ProviderCategoriesPageState._loadCategories (cognitive 16) apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:81— _ProviderCategoriesPageState._loadCategories has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 pts), 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.
ImportFollowListJsonUseCase._restoreFollowImportSnapshot (cognitive 16) apps/main_app/lib/src/features/library/application/manage_follow_transfer_use_case.dart:106— ImportFollowListJsonUseCase._restoreFollowImportSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (11 pts), loops 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DanmakuPreferences.== (cognitive 16) apps/main_app/lib/src/features/settings/application/manage_danmaku_preferences_use_case.dart:106— DanmakuPreferences.== has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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.
_WebCookieLoginPageState.build (cognitive 16) apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:347— _WebCookieLoginPageState.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 2 (3 pts), ternaries 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FlutterSecureCredentialStore.open (cognitive 16) apps/main_app/lib/src/shared/application/secure_credential_store.dart:145— FlutterSecureCredentialStore.open has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LiveRoomDetail.== (cognitive 16) packages/live_core/lib/src/model/live_room_detail.dart:49— LiveRoomDetail.== has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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.
ChaturbateLlHlsProxy._handleRequest (cognitive 16) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:499— ChaturbateLlHlsProxy._handleRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 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.
ChaturbateLlHlsProxy._selectVariantForQuality (cognitive 16) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2167— ChaturbateLlHlsProxy._selectVariantForQuality has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._awaitStripchatEdgeWarm (cognitive 16) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:1908— StripchatLlHlsProxy._awaitStripchatEdgeWarm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, 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.
StripchatLlHlsProxy._resolveDecodedBridgeUri (cognitive 16) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2497— StripchatLlHlsProxy._resolveDecodedBridgeUri has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StripchatLlHlsProxy._collapseMasterToPreferredMediaPlaylist (cognitive 16) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2744— StripchatLlHlsProxy._collapseMasterToPreferredMediaPlaylist has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 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.
TwitchProxyResponseGate.pipeUpstream (cognitive 16) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1315— TwitchProxyResponseGate.pipeUpstream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MpvPlayer._openSourceUnlocked (cognitive 16) packages/live_player/lib/src/mpv_player.dart:1003— MpvPlayer._openSourceUnlocked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 5, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DouyuDanmakuSession._sttToJson (cognitive 16) packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:289— DouyuDanmakuSession._sttToJson has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), 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.
BilibiliLiveDataSource._fetchRoomPlayInfo (cognitive 16) packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:456— BilibiliLiveDataSource._fetchRoomPlayInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, error handling 1 (2 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.
ChaturbateMapper._selectVariantForQuality (cognitive 16) packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:451— ChaturbateMapper._selectVariantForQuality has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpStripchatApiClient.probePlaybackPlaylist (cognitive 16) packages/live_providers/lib/src/providers/stripchat/stripchat_api_client.dart:409— HttpStripchatApiClient.probePlaybackPlaylist has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_0xed525b (cognitive 16) REDACTED:1448— _0xed525b has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 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. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
_0x2195cd (cognitive 16) REDACTED:6040— _0x2195cd has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: REDACTED holds 32 of the 157 methods over the threshold — including the worst — and 993 of the 2753 points over it (36%), 2.4× the next-largest file (packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart at 414). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D4 · Code Duplication· Edited copy of a member (93 corresponding lines) · ×1
Edited copy of a member (93 corresponding lines) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:27— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:27-119 | apps/main_app/lib/src/features/home/presentation/home_page.dart:27-134 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:34— packages/live_providers/lib/src/providers/twitch/twitch_hls_master_playlist_parser.dart:34-94 | packages/live_providers/lib/src/providers/youtube/youtube_hls_master_playlist_parser.dart:71-147 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) packages/live_storage/lib/src/persistence/local_storage_file_store.dart:705— packages/live_storage/lib/src/persistence/local_storage_file_store.dart:705-740 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:183-215 — 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 (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:219— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:219-283 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:224-282 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2167— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2167-2205 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:451-488 — 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 (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:167— apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:167-207 | apps/main_app/lib/src/features/settings/presentation/layout_settings_page.dart:229-285 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:211— packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:211-264 | packages/live_providers/lib/src/providers/youtube/youtube_api_client.dart:266-309 — 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 copies of one member (3 members, 30+ corresponding lines) · ×1
Edited copies of one member (3 members, 30+ corresponding lines) packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:11— packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:11-40 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:42-75 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:77-108 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) apps/main_app/lib/src/features/room/application/room_view_ui_state.dart:46— apps/main_app/lib/src/features/room/application/room_view_ui_state.dart:46-98 | apps/main_app/lib/src/features/room/presentation/room_preview_page_player_surface.dart:194-247 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) apps/main_app/lib/src/features/library/presentation/library_page.dart:474— apps/main_app/lib/src/features/library/presentation/library_page.dart:474-502 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:305-338 — 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 (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1315— packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1315-1350 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1352-1393 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 33+ corresponding lines) · ×1
Edited copies of one member (3 members, 33+ corresponding lines) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:126— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:126-158 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:49-82 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:84-130 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:400— apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:400-443 | apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:445-484 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) apps/main_app/lib/src/features/home/presentation/home_page.dart:313— apps/main_app/lib/src/features/home/presentation/home_page.dart:313-357 | apps/main_app/lib/src/features/home/presentation/home_page.dart:359-400 — 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 (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:160— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:160-189 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:132-169 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 35+ corresponding lines) · ×1
Edited copies of one member (3 members, 35+ corresponding lines) apps/main_app/lib/src/features/library/presentation/watch_history_page.dart:74— apps/main_app/lib/src/features/library/presentation/watch_history_page.dart:74-108 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:438-477 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:479-516 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or 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, 37+ corresponding lines) · ×1
Edited copies of one member (4 members, 37+ corresponding lines) apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:21— apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:21-57 | apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:63-110 | apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:116-163 | apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:169-206 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) apps/main_app/lib/src/features/settings/presentation/linux_desktop_web_login_page.dart:131— apps/main_app/lib/src/features/settings/presentation/linux_desktop_web_login_page.dart:131-154 | apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:305-333 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 29+ corresponding lines) · ×1
Edited copies of one member (3 members, 29+ corresponding lines) packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:267— packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:267-302 | packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:250-278 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:127-155 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) packages/live_providers/lib/src/providers/twitch/twitch_graphql_client.dart:107— packages/live_providers/lib/src/providers/twitch/twitch_graphql_client.dart:107-138 | packages/live_providers/lib/src/providers/twitch/twitch_graphql_client.dart:167-198 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) packages/live_player/lib/src/memory_player.dart:72— packages/live_player/lib/src/memory_player.dart:72-97 | packages/live_player/lib/src/simulated_backend_player.dart:87-114 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:129— packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:129-146 | packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:164-181 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:126-143 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:119-135 — 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, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:152— packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:152-169 | packages/live_providers/lib/src/providers/stripchat/stripchat_preview_data_source.dart:168-184 | packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:190-210 — 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 copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:739— apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:739-766 | apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:768-794 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 26+ corresponding lines) · ×1
Edited copies of one member (3 members, 26+ corresponding lines) apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:486— apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:486-511 | apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:513-539 | apps/main_app/lib/src/features/settings/application/manage_provider_accounts_use_case.dart:589-616 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 20+ corresponding lines) · ×1
Edited copies of one member (5 members, 20+ corresponding lines) packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:229— packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:229-249 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:251-273 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:275-294 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:296-315 | packages/live_providers/lib/src/danmaku/youtube_danmaku_session.dart:338-358 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:160— packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:160-180 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:268-289 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_api_client.dart:291-314 — 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, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:113— packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:113-127 | packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:172-188 | packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:168-180 — 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 (4 members, 20+ corresponding lines) · ×1
Edited copies of one member (4 members, 20+ corresponding lines) packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:228— packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:228-250 | packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:512-531 | packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:238-258 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:176-195 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 17+ corresponding lines) · ×1
Edited copies of one member (5 members, 17+ corresponding lines) apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:85— apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:85-106 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:108-124 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:126-143 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:179-195 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:197-213 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 16+ corresponding lines) · ×1
Edited copies of one member (5 members, 16+ corresponding lines) apps/main_app/lib/src/shared/application/secure_credential_store.dart:555— apps/main_app/lib/src/shared/application/secure_credential_store.dart:555-570 | apps/main_app/lib/src/shared/application/secure_credential_store.dart:572-587 | apps/main_app/lib/src/shared/application/secure_credential_store.dart:589-604 | apps/main_app/lib/src/shared/application/secure_credential_store.dart:621-636 | apps/main_app/lib/src/shared/application/secure_credential_store.dart:638-653 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) apps/main_app/lib/src/features/room/presentation/room_page_ui_effects.dart:56— apps/main_app/lib/src/features/room/presentation/room_page_ui_effects.dart:56-71 | apps/main_app/lib/src/features/room/presentation/room_page_ui_effects.dart:104-119 | apps/main_app/lib/src/features/room/presentation/room_page_ui_effects.dart:121-136 | apps/main_app/lib/src/features/room/presentation/room_page_ui_effects.dart:138-151 — 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 (4 members, 8+ corresponding lines) · ×1
Edited copies of one member (4 members, 8+ corresponding lines) packages/live_storage/lib/src/repositories/file/file_follow_repository.dart:19— packages/live_storage/lib/src/repositories/file/file_follow_repository.dart:19-28 | packages/live_storage/lib/src/repositories/file/file_follow_repository.dart:37-46 | packages/live_storage/lib/src/repositories/file/file_history_repository.dart:38-47 | packages/live_storage/lib/src/repositories/in_memory/in_memory_follow_repository.dart:14-21 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2931— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:2931-2937 | packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:381-384 — 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· Edited copies of one member (3 members, 4+ corresponding lines) · ×1
Edited copies of one member (3 members, 4+ corresponding lines) packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:709— packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:709-712 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:352-355 | packages/live_sync/lib/src/model/sync_snapshot_codec.dart:229-232 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×1
Edited copies of one member (3 members, 3+ corresponding lines) apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:399— apps/main_app/lib/src/features/category/presentation/provider_categories_page.dart:399-401 | apps/main_app/lib/src/features/home/presentation/home_page.dart:520-522 | apps/main_app/lib/src/features/search/presentation/search_page.dart:409-411 — 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.
Duplicated block (46–48 lines × 2) apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:150— apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:150-197 | apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:277-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:198` calls `Divider` and `apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:323` 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 (34 lines × 2) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:347— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:347-380 | packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:780-813 — before extracting anything, compare `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart` and `packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart` as WHOLE FILES: this scan already matched 6 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (32 lines × 2) apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:179— apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:179-210 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:55-86 — before extracting anything, compare `apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart` and `apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:179` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (29–30 lines × 2) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:51— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:51-79 | apps/main_app/lib/src/features/home/presentation/home_page.dart:52-81 — before extracting anything, compare `apps/main_app/lib/src/features/browse/presentation/browse_page.dart` and `apps/main_app/lib/src/features/home/presentation/home_page.dart` as WHOLE FILES: this scan already matched 5 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. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/browse/presentation/browse_page.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. 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, `apps/main_app/lib/src/features/home/presentation/home_page.dart:50` calls `Scaffold`, `Center`, `Text` and `apps/main_app/lib/src/features/browse/presentation/browse_page.dart:50` 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 (29 lines × 5) packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:149— packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:149-177 | packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:115-143 | packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:73-101 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:56-84 | packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart:63-91 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/twitch_danmaku_session.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (28 lines × 2) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:1124— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:1124-1151 | packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:1514-1541 — both copies are in the same file, so extract the 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 (26–27 lines × 2) apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:233— apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:233-259 | apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:339-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/room/presentation/room_preview_page_sections.dart:339` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:21— apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:21-47 | apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.dart:169-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/main_app/lib/src/features/settings/presentation/provider_web_login_pages.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. The matched lines also transfer control out of the body holding them, which cannot 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–25 lines × 3) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:393— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:393-416 | packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:355-378 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:138-162 — `packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart` and `packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.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 60 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 (25 lines × 2) packages/live_providers/lib/src/providers/youtube/youtube_playback_extractor.dart:100— packages/live_providers/lib/src/providers/youtube/youtube_playback_extractor.dart:100-124 | packages/live_providers/lib/src/providers/youtube/youtube_playback_extractor.dart:127-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/live_providers/lib/src/providers/youtube/youtube_playback_extractor.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. The matched lines also transfer control out of the body holding them, which cannot 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–23 lines × 2) packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:196— packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:196-217 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:257-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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 (20–22 lines × 2) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:139— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:139-158 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:61-82 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart` as WHOLE FILES: this scan already matched 6 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 `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:139` 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 (21–22 lines × 2) packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1321— packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1321-1341 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1359-1380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1321` it begins part-way through the construct above it, so those 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/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1358` calls `Function` and `packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:1320` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (22 lines × 2) packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:51— packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:51-72 | packages/live_providers/lib/src/providers/youtube/youtube_playback_data_source.dart:74-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:54— packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:54-72 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:87-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.
Duplicated block (16–18 lines × 2) packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:132— packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:132-147 | packages/live_providers/lib/src/providers/stripchat/stripchat_provider.dart:127-144 — `packages/live_providers/lib/src/providers/bilibili/bilibili_provider.dart` and `packages/live_providers/lib/src/providers/stripchat/stripchat_provider.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 49 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/live_providers/lib/src/providers/bilibili/bilibili_provider.dart:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 4) apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:209— apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:209-224 | apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:265-280 | apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:291-306 | apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:338-353 — 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 `apps/main_app/lib/src/features/room/application/room_twitch_recovery_controller.dart:209` it begins part-way through the construct above it, so those exact 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–16 lines × 4) packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:131— packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:131-146 | packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:166-181 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:128-143 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:121-135 — `packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart` and `packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.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 5 separate duplicated blocks between them, totalling at least 62 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/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:131` 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–14 lines × 3) apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:137— apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:137-148 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:59-72 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:105-118 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart` as WHOLE FILES: this scan already matched 6 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 `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:120` calls `_showSnack` and `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:149` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 4) apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:529— apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:529-541 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:563-575 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:600-612 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:634-646 — 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 `apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:529` it begins part-way through the construct above it, so those exact lines 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) apps/main_app/lib/src/features/home/presentation/home_page.dart:27— apps/main_app/lib/src/features/home/presentation/home_page.dart:27-39 | apps/main_app/lib/src/features/search/presentation/search_page.dart:72-83 — before extracting anything, compare `apps/main_app/lib/src/features/home/presentation/home_page.dart` and `apps/main_app/lib/src/features/search/presentation/search_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `apps/main_app/lib/src/features/home/presentation/home_page.dart:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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 (12 lines × 5) packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:569— packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:569-580 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:596-607 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1155-1166 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1326-1337 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:116-127 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.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. The matched lines also transfer control out of the body holding them, which cannot 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–12 lines × 2) packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:389— packages/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:389-398 | packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.dart:175-186 — 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/live_hls_proxy/lib/src/stripchat/stripchat_llhls_proxy.dart:389` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 13) apps/main_app/lib/src/features/library/presentation/library_page.dart:445— apps/main_app/lib/src/features/library/presentation/library_page.dart:445-454 | apps/main_app/lib/src/features/library/presentation/library_page.dart:485-495 | apps/main_app/lib/src/features/library/presentation/library_page.dart:561-571 | apps/main_app/lib/src/features/library/presentation/watch_history_page.dart:85-94 | apps/main_app/lib/src/features/profile/presentation/profile_page.dart:108-118 | apps/main_app/lib/src/features/settings/presentation/account_settings_page.dart:63-72 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:317-327 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:242-252 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:446-456 | apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart:486-495 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:253-263 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:560-570 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:104-114 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/settings/presentation/other_settings_page.dart` as WHOLE FILES: this scan already matched 6 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 `apps/main_app/lib/src/features/library/presentation/library_page.dart:485` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 7) packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:129— packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:129-139 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:152-162 | packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:164-174 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:126-136 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:119-129 | packages/live_providers/lib/src/providers/stripchat/stripchat_preview_data_source.dart:168-178 | packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:198-208 — `packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart` and `packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.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 33 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/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:164` calls `toLowerCase`, `contains` and `packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:141` 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 × 6) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:227— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:227-237 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:572-582 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:599-609 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1158-1168 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_live_data_source.dart:1329-1339 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_mapper.dart:119-129 — there are 6 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9–11 lines × 2) packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:172— packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:172-182 | packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:168-176 — `packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.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 43 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/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:172` it does not close everything it opens, so those 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/live_providers/lib/src/providers/youtube/youtube_browse_data_source.dart:86— packages/live_providers/lib/src/providers/youtube/youtube_browse_data_source.dart:86-96 | packages/live_providers/lib/src/providers/youtube/youtube_browse_data_source.dart:153-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/live_providers/lib/src/providers/youtube/youtube_browse_data_source.dart:86` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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 (10 lines × 5) packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:15— packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:15-24 | packages/live_providers/lib/src/providers/bilibili/bilibili_transport.dart:92-101 | packages/live_providers/lib/src/providers/douyin/douyin_transport.dart:33-42 | packages/live_providers/lib/src/providers/douyu/douyu_transport.dart:22-31 | packages/live_providers/lib/src/providers/huya/huya_transport.dart:15-24 — `packages/live_providers/lib/src/providers/douyu/douyu_transport.dart` and `packages/live_providers/lib/src/providers/huya/huya_transport.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 30 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/live_providers/lib/src/providers/bilibili/bilibili_transport.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.
Duplicated block (10 lines × 4) packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:103— packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:103-112 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:133-142 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:100-109 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:93-102 — `packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart` and `packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.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 33 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 (9–10 lines × 2) apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:303— apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:303-311 | apps/main_app/lib/src/features/room/presentation/room_preview_page.dart:1383-1392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 5) packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:248— packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:248-256 | packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:117-125 | packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:152-160 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:114-122 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:107-115 — `packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart` and `packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.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 5 separate duplicated blocks between them, totalling at least 62 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/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:248` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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 × 4) packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:209— packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:209-217 | packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:245-253 | packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart:181-189 | packages/live_providers/lib/src/danmaku/huya_danmaku_session.dart:174-182 — before extracting anything, compare `packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart` and `packages/live_providers/lib/src/danmaku/huya_danmaku_session.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. If that is what happened, the fix is to keep one copy and have the 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/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:244` calls `ping` and `packages/live_providers/lib/src/danmaku/bilibili_danmaku_session.dart:208` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 6) packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2114— packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2114-2121 | packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart:335-342 | packages/live_providers/lib/src/providers/youtube/youtube_mapper.dart:277-284 | packages/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:103-110 | packages/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:210-217 | packages/live_providers/lib/src/providers/youtube/youtube_playback_source.dart:222-229 — `packages/live_providers/lib/src/providers/twitch/twitch_mapper.dart` and `packages/live_providers/lib/src/providers/youtube/youtube_mapper.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 5 separate duplicated blocks between them, totalling at least 53 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 (8 lines × 5) apps/main_app/lib/src/features/browse/presentation/browse_page.dart:470— apps/main_app/lib/src/features/browse/presentation/browse_page.dart:470-477 | apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:347-354 | apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart:63-70 | apps/main_app/lib/src/features/sync/presentation/sync_local_page.dart:647-654 | apps/main_app/lib/src/features/sync/presentation/sync_webdav_page.dart:204-211 — before extracting anything, compare `apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart` and `apps/main_app/lib/src/features/sync/presentation/sync_center_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `apps/main_app/lib/src/features/browse/presentation/browse_page.dart:470` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:144— packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:144-150 | packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:190-196 | packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:182-188 — `packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart` and `packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.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 30 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 (4–7 lines × 3) packages/live_providers/lib/src/providers/bilibili/bilibili_mapper.dart:152— packages/live_providers/lib/src/providers/bilibili/bilibili_mapper.dart:152-158 | packages/live_providers/lib/src/providers/douyin/douyin_mapper.dart:245-248 | packages/live_providers/lib/src/providers/huya/huya_mapper.dart:217-223 — 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/live_providers/lib/src/providers/bilibili/bilibili_mapper.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.
Duplicated block (6 lines × 5) packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:551— packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:551-556 | packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:558-563 | packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:706-711 | packages/live_providers/lib/src/providers/bilibili/bilibili_sign_service.dart:286-291 | packages/live_providers/lib/src/providers/bilibili/bilibili_sign_service.dart:293-298 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 8) packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:148— packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart:148-159 | packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.dart:171-182 | packages/live_providers/lib/src/providers/douyin/douyin_preview_data_source.dart:183-193 | packages/live_providers/lib/src/providers/douyu/douyu_preview_data_source.dart:145-155 | packages/live_providers/lib/src/providers/huya/huya_preview_data_source.dart:137-147 | packages/live_providers/lib/src/providers/stripchat/stripchat_preview_data_source.dart:186-196 | packages/live_providers/lib/src/providers/twitch/twitch_preview_data_source.dart:217-227 | packages/live_providers/lib/src/providers/youtube/youtube_preview_data_source.dart:212-223 — `packages/live_providers/lib/src/providers/bilibili/bilibili_preview_data_source.dart` and `packages/live_providers/lib/src/providers/chaturbate/chaturbate_preview_data_source.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 33 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.
Hollow method — returns a constant without doing the work apps/main_app/lib/src/features/room/application/twitch_playback_recovery.dart:157— `selectTwitchRecoveryQuality` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Duplicated predicate packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart:189— `!identical(_channel, channel) || !identical(_subscription, subscription)` appears character-identically in 3 files — packages/live_providers/lib/src/danmaku/douyin_danmaku_session.dart, packages/live_providers/lib/src/danmaku/douyu_danmaku_session.dart, packages/live_providers/lib/src/danmaku/huya_danmaku_session.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/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart:255— `!identical(_socket, socket) || !identical(_subscription, subscription)` appears character-identically in 2 files — packages/live_providers/lib/src/danmaku/chaturbate_danmaku_session.dart, packages/live_providers/lib/src/danmaku/twitch_danmaku_session.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 apps/main_app/lib/src/shared/application/secure_credential_store.dart:166— `!kIsWeb && defaultTargetPlatform == TargetPlatform.android` appears character-identically in 2 files — apps/main_app/lib/src/shared/application/secure_credential_store.dart, packages/live_player/lib/src/mpv_android_surface_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 apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart:32— `AppPlatformCapabilities.current().isWeb || AppPlatformCapabilities.current().isMobile` appears character-identically in 2 files — apps/main_app/lib/src/features/settings/presentation/follow_settings_page.dart, apps/main_app/lib/src/features/settings/presentation/other_settings_page.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 apps/main_app/lib/src/features/room/presentation/room_fullscreen_session_controller.dart:27— `PlaybackStatus.buffering || PlaybackStatus.playing || PlaybackStatus.paused || PlaybackStatus.completed || PlaybackStatus.error` appears character-identically in 6 files — apps/main_app/lib/src/features/room/presentation/room_fullscreen_session_controller.dart, apps/main_app/lib/src/features/room/presentation/room_picture_in_picture_coordinator.dart, apps/main_app/lib/src/shared/application/player_runtime_controller.dart, packages/live_player/lib/src/mpv_android_surface_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 apps/main_app/lib/src/app/bootstrap/bootstrap_internals.dart:541— `SensitiveSettingKeys.isTransferableCredentialKey(entry.key) && entry.value.trim().isNotEmpty` appears character-identically in 2 files — apps/main_app/lib/src/app/bootstrap/bootstrap_internals.dart, apps/main_app/lib/src/features/sync/application/manage_local_sync_use_case.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/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:138— `attempt < maxAttempts && _looksLikeTransientWebViewStartupFailure(error)` appears character-identically in 2 files — packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart, packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.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/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:406— `bootstrap == null || !bootstrap.isUsable` appears character-identically in 2 files — packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart, packages/live_providers/lib/src/providers/twitch/twitch_live_data_source.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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:77— `boxType.length != 4 || bytes.lengthInBytes < 8` appears character-identically in 2 files — packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart, packages/live_hls_proxy/lib/src/stripchat/stripchat_mouflon_runtime_support.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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:82— `bytes[index] == expected[0] && bytes[index + 1] == expected[1] && bytes[index + 2] == expected[2] && bytes[index + 3] == expected[3]` appears character-identically in 2 files — packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart, packages/live_hls_proxy/lib/src/stripchat/stripchat_mouflon_runtime_support.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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:1785— `cacheControl != null && cacheControl.isNotEmpty` appears character-identically in 2 files — packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart, packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.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 apps/main_app/lib/src/features/room/application/room_playback_controller.dart:525— `completer != null && !completer.isCompleted` appears character-identically in 6 files — apps/main_app/lib/src/features/room/application/room_playback_controller.dart, apps/main_app/lib/src/features/room/presentation/room_page_session_coordinator.dart, packages/live_player/lib/src/mpv_player_runtime_bindings.dart, packages/live_providers/lib/src/danmaku/isolate_danmaku_session.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 apps/main_app/lib/src/features/room/application/room_playback_controller.dart:501— `completer == null || completer.isCompleted` appears character-identically in 3 files — apps/main_app/lib/src/features/room/application/room_playback_controller.dart, packages/live_hls_proxy/lib/src/aes_worker.dart, packages/live_providers/lib/src/danmaku/isolate_danmaku_session.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 apps/main_app/lib/src/features/browse/presentation/browse_page.dart:202— `controller != null && !controller.indexIsChanging` appears character-identically in 2 files — apps/main_app/lib/src/features/browse/presentation/browse_page.dart, apps/main_app/lib/src/features/home/presentation/home_page.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 apps/main_app/lib/src/features/browse/presentation/browse_page.dart:211— `controller == null || controller.indexIsChanging` appears character-identically in 2 files — apps/main_app/lib/src/features/browse/presentation/browse_page.dart, apps/main_app/lib/src/features/home/presentation/home_page.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/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart:286— `data is TarsStruct || data == TarsStruct` appears character-identically in 2 files — packages/live_providers/lib/src/danmaku/tars/codec/tars_input_stream.dart, packages/live_providers/lib/src/danmaku/tars/codec/tars_output_stream.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 apps/main_app/lib/src/app/bootstrap/bootstrap_internals.dart:307— `displayName == null || displayName.isEmpty` appears character-identically in 2 files — apps/main_app/lib/src/app/bootstrap/bootstrap_internals.dart, packages/live_sync/lib/src/model/local_sync_peer_info.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/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart:2363— `entry.value.url == url && _mapEquals(entry.value.headers, headers)` appears character-identically in 2 files — packages/live_hls_proxy/lib/src/chaturbate/chaturbate_llhls_proxy.dart, packages/live_hls_proxy/lib/src/twitch/twitch_ad_guard_proxy.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/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart:51— `item.id.isNotEmpty && item.name.isNotEmpty` appears character-identically in 3 files — packages/live_providers/lib/src/providers/bilibili/bilibili_live_data_source.dart, packages/live_providers/lib/src/providers/douyu/douyu_live_data_source.dart, packages/live_providers/lib/src/providers/huya/huya_live_data_source.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 apps/main_app/lib/src/features/library/application/update_follow_tags_use_case.dart:23— `item.providerId == normalizedProviderId && item.roomId == roomId` appears character-identically in 5 files — apps/main_app/lib/src/features/library/application/update_follow_tags_use_case.dart, packages/live_storage/lib/src/repositories/file/file_follow_repository.dart, packages/live_storage/lib/src/repositories/file/file_history_repository.dart, packages/live_storage/lib/src/repositories/in_memory/in_memory_follow_repository.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/live_storage/lib/src/repositories/file/file_follow_repository.dart:53— `item.providerId == record.providerId && item.roomId == record.roomId` appears character-identically in 4 files — packages/live_storage/lib/src/repositories/file/file_follow_repository.dart, packages/live_storage/lib/src/repositories/file/file_history_repository.dart, packages/live_storage/lib/src/repositories/in_memory/in_memory_follow_repository.dart, packages/live_storage/lib/src/repositories/in_memory/in_memory_history_repository.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/live_storage/lib/src/persistence/local_storage_file_store.dart:700— `item.providerId.isNotEmpty && item.roomId.isNotEmpty` appears character-identically in 2 files — packages/live_storage/lib/src/persistence/local_storage_file_store.dart, packages/live_sync/lib/src/model/sync_snapshot_codec.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 apps/main_app/lib/src/features/settings/application/manage_snapshot_data_use_case.dart:262— `json.containsKey('settings') || json.containsKey('blocked_keywords') || json.containsKey('tags') || json.containsKey('history') || json.cont…` appears character-identically in 2 files — apps/main_app/lib/src/features/settings/application/manage_snapshot_data_use_case.dart, packages/live_sync/lib/src/model/sync_snapshot_codec.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/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart:475— `lastDisposeAt == null || _webViewRecreateCooldown == Duration.zero` appears character-identically in 2 files — packages/live_hls_proxy/lib/src/chaturbate/chaturbate_web_room_detail_loader.dart, packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.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 apps/main_app/lib/src/features/room/application/room_page_rebuild_scope.dart:84— `left.url == right.url && left.externalAudio?.url == right.externalAudio?.url && left.bufferProfile == right.bufferProfile` appears character-identically in 2 files — apps/main_app/lib/src/features/room/application/room_page_rebuild_scope.dart, apps/main_app/lib/src/features/room/application/room_page_session_state.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.
Hand-rolled JSON/XML parsing via regex packages/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:82— 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/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:85— 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/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:88— 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/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:91— 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/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:95— 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/live_providers/lib/src/providers/youtube/youtube_page_parser.dart:97— 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/live_providers/lib/src/providers/bilibili/bilibili_sign_service.dart:206— 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.
Fat interface: BasePlayer (16 abstract methods) packages/live_player/lib/src/base_player.dart:9— `BasePlayer` declares 16 abstract methods: `backend`, `states`, `diagnostics`, `currentState`, `currentDiagnostics`, `supportsEmbeddedView`, `supportsScreenshot`, `initialize`, `setSource`, `play`, `pause`, `stop`, `setVolume`, `captureScreenshot`, `buildView`, `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: Webview (28 abstract methods) third_party/desktop_webview_window/lib/src/webview.dart:20— `Webview` declares 28 abstract methods: `onClose`, `isNavigating`, `registerJavaScriptMessageHandler`, `unregisterJavaScriptMessageHandler`, `setPromptHandler`, `launch`, `setBrightness`, `addScriptToExecuteOnDocumentCreated`, `setApplicationNameForUserAgent`, `back`, `forward`, `setWebviewWindowVisibility`, `moveWebviewWindow`, `bringToForeground`, `getPositionalParameters`, `reload`, `stop`, `openDevToolsWindow`, `setOnHistoryChangedCallback`, `setOnUrlRequestCallback`, `addOnWebMessageReceivedCallback`, `removeOnWebMessageReceivedCallback`, `removeAllWebMessageReceivedCallback`, `close`, `evaluateJavaScript`, `postWebMessageAsString`, `postWebMessageAsJson`, `getAllCookies`. 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 · ×2
Projects may be oversized for their cohesion apps/main_app/pubspec.yaml:1— `apps/main_app` (55150 LoC, 338 module-visible types across 36 directories) overshoots its size bounds. 2 of 20 build unit(s) (Cargo, Gradle, SwiftPM, Xcode, pub) overshoot their size bounds, lowering Project Cohesion to 8.0/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/live_providers/pubspec.yaml:1— `packages/live_providers` (27525 LoC, 178 module-visible types across 15 directories) overshoots its size bounds. 2 of 20 build unit(s) (Cargo, Gradle, SwiftPM, Xcode, pub) overshoot their size bounds, lowering Project Cohesion to 8.0/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.
Silent fallback default in catch apps/main_app/lib/src/features/room/presentation/room_fullscreen_chrome_controller.dart:375— `_readScreenBrightness` turns every thrown error into `0.5` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
Silent fallback default in catch packages/live_hls_proxy/lib/src/twitch/twitch_web_playback_bridge.dart:843— `_asMap` turns every thrown error into `{}` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
No ADRs found apps/main_app/macos/Runner.xcodeproj/project.pbxproj: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 `apps/main_app/macos/Runner.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body packages/live_providers/lib/src/providers/youtube/youtube_decipher_service.dart:167— `disposeIsolate` has an empty body — confirm it's an intentional no-op and not an unfinished method.
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.
Logging is not universal — Only 4/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `apps/main_app`, `apps/main_app/ios`, `apps/main_app/macos`.
No SAST — 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 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation apps/main_app/rust/danmaku_mask/Cargo.toml:9— `apps/main_app/rust/danmaku_mask/Cargo.toml` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
No release approval gate REDACTED:104— The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
No app-layer HTTPS enforcement detected — This repository runs an HTTP server that is not bound to the loopback interface alone — or binds it at an address its source does not spell out — and nothing in its Dart source secures the transport: no `HttpServer.bindSecure` or `securityContext:`, no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: packages/live_sync/lib/src/local_sync/local_sync_server.dart:125 — `HttpServer.bind(`.
No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Dart server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: packages/live_sync/lib/src/local_sync/local_sync_server.dart:125 — `HttpServer.bind(`.
Silent fallback default on parse failure apps/main_app/lib/src/features/category/application/manage_favorite_category_tags_use_case.dart:102— `call` answers `[]` when `FormatException` is thrown, with no log or rethrow — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1ea9a-3a41-7ebc-b60d-5eb0b50651aa · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 19 · Warnings: 817 · Recommendations: 69 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 17:42 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.