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

HGODLK/BiliOne

Measured 17 November 2026, 07:22 UTC, at code version b126e49

First survey, so nothing to compare with yet
CAI score 43.0out of 100 Weak
CriticalWeakAdequateStrongExemplary

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

A large codebase: 108,681 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.7 person-years · Weakest lens: Production Readiness, 18.0

Findings by how serious they are

3 critical 825 serious 70 minor

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

This survey was produced by

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

42of 42 dimensions measured by tools.
891of 898 findings point to an exact file and line, so you can open each one in the code. The other 7 concern the repository as a whole, such as missing documentation.
42dimensions across 6 lenses, read from 108,681 lines of product code in 2 projects.
Chapters

Executive summary

HGODLK/BiliOne falls short of our standard for a preview release because two passwords or keys sit in the current code and we found no working pipeline that builds or tests changes to the code. It scores 43.0 out of 100 and is rated Weak, and all three of its critical findings are leaked passwords or keys.

Production Readiness, at 18.0, is the weakest lens and counts most in the score. The best first step is replacing the two exposed passwords or keys and switching the old ones off, worth about 19.4 points. Recording design decisions comes next, worth about 7.5 points. Raising Production Readiness to 62 would lift the score to about 60.8.

Two passwords or keys in the code and one in the code's history are open to anyone who can read the repository. Replacing each exposed password or key would close this risk.

The product code is 108,681 lines, about €100,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 18.0 · counts for 46%Maturity 49.9 · counts for 25%Code Health 72.2 · counts for 14%Security and Compliance 78.9 · counts for 8%Performance 85.7 · counts for 4%Architecture 89.8 · counts for 2%

If Production Readiness rose from 18.0 to 62, the lowest score rated Strong, the score would rise from 43.0 to about 60.8.

Code composition: what the lines of code are
Product code 90%Tests 10%
Rebuild cost: about €100,000 · Estimate
Cost to rebuild€35,000 to €170,000, for 580 to 1,841 hours of work, about 0.7 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 43. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 108,681 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

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

1
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2).
Raises the score by about 19.4 points · Low effort · REDACTED Scanning
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts.
Raises the score by about 7.5 points · Low effort · ADR Quality
3
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 9.9 points · Medium effort · CI/CD gates

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €100,000 to build again, about 0.7 person-years of work. Its weakest lens is Production Readiness, at 18.0 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 19.4 points for low effort, because it clears the 2 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 7% to 15% on every change. The history of the code shows how much it changes: about 242,015 lines over the last 90 days, which is about 981,505 lines a year. At that pace, the extra work comes to an estimated 162.5 to 975 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

186 modules, with 241 dependencies between them. One loop runs through 26 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 146 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 BangumiPlaybackStore2 BiliWebChromeClient3 FullscreenVideoController4 api.BiliPrivateMessageApi5 settings6 PlayerState7 api.ArticleBlock8 api.BiliArticleApi9 api.BiliDanmakuApi10 api.BiliVideoApi11 bangumi.BangumiPreviewPlayerViewModel12 feed.FeedExtractionResult13 live.LiveChatContent14 live.LiveHomeUiState15 live.LiveRoomViewModel16 video.DanmakuOverlayView17 feed18 article19 bangumi20 music.HomeMusicPlayerViewModel21 my.HistoryCardItem22 offline23 search24 music25 my26 ui27 ui.TransitionPhase28 video29 live30 api31 PlayerViewModel32 bangumi.BangumiExploreViewModel.FollowingPageResult33 dynamic34 offline.OfflineMediaManager35 profile36 video.InlineDanmakuSegment37 dev.openbili.webdemo38 BackAction39 CdnCarrier40 LoginState
1 BangumiPlaybackStore
2 BiliWebChromeClient
3 FullscreenVideoController
4 api.BiliPrivateMessageApi
5 settings
6 PlayerState24
7 api.ArticleBlock6
8 api.BiliArticleApi1
9 api.BiliDanmakuApi2
10 api.BiliVideoApi1
11 bangumi.BangumiPreviewPlayerViewModel1
12 feed.FeedExtractionResult8
13 live.LiveChatContent3
14 live.LiveHomeUiState6
15 live.LiveRoomViewModel2
16 video.DanmakuOverlayView2
17 feed17
18 article21112
19 bangumi2130
20 music.HomeMusicPlayerViewModel22
21 my.HistoryCardItem2412
22 offline19
23 search228
24 music444102
25 my414242244
26 ui113238172317916122012054
27 ui.TransitionPhase45
28 video4151626967
29 live212238
30 api31512
31 PlayerViewModel2
32 bangumi.BangumiExploreViewModel.FollowingPageResult21
33 dynamic111114
34 offline.OfflineMediaManager21
35 profile332218
36 video.InlineDanmakuSegment21
37 dev.openbili.webdemo131651111111164
38 BackAction4
39 CdnCarrier4
40 LoginState59
Uses a module listed above itPart of a loopThe module itself
1 BangumiPlaybackStore2 BiliWebChromeClient3 FullscreenVideoController4 api.BiliPrivateMessageApi5 settings6 PlayerState7 api.ArticleBlock8 api.BiliArticleApi9 api.BiliDanmakuApi10 api.BiliVideoApi11 bangumi.BangumiPreviewPlayerViewModel12 feed.FeedExtractionResult13 live.LiveChatContent14 live.LiveHomeUiState15 live.LiveRoomViewModel16 video.DanmakuOverlayView17 feed18 article19 bangumi20 music.HomeMusicPlayerViewModel21 my.HistoryCardItem22 offline23 search24 music25 my26 ui27 ui.TransitionPhase28 video29 live30 api31 PlayerViewModel32 bangumi.BangumiExploreViewModel.FollowingPageResult33 dynamic34 offline.OfflineMediaManager35 profile36 video.InlineDanmakuSegment37 dev.openbili.webdemo38 BackAction39 CdnCarrier40 LoginStateBangumiPlaybackStore1BiliWebChromeClient2FullscreenVideoController3api.BiliPrivateMessageApi4settings5PlayerState6api.ArticleBlock7api.BiliArticleApi8api.BiliDanmakuApi9api.BiliVideoApi10bangumi.BangumiPreviewPlayerViewModel11feed.FeedExtractionResult12live.LiveChatContent13live.LiveHomeUiState14live.LiveRoomViewModel15video.DanmakuOverlayView16feed17article18bangumi19music.HomeMusicPlayerViewModel20my.HistoryCardItem21offline22search23music24my25ui26ui.TransitionPhase27video28live29api30PlayerViewModel31bangumi.BangumiExploreViewModel.FollowingPageResult32dynamic33offline.OfflineMediaManager34profile35video.InlineDanmakuSegment36dev.openbili.webdemo37BackAction38CdnCarrier39LoginState4024612118362217211122130222412192284441024142422441132381723179161220120544541516269672122383151222111111421332218211316511111111644459+146 more modules (most-connected shown)

At a glance — Code Health · 72.2 · Adequate · gated by D1, D2 ·

At a glance — Architecture · 89.8 · Adequate · gated by D26 ·

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

At a glance — Readiness · 18.0 · Weak · gated by D13, P1, P3 ·

At a glance — Security · 78.9 · Strong ·

At a glance — Performance · 85.7 · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A07:2025 — Authentication Failures4High / Critical
A05:2025 — Injection3Medium
A02:2025 — Security Misconfiguration1Medium

Roadmap

Top priorities: Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2); Add a CI workflow that builds and runs the test suite on every push/PR; Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.

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

Do thisHelpsEffortDimension
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2).+19.4 ptsLowREDACTED Scanning
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts.+7.5 ptsLowADR Quality
Add a CI workflow that builds and runs the test suite on every push/PR.+9.9 ptsMediumCI/CD gates
Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+9.9 ptsMediumSecurity & performance tooling
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.+6.3 ptsMediumArchitecture documentation
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+3.6 ptsMediumRelease Hygiene
Expand the README with getting-started, architecture overview and a project map.+3.5 ptsMediumDocumentation (README)
Resolve the 40 Hotspot finding(s) in Churn × Complexity Hotspots — start with VideoScreen.kt, VideoPageContent.kt, AppRoot.kt.+3.5 ptsHighChurn × Complexity Hotspots

File quality

Per-file score 0–10 — a quality signature. Of 136 files carrying findings, judged against the Preview bar: 1% slop · 0% mixed · 99% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt7.0Near-cleanCyclomatic Complexity: HomeHubScreenKt.HomeHubScreen (cyclomatic 157)
app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt7.0Near-cleanCyclomatic Complexity: AppRootKt.AppRoot (cyclomatic 76)
app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt7.0Near-cleanCyclomatic Complexity: BangumiRecommendationScreenKt.BangumiRecommendationScreen (cyclomatic 72)
app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt7.0Near-cleanCyclomatic Complexity: ProfileScreenKt.ProfileScreen (cyclomatic 61)
app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt7.0Near-cleanCyclomatic Complexity: ProfileDynamicScreenKt.ProfileDynamicGrid (cyclomatic 60)
app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt7.0Near-cleanCyclomatic Complexity: AppRootEnterBangumiContext.startEnterVideo (cyclomatic 54)
app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt7.0Near-cleanCyclomatic Complexity: AppRootExitContext.startExitRootBangumi (cyclomatic 46)
app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt7.0Near-cleanCyclomatic Complexity: BangumiExploringRailKt.AnimeFollowingSection (cyclomatic 45)
app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt7.0Near-cleanCyclomatic Complexity: MyViewModel.select (cyclomatic 42)
app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt7.0Near-cleanCyclomatic Complexity: BiliPrivateMessageApi.parsePrivateContent (cyclomatic 41)
app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt7.0Near-cleanCyclomatic Complexity: MyScreenMessagesKt.NativeMessagePane (cyclomatic 40)
app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt7.0Near-cleanCyclomatic Complexity: BangumiExploreScreenKt.BangumiExploreScreen (cyclomatic 38)
app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt7.0Near-cleanCyclomatic Complexity: AppRootProfileContext.openCommentProfileFrom (cyclomatic 36)
app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt7.0Near-cleanCyclomatic Complexity: VideoScreenWidgetsKt.VideoActionPanel (cyclomatic 31)
app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt7.0Near-cleanCyclomatic Complexity: BiliBangumiApi.resolveVideoBvid (cyclomatic 28)
app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt7.0Near-cleanCyclomatic Complexity: FeedScreenKt.FeedCard (cyclomatic 28)
app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt7.0Near-cleanCyclomatic Complexity: PopularFeedScreenKt.PopularFeedScreen (cyclomatic 24)
app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt7.0Near-cleanCyclomatic Complexity: ProfileCollectionScreenKt.ProfileCollectionGrid (cyclomatic 23)
app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt7.0Near-cleanCyclomatic Complexity: CachedVideosPaneKt.OfflineFeedCard (cyclomatic 22)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 3

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

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

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

Could not be resolved — 13

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 42 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 — 42 dimensions across the health lenses
D1D2D3D4D5D6D13D14D15D17D20D26D27D28D29D35D37D44AX10AX3AX4AX6AX8M1M2M3M4P1P3P6PF1PF3X1X12X16X17X21X25X27X28X3X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 891 of 898 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

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

Every finding is locatable in findings.md. Run 01a1e862-c270-700b-a468-918b6531a1f3.

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

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.kt) 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 (.kt) and this repository declares a JVM test suite (repository root, Gradle), but it was not re-run: the analyzer environment could not run it. 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 — 3 Maven/Gradle manifest(s) were read, stating a version for 31 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 — 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 30 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
  • D19 Documentation Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • 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. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `app/src/main/java/dev/openbili/webdemo/live/LiveRoomSecondary.kt`, `app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt`, `app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt`, `app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt`, `app/src/main/java/dev/openbili/webdemo/settings/AppSettingsViewModel.kt`, … (+4 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • 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 (30 commit(s) sampled).
  • AXR1 Runtime accessibility — 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. Boot via AndroidApp (app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: FAILURE: Build failed with an exception. * Where: Build file 'app/build.gradle.kts' line: 73 * What went wrong: Cannot convert '' to File. * Try…; runtime evidence skipped (launch chosen because app/build.gradle.kts applies the Android application plugin and gradlew builds it).
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Kotlin is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Kotlin is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — 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. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • 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. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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.
  • 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.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • 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.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.2 / 10Critical✓ Tool-verified

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

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

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

140 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was VideoScreenKt.VideoScreen at 162.

VideoScreenKt.VideoScreen (cyclomatic 162)app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:220
HomeHubScreenKt.HomeHubScreen (cyclomatic 157)app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:264
VideoPageContentKt.VideoContent (cyclomatic 154)app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:139
CommentCardKt.CommentRow (cyclomatic 114)app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:320
HomeMusicPlayerScreenKt.HomeMusicPlayerScreen (cyclomatic 85)app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:135

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

What to do

  1. Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with VideoScreenKt.VideoScreen (cyclomatic 162), HomeHubScreenKt.HomeHubScreen (cyclomatic 157), VideoPageContentKt.VideoContent (cyclomatic 154). — 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 3 together lifts Cyclomatic Complexity from 2.2 to about 2.9/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

189 method(s) exceeded the cognitive complexity threshold of 15; the worst was VideoPageContentKt.VideoContent at 273.

VideoPageContentKt.VideoContent (cognitive 273)app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:139
VideoScreenKt.VideoScreen (cognitive 240)app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:220
AppRootFeedContext.FeedLayer (cognitive 216)app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt:319
HomeHubScreenKt.HomeHubScreen (cognitive 184)app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:264
CommentCardKt.CommentRow (cognitive 181)app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:320

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

What to do

  1. Bring the 29 bodies over 60 down to 60 or less in Cognitive Complexity — start with VideoPageContentKt.VideoContent (cognitive 273), VideoScreenKt.VideoScreen (cognitive 240), AppRootFeedContext.FeedLayer (cognitive 216). — 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 29 together lifts Cognitive Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes6.5 / 10Adequate✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

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

170 god class(es) detected.

MethodTooLong: AppRootTailKt.appRootTailContent · ×90app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:189
FileTooLong: my/MyViewModel.kt · ×53app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt
ClassTooLong: MyViewModel · ×16app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:62
TooManyMethods: DanmakuOverlayView · ×11app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:130

What to do

  1. Resolve the 90 MethodTooLong finding(s) in God Classes — start with AppRootExit.kt (7), BangumiExploringRail.kt (4), AppRootEnterBangumi.kt (4). — One of this dimension's main actionable groups (90 warning-level).
  2. Resolve the 53 FileTooLong finding(s) in God Classes — start with MyViewModel.kt, VideoScreen.kt, AppRootTail.kt. — One of this dimension's main actionable groups (53 warning-level).
  3. Resolve the 16 ClassTooLong finding(s) in God Classes — start with MyViewModel.kt, DanmakuOverlayView.kt, HomeMusicPlayerViewModel.kt. — One of this dimension's main actionable groups (16 warning-level).

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

D4 · Code Duplication7.3 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

210 duplicated block group(s) detected. 6.9 % of the production lines (7,462 of 108,681) are in a reported copy. A further 64 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (8 lines × 2) · ×16app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:289
Duplicated block (5 lines × 2) · ×13app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:589
Duplicated block (14 lines × 2) · ×12app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:116
Duplicated block (13 lines × 2) · ×11app/src/main/java/dev/openbili/webdemo/feed/FeedImageLoadPolicy.kt:150
Duplicated block (7 lines × 2) · ×11app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:292

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

What to do

  1. Resolve the 16 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with BiliCommentApi.kt (2), BiliPrivateMessageApi.kt (2), ProfileCollectionScreen.kt (2). — One of this dimension's main actionable groups (16 warning-level).
  2. Resolve the 13 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with BiliBangumiApi.kt, BiliPrivateMessageApi.kt, BiliSearchApi.kt. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 12 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with AppRootEnterBangumi.kt (2), BiliSearchApi.kt, ArticleScreen.kt. — 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.

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

2 production modules (Gradle), 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 1 of the 2 (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).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

0 of 65 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

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

2 secret(s) detected.

REDACTED

What to do

  1. Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).

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

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

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 8 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 3 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. A further 23 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots8.6 / 10Strong✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

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

Top hotspots: app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt (8×162=1296); app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt (6×154=924); app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt (10×76=760)

Hotspot: app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt · ×40app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:220

What to do

  1. Resolve the 40 Hotspot finding(s) in Churn × Complexity Hotspots — start with VideoScreen.kt, VideoPageContent.kt, AppRoot.kt. — One of this dimension's main actionable groups (40 warning-level).

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

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

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

0 deducted task-comment markers across 108681 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundapp/build.gradle.kts:5

What to do

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

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

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

1 of 2 build units (Gradle) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesionapp/build.gradle.kts:1

What to do

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

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

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

17 % of calls cross a namespace and 1 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)8.6 / 10Strong✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

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

3 finding(s): 0 critical, 0 high, 3 medium, 0 low.

REDACTED
REDACTED

What to do

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

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

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D37 · Vulnerability-disclosure Policy4.0 / 10Weak✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (REDACTED 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 REDACTED (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.

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

A vulnerability-disclosure policy (REDACTED) is present but lists no reporting contact.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Vulnerability-disclosure Policy — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

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

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

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

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

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

M1 · Documentation (README)4.0 / 10Weak✓ Tool-verified

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

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

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

What to do

  • Expand the README with getting-started, architecture overview and a project map.
  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

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

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
  • `app/build.gradle.kts` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — app/build.gradle.kts:114

What to do

  • Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

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

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF1 · Benchmark discipline7.5 / 10Strong✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

  • A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.

What to do

  • Run JMH with the GC profiler (`-prof gc`, or addProfiler(GCProfiler.class)) so allocation rate regressions are visible, not just time.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ 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.

  • `BiliArticleApi.parseArticleJson` is public, takes a document from its caller (line 117) and hands it to `BiliArticleApi.parseArticleParagraphs`, which calls itself at line 302 with a piece of `paragraphs` (and at line 316) — the function is not `tailrec`, so every call is a real frame — and nowhere in `BiliArticleApi.parseArticleParagraphs` 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. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `BiliArticleApi.parseArticleParagraphs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — app/src/main/java/dev/openbili/webdemo/api/BiliArticleApi.kt:302

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

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

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

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

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

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

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

Other · Code Health — Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.

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

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

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

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

X3 · Exception handling6.1 / 10Adequate✓ Tool-verified

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

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

  • 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. (×2) — app/src/main/java/dev/openbili/webdemo/AuthViewModel.kt:70, app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:526
  • `catch (_: 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. (×5) — app/src/main/java/dev/openbili/webdemo/video/CollectionPageCounts.kt:40, app/src/main/java/dev/openbili/webdemo/ui/LoginSheet.kt:219, app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:85, …

What to do

  • Swallowed exception (empty catch)
X5 · Nullable reference types10.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Kotlin's null safety is not undermined by not-null assertions — `String` cannot hold null and `String?` must be checked before use in every Kotlin module, and each `!!` is a run-time `NullPointerException` the author has told the compiler cannot happen.

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

Reference — by lens

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

LensScoreRatingImpact
Code Health72.2Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture89.8Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity49.9Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness18.0Weak — gated by D13, P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security78.9StrongSolid.
Performance85.7ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

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

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 69 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 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.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. 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
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the Android app did not build — `./gradlew :app:assembleDebug` exited 1: FAILURE: Build failed with an exception. * Where: Build file 'app/build.gradle.kts' line: 73 * What went wrong: Cannot convert '' to File. * Try…; runtime evidence skipped (launch chosen because app/build.gradle.kts applies the Android application plugin and gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
  • 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 Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store 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 Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) 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 Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~12334 lines of test source are present (.kt) 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 — the .kt suite was found but not re-run
  • D12 Dependency Hygiene — Not scored — 3 Maven/Gradle manifest(s) were read, stating a version for 31 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.
  • D19 Documentation Quality — D19 reads .NET projects and npm packages as units; 3 folder(s) declared by build.gradle.kts were not judged for an overview, an example or the map.
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 3 candidate(s) found and not reported.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .kt, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
  • 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) — 9 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D34 Knowledge Freshness — too few commits to judge knowledge freshness
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • 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.
  • D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 181 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — no CI workflow found
  • P2 Observability — This repository's JavaScript/TypeScript, JVM source (3 module(s), 263 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Kotlin was read, and no request in it can be cancelled by a caller (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
  • 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 analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — 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 Kotlin was read, and it logs through none that an assembled message defeats: Android's `Log` and Timber, java.util.logging and log4j-api-kotlin take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J, log4j 2 or kotlin-logging (`LoggerFactory.getLogger`, `KotlinLogging.logger {}`) would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 3 finding(s)
D13 · REDACTED Scanning · Leaked secret · ×2
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
Serious — 825 finding(s)
D3 · God Classes · MethodTooLong · ×90
  • MethodTooLong: AppRootTailKt.appRootTailContent app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:189 — MethodTooLong — appRootTailContent runs 1559 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1459 over it, 15.59× 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: ArticleScreenKt.ArticleScreen app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:126 — MethodTooLong — ArticleScreen runs 588 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 488 over it, 5.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: AppRootFeedContext.FeedLayer app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt:319 — MethodTooLong — FeedLayer runs 522 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 422 over it, 5.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProfileDynamicScreenKt.DynamicDetail app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1434 — MethodTooLong — DynamicDetail runs 501 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 401 over it, 5.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: AppRootVideoContext.VideoLayer app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoLayer.kt:275 — MethodTooLong — VideoLayer runs 473 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 373 over it, 4.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HomeMusicTrackListKt.MusicTrackList app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:89 — MethodTooLong — MusicTrackList runs 414 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 314 over it, 4.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: LiveRoomControlNavigationKt.LiveRoomControllerPlaybackScreen app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:73 — MethodTooLong — LiveRoomControllerPlaybackScreen runs 360 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 260 over it, 3.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MyScreenHistoryKt.HistoryPanel app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:223 — MethodTooLong — HistoryPanel runs 338 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 238 over it, 3.38× 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: SearchScreenKt.SearchResultsScreen app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:520 — MethodTooLong — SearchResultsScreen runs 334 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 234 over it, 3.34× 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: ProfileScreenKt.ProfileHeader app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:927 — MethodTooLong — ProfileHeader runs 313 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 213 over it, 3.13× 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: SearchScreenKt.SearchScreen app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:136 — MethodTooLong — SearchScreen runs 293 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 193 over it, 2.93× 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: MyScreenMessagesKt.NativeMessagePane app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:247 — MethodTooLong — NativeMessagePane runs 286 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 186 over it, 2.86× 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: CachedVideosPaneKt.CachedVideosPane app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:119 — MethodTooLong — CachedVideosPane runs 271 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× 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: BiliHistoryApi.parseHistoryResponse app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:215 — MethodTooLong — parseHistoryResponse runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DanmakuMaskParser.flattenPathData app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:188 — MethodTooLong — flattenPathData runs 248 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 148 over it, 2.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: PlayerGesturesKt.PlayerGestureLayer app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt:61 — MethodTooLong — PlayerGestureLayer runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× 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: HomeMusicLibraryPaneKt.MusicLibraryPane app/src/main/java/dev/openbili/webdemo/ui/HomeMusicLibraryPane.kt:68 — MethodTooLong — MusicLibraryPane runs 238 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 138 over it, 2.38× 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: AppRootProfileOverlayKt.AppRootProfileOverlay app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:29 — MethodTooLong — AppRootProfileOverlay runs 236 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× 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: MyViewModel.select app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:416 — MethodTooLong — select runs 235 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× 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: VideoHeaderContentKt.VideoInfoTile app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:210 — MethodTooLong — VideoInfoTile runs 234 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 134 over it, 2.34× 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: BangumiExploreScreenKt.ExploreCategoryGridContent app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1176 — MethodTooLong — ExploreCategoryGridContent runs 225 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BiliSpaceApi.parseSpaceDynamics app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:174 — MethodTooLong — parseSpaceDynamics runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BangumiExploringRailKt.AnimeFollowingSection app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:875 — MethodTooLong — AnimeFollowingSection runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× 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: AppRootEnterBangumiContext.startEnterVideo app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:174 — MethodTooLong — startEnterVideo runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× 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: HomeMusicPlayerScreenKt.MusicAmbientLayer app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:769 — MethodTooLong — MusicAmbientLayer runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 65 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×53
  • FileTooLong: my/MyViewModel.kt app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt — FileTooLong — 1879 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: MyViewModel (62-2352). The bar is 500 significant lines; this is 1379 over it, 3.76× 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: video/VideoScreen.kt app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt — FileTooLong — 1790 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1290 over it, 3.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/AppRootTail.kt app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt — FileTooLong — 1739 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1239 over it, 3.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: profile/ProfileDynamicScreen.kt app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt — FileTooLong — 1678 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1178 over it, 3.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: video/DanmakuOverlayView.kt app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt — FileTooLong — 1665 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: DanmakuOverlayView (130-2145). The bar is 500 significant lines; this is 1165 over it, 3.33× 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: music/HomeMusicPlayerViewModel.kt app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt — FileTooLong — 1624 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: HomeMusicPlayerViewModel (302-2095). The bar is 500 significant lines; this is 1124 over it, 3.25× 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: video/VideoPageContent.kt app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt — FileTooLong — 1607 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1107 over it, 3.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/BangumiRecommendationScreen.kt app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt — FileTooLong — 1503 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1003 over it, 3.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: profile/ProfileScreen.kt app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt — FileTooLong — 1465 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 965 over it, 2.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/HomeHubScreen.kt app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt — FileTooLong — 1452 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 952 over it, 2.90× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/BangumiExploreScreen.kt app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt — FileTooLong — 1412 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 912 over it, 2.82× 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: webdemo/PlayerViewModel.kt app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt — FileTooLong — 1267 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: PlayerViewModel (88-1509). The bar is 500 significant lines; this is 767 over it, 2.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ui/AppRootExit.kt app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt — FileTooLong — 1243 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: AppRootExitContext (43-1566). The bar is 500 significant lines; this is 743 over it, 2.49× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: video/VideoScreenWidgets.kt app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt — FileTooLong — 1224 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 724 over it, 2.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/HomeMusicPlayerScreen.kt app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt — FileTooLong — 1216 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 716 over it, 2.43× 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: live/LiveRoomScreen.kt app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt — FileTooLong — 1204 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 704 over it, 2.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/AppRoot.kt app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt — FileTooLong — 1169 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: val (215-1452). The bar is 500 significant lines; this is 669 over it, 2.34× 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: ui/BangumiExploringRail.kt app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt — FileTooLong — 1097 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 597 over it, 2.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: live/LiveRoomViewModel.kt app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt — FileTooLong — 1043 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: LiveRoomViewModel (30-1399). The bar is 500 significant lines; this is 543 over it, 2.09× 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: video/CommentCard.kt app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt — FileTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 525 over it, 2.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/AppRootEnterBangumi.kt app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt — FileTooLong — 991 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: AppRootEnterBangumiContext (50-1208). The bar is 500 significant lines; this is 491 over it, 1.98× 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: feed/FeedScreen.kt app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt — FileTooLong — 986 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 486 over it, 1.97× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: api/BiliBangumiApi.kt app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt — FileTooLong — 932 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 432 over it, 1.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/AppRootVideoState.kt app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt — FileTooLong — 926 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: AppRootVideoState (71-1100). The bar is 500 significant lines; this is 426 over it, 1.85× 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: article/ArticleScreen.kt app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt — FileTooLong — 920 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 420 over it, 1.84× 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.
  • + 28 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×40
  • Hotspot: app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:220 — app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 162 in VideoScreenKt.VideoScreen at line 220. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:139 — app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 154 in VideoPageContentKt.VideoContent at line 139. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt`: 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: app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:228 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in AppRootKt.AppRoot at line 228. 2 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt`: 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: app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:320 — app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 114 in CommentCardKt.CommentRow at line 320. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt`: 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: app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:801 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in LiveRoomScreenKt.LivePlayerCard at line 801. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/my/MyScreen.kt app/src/main/java/dev/openbili/webdemo/my/MyScreen.kt:79 — app/src/main/java/dev/openbili/webdemo/my/MyScreen.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in MyScreenKt.MyScreen at line 79. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/my/MyScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:302 — app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in BangumiRecommendationScreenKt.BangumiRecommendationScreen at line 302. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:283 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in ProfileDynamicScreenKt.ProfileDynamicGrid at line 283. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:264 — app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 157 in HomeHubScreenKt.HomeHubScreen at line 264. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:233 — app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in ProfileScreenKt.ProfileScreen at line 233. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:135 — app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 85 in HomeMusicPlayerScreenKt.HomeMusicPlayerScreen at line 135. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:416 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in MyViewModel.select at line 416. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt`: 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: app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:343 — app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in DanmakuOverlayView.update at line 343. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt`: 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: app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:189 — app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in AppRootTailKt.appRootTailContent at line 189. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt`: 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: app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:210 — app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in VideoHeaderContentKt.VideoInfoTile at line 210. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt`: 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: app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:97 — app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in PlayerControlsKt.DanmakuComposer at line 97. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt`: 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: app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:126 — app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in ArticleScreenKt.ArticleScreen at line 126. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:520 — app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in SearchScreenKt.SearchResultsScreen at line 520. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt:61 — app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in PlayerGesturesKt.PlayerGestureLayer at line 61. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt`: 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: app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:67 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in AppRootProfileLayerKt.AppRootProfileLayer 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt`: 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: app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:486 — app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in PlayerViewModel.preparePlayer at line 486. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt`: 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: app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:925 — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in FeedScreenKt.FeedCard at line 925. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt`: 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: app/src/main/java/dev/openbili/webdemo/video/CommentComposer.kt app/src/main/java/dev/openbili/webdemo/video/CommentComposer.kt:97 — app/src/main/java/dev/openbili/webdemo/video/CommentComposer.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in CommentComposerKt.CommentComposer at line 97. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/video/CommentComposer.kt`: 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: app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt:319 — app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in AppRootFeedContext.FeedLayer at line 319. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt`: 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: app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:152 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in BangumiExploreScreenKt.BangumiExploreScreen at line 152. 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-07-08..2026-10-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-08 20:01:46 +08:00' --until='2026-10-06 20:01:46 +08:00' --full-history --no-merges -- app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt`: 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.
  • + 15 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×16
  • ClassTooLong: MyViewModel app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:62 — ClassTooLong — 1830 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 1430 over it, 4.58× 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: DanmakuOverlayView app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:130 — ClassTooLong — 1502 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods. The bar is 400 significant lines; this is 1102 over it, 3.76× 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: HomeMusicPlayerViewModel app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:302 — ClassTooLong — 1407 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 1007 over it, 3.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: AppRootExitContext app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:43 — ClassTooLong — 1212 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 812 over it, 3.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.
  • ClassTooLong: PlayerViewModel app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:88 — ClassTooLong — 1098 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 698 over it, 2.75× 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: LiveRoomViewModel app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt:30 — ClassTooLong — 1016 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 616 over it, 2.54× 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: AppRootEnterBangumiContext app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:50 — ClassTooLong — 952 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 552 over it, 2.38× 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: OfflineMediaManager app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:57 — ClassTooLong — 843 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 443 over it, 2.11× 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: AppRootVideoState app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:71 — ClassTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 408 over it, 2.02× 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: AppRootFeedContext app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt:79 — ClassTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 339 over it, 1.85× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppRootVideoContext app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoLayer.kt:66 — ClassTooLong — 673 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 273 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: BangumiExploreViewModel app/src/main/java/dev/openbili/webdemo/bangumi/BangumiExploreViewModel.kt:156 — ClassTooLong — 609 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 209 over it, 1.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: AppRootProfileContext app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:39 — ClassTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 189 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.
  • ClassTooLong: SettingsOption app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:81 — ClassTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 127 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: AppRootProfileState app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileState.kt:25 — ClassTooLong — 458 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 58 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.
  • ClassTooLong: HomeDynamicViewModel app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicViewModel.kt:62 — ClassTooLong — 432 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 32 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×16
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:289 — app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:289-296 | app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:311-318 — 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 `app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:289` 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, `app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:286` calls `toString` and `app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:309` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:505 — app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:505-512 | app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:712-719 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:505` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:688 — app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:688-695 | app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:712-719 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:688` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:341 — app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:341-348 | app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:405-412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:341` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:280 — app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:280-287 | app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:369-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:280` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:513 — app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:513-520 | app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:528-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:513` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:398 — app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:398-405 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1428-1435 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:398` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:502 — app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:502-509 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1679-1688 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:502` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1173 — app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1173-1181 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1298-1305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1173` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveTransitions.kt:581 — app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveTransitions.kt:581-588 | app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveTransitions.kt:634-641 — both copies are in the same file, so extract the 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) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:313 — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:313-320 | app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:177-184 — 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 `app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:313` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:658 — app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:658-665 | app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:854-861 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:658` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackControls.kt:96 — app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackControls.kt:96-106 | app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackPanel.kt:65-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackControls.kt:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticleLayer.kt:49 — app/src/main/java/dev/openbili/webdemo/ui/AppRootArticleLayer.kt:49-56 | app/src/main/java/dev/openbili/webdemo/ui/AppRootUi.kt:109-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:406 — app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:406-413 | app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:437-444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:406` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:44 — app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:44-51 | app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:88-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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×13
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:589 — app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:589-594 | app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:219-223 — 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 `app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:589` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:100 — app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:100-104 | app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:198-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:248 — app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:248-252 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:320-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:93 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:93-97 | app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:134-138 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:92` calls `startEnterLive`, `startEnterLiveRef` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:133` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/video/PlaybackEndOverlay.kt:192 — app/src/main/java/dev/openbili/webdemo/video/PlaybackEndOverlay.kt:192-200 | app/src/main/java/dev/openbili/webdemo/video/PlaybackEndOverlay.kt:377-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/PlaybackEndOverlay.kt:192` 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 (5 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:721 — app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:721-725 | app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:776-784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:721` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:183 — app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:183-187 | app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:241-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliFeedApi.kt:185 — app/src/main/java/dev/openbili/webdemo/api/BiliFeedApi.kt:185-189 | app/src/main/java/dev/openbili/webdemo/api/BiliFeedApi.kt:237-241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliFeedApi.kt:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:192 — app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:192-196 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:391-395 — 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 `app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:192` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1735 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1735-1739 | app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:1163-1167 — 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) app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:137 — app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:137-141 | app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:162-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:340 — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:340-344 | app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:193-197 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:520 — app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:520-524 | app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:531-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:520` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×12
  • Duplicated block (14 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:116 — app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:116-129 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:150-163 — both copies are in the same file, so extract the 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) app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:725 — app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:725-738 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1951-1964 — 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 `app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:725` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:230 — app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:230-243 | app/src/main/java/dev/openbili/webdemo/my/WatchLaterViewModel.kt:268-281 — 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 `app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:230` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:873 — app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:873-886 | app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:904-917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:873` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:830 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:830-843 | app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1075-1088 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:830` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `modifier` to `modifier =` in one and `modifier = if (clipToPane) modifier.clipToBounds() else` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:326 — app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:326-339 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:365-378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:326` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:439 — app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:439-452 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1092-1105 — both copies are in the same file, so extract the 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) app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:405 — app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:405-418 | app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:461-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayerLayer.kt:98 — app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayerLayer.kt:98-111 | app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1445-1458 — 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 (14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:333 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:333-346 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:595-608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:333` 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) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1387 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1387-1400 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1449-1462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1387` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:1287 — app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:1287-1300 | app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:1449-1462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · TooManyMethods · ×11
  • TooManyMethods: DanmakuOverlayView app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:130 — TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HomeMusicPlayerViewModel app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:302 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MyViewModel app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:62 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OfflineMediaManager app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:57 — 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: LiveRoomViewModel app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt:30 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlayerViewModel app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:88 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: BiliLiveApi app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:26 — 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: BiliBangumiApi app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:32 — 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: AppRootVideoContext app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoLayer.kt:66 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: BiliHttpClient app/src/main/java/dev/openbili/webdemo/api/BiliHttpClient.kt:35 — 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: BiliSpaceApi app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:34 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×11
  • Duplicated block (13 lines × 2) app/src/main/java/dev/openbili/webdemo/feed/FeedImageLoadPolicy.kt:150 — app/src/main/java/dev/openbili/webdemo/feed/FeedImageLoadPolicy.kt:150-162 | app/src/main/java/dev/openbili/webdemo/feed/FeedImageLoadPolicy.kt:188-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:329 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:329-341 | app/src/main/java/dev/openbili/webdemo/video/ControllerFullscreenPlaybackScreen.kt:309-322 — 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 `app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:329` 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) app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:423 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:423-435 | app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:419-431 — 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 `app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:423` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:478 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:478-490 | app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:589-601 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:478` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:377 — app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:377-389 | app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:463-475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:377` 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 (13 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:228 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:228-240 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:391-403 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:228` 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 (13 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:299 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:299-311 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:476-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:299` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:214 — app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:214-226 | app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:265-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:214` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:832 — app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:832-844 | app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:905-917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:832` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:978 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:978-990 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1110-1122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:978` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:392 — app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:392-404 | app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:919-931 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:916` calls `mutableStateOf`, `rememberCoroutineScope` and `app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:391` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×11
  • Duplicated block (7 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:292 — app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:292-298 | app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:310-316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:934 — app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:934-940 | app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:1120-1126 — both copies are in the same file, so extract the 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) app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:252 — app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:252-258 | app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:271-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:352 — app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:352-358 | app/src/main/java/dev/openbili/webdemo/api/DanmakuProtoParser.kt:12-18 — 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 `app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:352` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:532 — app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:532-538 | app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:697-703 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:532` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:331 — app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:331-337 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1725-1734 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:331` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1131 — app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1131-1137 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1276-1282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1131` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:432 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:432-438 | app/src/main/java/dev/openbili/webdemo/ui/AppTransitions.kt:110-117 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:85 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:85-91 | app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:127-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:92` calls `startEnterLive`, `startEnterLiveRef` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:134` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:703 — app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:703-709 | app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:599-605 — 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 `app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:703` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:442 — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:442-448 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:512-518 — 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 `app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:442` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×10
  • Duplicated block (10 lines × 2) app/src/main/java/dev/openbili/webdemo/BangumiLocalHistoryStore.kt:94 — app/src/main/java/dev/openbili/webdemo/BangumiLocalHistoryStore.kt:94-103 | app/src/main/java/dev/openbili/webdemo/live/LiveHistoryStore.kt:59-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/BangumiLocalHistoryStore.kt:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:900 — app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:900-910 | app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveTransitions.kt:211-220 — 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 `app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:900` it does not close everything it opens, so those 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 lines × 2) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:713 — app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:713-722 | app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:609-618 — 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 `app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:713` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:619` calls `BorderStroke` and `app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:723` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1677 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1677-1686 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1737-1746 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1677` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/BottomCapsule.kt:330 — app/src/main/java/dev/openbili/webdemo/ui/BottomCapsule.kt:330-339 | app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1726-1735 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BottomCapsule.kt:330` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:467 — app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:467-476 | app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:497-506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:467` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) app/src/main/java/dev/openbili/webdemo/video/ControllerDanmakuSettingsPanel.kt:63 — app/src/main/java/dev/openbili/webdemo/video/ControllerDanmakuSettingsPanel.kt:63-72 | app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackSelectionPanel.kt:117-126 — 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 `app/src/main/java/dev/openbili/webdemo/video/ControllerDanmakuSettingsPanel.kt:63` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:273 — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:273-282 | app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:147-156 — 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 `app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:273` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1121 — app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1121-1130 | app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1212-1221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1121` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1004 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1004-1013 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1027-1036 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1004` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×10
  • Duplicated block (9 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:267 — app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:267-275 | app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:290-298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:267` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:289` calls `toString` and `app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:266` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:451 — app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:451-461 | app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:481-489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:331 — app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:331-339 | app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:274-282 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:331` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:618 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:618-626 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:650-658 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:618` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:272 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:272-280 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:445-453 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:272` it does not close everything it opens, so those 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, `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:271` calls `isBlank`, `markReady` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:441` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootUi.kt:253 — app/src/main/java/dev/openbili/webdemo/ui/AppRootUi.kt:253-261 | app/src/main/java/dev/openbili/webdemo/ui/AppRootUi.kt:267-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:818 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:818-826 | app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1063-1071 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:347 — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:347-355 | app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:202-210 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:418 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:418-426 | app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:440-448 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:418` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:732 — app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:732-740 | app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:749-757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:732` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×9
  • Duplicated block (12 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:201 — app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:201-212 | app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:370-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:201` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:214` calls `optJSONObject`, `length` and `app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:383` 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) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:162 — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:162-173 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:174-187 — 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 `app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:162` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:134 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:134-145 | app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:851-862 — 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 `app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt: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.
  • Duplicated block (12 lines × 2) app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:446 — app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:446-457 | app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:374-385 — 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 `app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:446` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:482 — app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:482-493 | app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:1025-1036 — 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 `app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:482` 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, `app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:481` calls `markLoaded` and `app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:1024` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1860 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1860-1871 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1955-1966 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1860` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:789 — app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:789-800 | app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:986-997 — both copies are in the same file, so extract the 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) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1486 — app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1486-1497 | app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1536-1547 — both copies are in the same file, so extract the 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) app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:244 — app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:244-255 | app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:267-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt: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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×8
  • Duplicated block (11 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:264 — app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:264-274 | app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:305-315 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:264` 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) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:670 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:670-680 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1782-1792 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1439 — app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1439-1449 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1598-1608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1439` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:630 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:630-640 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:485-495 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:641` calls `LaunchedEffect` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:496` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:738 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:738-748 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:555-565 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:738` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1303 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1303-1313 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:251-261 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1303` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:1237 — app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:1237-1247 | app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:1265-1275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:1237` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:1042 — app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:1042-1052 | app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:1053-1065 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:1042` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×6
  • Duplicated block (13–14 lines × 2) app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:271 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:271-283 | app/src/main/java/dev/openbili/webdemo/video/ControllerFullscreenPlaybackScreen.kt:234-247 — 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 `app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:271` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13–14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:468 — app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:468-481 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1129-1141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:468` 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 (13–14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:983 — app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:983-996 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1138-1150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:983` it does not close everything it opens, so those 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, `app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:997` calls `setPortraitSourceHidden`, `Video` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1151` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13–14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1132 — app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1132-1145 | app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1517-1529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveLayer.kt:122 — app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveLayer.kt:122-135 | app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1546-1558 — 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 `app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveLayer.kt:122` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1559` calls `isNotBlank`, `luminance` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveLayer.kt:135` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13–14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1540 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1540-1553 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:536-548 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1540` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×6
  • Duplicated block (6 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:186 — app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:186-191 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:256-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot 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) app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:963 — app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:963-968 | app/src/main/java/dev/openbili/webdemo/video/CommentComposer.kt:318-323 — 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 `app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:963` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:430 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:430-435 | app/src/main/java/dev/openbili/webdemo/ui/AppTransitions.kt:270-275 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1291 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1291-1296 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:196-201 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:436 — app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:436-441 | app/src/main/java/dev/openbili/webdemo/api/DanmakuProtoParser.kt:80-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:436` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:116 — app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:116-121 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:336-341 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×5
  • Duplicated block (22 lines × 2) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:684 — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:684-705 | app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:712-733 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:684` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1011 — app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1011-1032 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1165-1186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootTransitionTargets.kt:79 — app/src/main/java/dev/openbili/webdemo/ui/AppRootTransitionTargets.kt:79-100 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTransitionTargets.kt:113-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootTransitionTargets.kt:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1206 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1206-1227 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:216-237 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1206` 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 (22 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1261 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1261-1282 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:161-182 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1261` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×5
  • Swallowed exception (caught, then discarded) app/src/main/java/dev/openbili/webdemo/video/CollectionPageCounts.kt:40 — `catch (_: 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) app/src/main/java/dev/openbili/webdemo/ui/LoginSheet.kt:219 — `catch (_: 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) app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:85 — `catch (_: 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) app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:325 — `catch (_: 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) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:246 — `catch (_: 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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:702 — app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:702-736 | app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:598-632 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:817-864 | app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1062-1107 — 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) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:242 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:242-1452 | app/src/main/java/dev/openbili/webdemo/ui/AppRootStates.kt:212-517 | app/src/main/java/dev/openbili/webdemo/ui/AppRootUiValuesFile.kt:65-193 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:791-868 — 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) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:187 — app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:187-416 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:418-545 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:904-1061 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1067-1206 — 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) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:914 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:914-1034 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1046-1168 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1484-1695 | app/src/main/java/dev/openbili/webdemo/ui/BangumiIndexScreen.kt:723-853 — 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 (10 corresponding lines) · ×4
  • Edited copy of a member (10 corresponding lines) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:346 — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:346-355 | app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:199-210 — 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) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1833 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1833-1842 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1844-1853 — 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) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:454 — app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:454-466 | app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:574-583 — 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) app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:1146 — app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:1146-1155 | app/src/main/java/dev/openbili/webdemo/ui/BangumiIndexScreen.kt:863-872 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×4
  • Duplicated block (17 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:176 — app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:176-192 | app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:215-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:176` 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 × 2) app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:811 — app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:811-827 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:2006-2022 — 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 `app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:811` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:322 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:322-338 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:499-515 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1449 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1449-1465 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:338-354 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1449` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1351 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1351-1366 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:666-681 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:242 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:242-257 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:408-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:566 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:566-581 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:708-723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:566` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:707` calls `onCategoryFocused` and `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:565` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:633 — app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:633-648 | app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:134-149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:538 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:538-552 | app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:618-632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:644 — app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:644-658 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:728-742 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:1559 — app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:1559-1573 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:1647-1661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1394 — app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1394-1408 | app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:1521-1535 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1394` 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 (8 corresponding lines) · ×3
  • Edited copy of a member (8 corresponding lines) baselineprofile/src/main/java/dev/openbili/webdemo/baselineprofile/BaselineProfileGenerator.kt:143 — baselineprofile/src/main/java/dev/openbili/webdemo/baselineprofile/BaselineProfileGenerator.kt:143-150 | baselineprofile/src/main/java/dev/openbili/webdemo/baselineprofile/BaselineProfileGenerator.kt:187-194 — 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) app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:62 — app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:62-72 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:419-426 — 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) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:361 — app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:361-376 | app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:1219-1226 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×3
  • Edited copy of a member (6 corresponding lines) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:339 — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:339-344 | app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:192-197 — 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) app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1649 — app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1649-1658 | app/src/main/java/dev/openbili/webdemo/bangumi/BangumiPreviewPlayerViewModel.kt:265-270 — 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) app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:452 — app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:452-457 | app/src/main/java/dev/openbili/webdemo/api/DanmakuProtoParser.kt:98-103 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×3
  • Edited copy of a member (7 corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:46 — app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:46-52 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:746-752 — 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) app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:84 — app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:84-90 | app/src/main/java/dev/openbili/webdemo/live/LiveHomeViewModel.kt:159-165 — 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) app/src/main/java/dev/openbili/webdemo/search/SearchViewModel.kt:207 — app/src/main/java/dev/openbili/webdemo/search/SearchViewModel.kt:207-217 | app/src/main/java/dev/openbili/webdemo/search/SearchViewModel.kt:220-226 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×3
  • Duplicated block (18–19 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:539 — app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:539-556 | app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:700-718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:539` it begins part-way through the construct above it, so those 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) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1325 — app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1325-1342 | app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1364-1382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1325` 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) app/src/main/java/dev/openbili/webdemo/ui/RootVideoEntryBackdrop.kt:53 — app/src/main/java/dev/openbili/webdemo/ui/RootVideoEntryBackdrop.kt:53-70 | app/src/main/java/dev/openbili/webdemo/ui/RootVideoEntryBackdrop.kt:104-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/RootVideoEntryBackdrop.kt:104` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×3
  • Duplicated block (16–17 lines × 2) app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:481 — app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:481-496 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:325-341 — 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 `app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:481` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–17 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:262 — app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:262-277 | app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:349-365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:349` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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–17 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:282 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:282-297 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:455-471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:282` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×3
  • Duplicated block (13–15 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:453 — app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:453-467 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1115-1127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:453` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–15 lines × 2) app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:851 — app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:851-865 | app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1394-1406 — 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 `app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:851` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–15 lines × 2) app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:488 — app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:488-502 | app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:696-708 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:488` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×3
  • Duplicated block (12–14 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:351 — app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:351-362 | app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:1104-1117 — 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 `app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:351` it does not close everything it opens, so those exact lines 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–14 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:164 — app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:164-175 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:429-442 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:164` it begins part-way through the construct above it, so those exact lines 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–14 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:260 — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:260-271 | app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:132-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×3
  • Duplicated block (11 lines × 3) app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:446 — app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:446-456 | app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:374-384 | app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:595-605 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:446` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:915 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:915-925 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1047-1057 | app/src/main/java/dev/openbili/webdemo/ui/BangumiIndexScreen.kt:724-734 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (11 lines × 3) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:491 — app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:491-501 | app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:625-635 | app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:675-685 — 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 `app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:491` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×2
  • Edited copy of a member (38 corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:381 — app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:381-423 | app/src/main/java/dev/openbili/webdemo/api/DanmakuProtoParser.kt:29-66 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:901 — app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:901-938 | app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1199-1238 — 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 (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:398 — app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:398-422 | app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:430-453 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:872 — app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:872-895 | app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:903-926 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×2
  • Edited copy of a member (28 corresponding lines) app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1577 — app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1577-1604 | app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1610-1643 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:1421 — app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:1421-1448 | app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1715-1749 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×2
  • Edited copy of a member (42 corresponding lines) app/src/main/java/dev/openbili/webdemo/bangumi/BangumiIndexViewModel.kt:233 — app/src/main/java/dev/openbili/webdemo/bangumi/BangumiIndexViewModel.kt:233-277 | app/src/main/java/dev/openbili/webdemo/bangumi/BangumiIndexViewModel.kt:279-320 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:317 — app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:317-360 | app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:366-407 — 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 (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:170 — app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:170-196 | app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:207-235 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:515 — app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:515-541 | app/src/main/java/dev/openbili/webdemo/live/BiliLiveApi.kt:679-706 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:590 — app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:590-612 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:623-646 — 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) app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:1002 — app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:1002-1024 | app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:1079-1101 — 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 (20 corresponding lines) · ×2
  • Edited copy of a member (20 corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:112 — app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:112-131 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:141-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.
  • Edited copy of a member (20 corresponding lines) app/src/main/java/dev/openbili/webdemo/AuthViewModel.kt:74 — app/src/main/java/dev/openbili/webdemo/AuthViewModel.kt:74-97 | app/src/main/java/dev/openbili/webdemo/AuthViewModel.kt:99-118 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:246 — app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:246-262 | app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:265-281 — 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) app/src/main/java/dev/openbili/webdemo/bangumi/BangumiIndexViewModel.kt:158 — app/src/main/java/dev/openbili/webdemo/bangumi/BangumiIndexViewModel.kt:158-177 | app/src/main/java/dev/openbili/webdemo/bangumi/BangumiIndexViewModel.kt:179-195 — 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 (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:432 — app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:432-443 | app/src/main/java/dev/openbili/webdemo/api/DanmakuProtoParser.kt:76-87 — 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) app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:477 — app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:477-490 | app/src/main/java/dev/openbili/webdemo/feed/FeedItemJsonParser.kt:143-154 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 8+ corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:42 — app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:42-50 | app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:62-71 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:798-805 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:117 — app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:117-124 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:126-133 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:135-142 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×2
  • Edited copy of a member (11 corresponding lines) app/src/main/java/dev/openbili/webdemo/BangumiPlaybackStore.kt:21 — app/src/main/java/dev/openbili/webdemo/BangumiPlaybackStore.kt:21-31 | app/src/main/java/dev/openbili/webdemo/PlaybackProgressStore.kt:20-30 — 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) app/src/main/java/dev/openbili/webdemo/video/DanmakuWindowController.kt:145 — app/src/main/java/dev/openbili/webdemo/video/DanmakuWindowController.kt:145-158 | app/src/main/java/dev/openbili/webdemo/video/DanmakuWindowController.kt:163-173 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:865 — app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:865-885 | app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1034-1054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:865` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1451 — app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1451-1471 | app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1481-1501 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×2
  • Duplicated block (20 lines × 3) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:666 — app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:666-685 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:702-721 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:738-757 — 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 (20 lines × 3) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:566 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:566-585 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:61-80 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:453-472 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:227 — app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:227-244 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:268-284 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17–18 lines × 2) app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:805 — app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:805-822 | app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:917-933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:805` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:540 — app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:540-554 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1731-1746 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:540` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15–16 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1365 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1365-1379 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:314-329 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1365` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:175 — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:175-186 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:193-205 — 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 `app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:175` it does not close everything it opens, so those exact lines 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) app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:552 — app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:552-564 | app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:808-819 — 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 `app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:552` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×2
  • Duplicated block (10–12 lines × 2) app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:287 — app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:287-298 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1549-1558 — 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 `app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:287` it begins part-way through the construct above it, so those exact lines 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–12 lines × 2) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1177 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1177-1186 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1272-1283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:1433 — app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:1433-1440 | app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1733-1741 — 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 `app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:1433` 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 (8–9 lines × 2) app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1741 — app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1741-1748 | app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1771-1779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1741` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:568 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:568-575 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:616-623 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:648-655 — 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 `app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:568` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 3) app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:344 — app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:344-351 | app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:379-386 | app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:408-415 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:165 — app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:165-171 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:726-733 — 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 `app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:493 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:493-500 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1432-1438 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:493` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:792 — app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:792-798 | app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:462-470 | app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:644-650 — 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 `app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:792` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 3) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:399 — app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:399-405 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:490-496 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1429-1435 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:399` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:67 — app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:67-73 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:385-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:67` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6–7 lines × 2) app/src/main/java/dev/openbili/webdemo/video/ControllerDanmakuSettingsPanel.kt:61 — app/src/main/java/dev/openbili/webdemo/video/ControllerDanmakuSettingsPanel.kt:61-66 | app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackPanel.kt:40-46 — 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 `app/src/main/java/dev/openbili/webdemo/video/ControllerDanmakuSettingsPanel.kt:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:288 — app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:288-292 | app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:341-346 | app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:405-410 — 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 `app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:185 — app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:185-191 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:68-73 | app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:386-390 — 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 `app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×2
  • Swallowed exception (empty catch) app/src/main/java/dev/openbili/webdemo/AuthViewModel.kt:70 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:526 — 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.
D1 · Cyclomatic Complexity · VideoScreenKt.VideoScreen (cyclomatic 162) · ×1
  • VideoScreenKt.VideoScreen (cyclomatic 162) app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:220 — VideoScreenKt.VideoScreen has cyclomatic complexity 162 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeHubScreenKt.HomeHubScreen (cyclomatic 157) · ×1
  • HomeHubScreenKt.HomeHubScreen (cyclomatic 157) app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:264 — HomeHubScreenKt.HomeHubScreen has cyclomatic complexity 157 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VideoPageContentKt.VideoContent (cyclomatic 154) · ×1
  • VideoPageContentKt.VideoContent (cyclomatic 154) app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:139 — VideoPageContentKt.VideoContent has cyclomatic complexity 154 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommentCardKt.CommentRow (cyclomatic 114) · ×1
  • CommentCardKt.CommentRow (cyclomatic 114) app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:320 — CommentCardKt.CommentRow has cyclomatic complexity 114 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HomeMusicPlayerScreenKt.HomeMusicPlayerScreen (cyclomatic 85) · ×1
  • HomeMusicPlayerScreenKt.HomeMusicPlayerScreen (cyclomatic 85) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:135 — HomeMusicPlayerScreenKt.HomeMusicPlayerScreen has cyclomatic complexity 85 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootFeedContext.FeedLayer (cyclomatic 77) · ×1
  • AppRootFeedContext.FeedLayer (cyclomatic 77) app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt:319 — AppRootFeedContext.FeedLayer has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootTailKt.appRootTailContent (cyclomatic 77) · ×1
  • AppRootTailKt.appRootTailContent (cyclomatic 77) app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:189 — AppRootTailKt.appRootTailContent has cyclomatic complexity 77 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootKt.AppRoot (cyclomatic 76) · ×1
  • AppRootKt.AppRoot (cyclomatic 76) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:228 — AppRootKt.AppRoot has cyclomatic complexity 76 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootVideoContext.VideoLayer (cyclomatic 72) · ×1
  • AppRootVideoContext.VideoLayer (cyclomatic 72) app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoLayer.kt:275 — AppRootVideoContext.VideoLayer has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BangumiRecommendationScreenKt.BangumiRecommendationScreen (cyclomatic 72) · ×1
  • BangumiRecommendationScreenKt.BangumiRecommendationScreen (cyclomatic 72) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:302 — BangumiRecommendationScreenKt.BangumiRecommendationScreen has cyclomatic complexity 72 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ControllerFullscreenPlaybackScreenKt.ControllerFullscreenPlaybackScreen (cyclomatic 72) · ×1
  • ControllerFullscreenPlaybackScreenKt.ControllerFullscreenPlaybackScreen (cyclomatic 72) app/src/main/java/dev/openbili/webdemo/video/ControllerFullscreenPlaybackScreen.kt:69 — ControllerFullscreenPlaybackScreenKt.ControllerFullscreenPlaybackScreen has cyclomatic complexity 72 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LiveRoomScreenKt.LivePlayerCard (cyclomatic 67) · ×1
  • LiveRoomScreenKt.LivePlayerCard (cyclomatic 67) app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:801 — LiveRoomScreenKt.LivePlayerCard has cyclomatic complexity 67 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ArticleScreenKt.ArticleScreen (cyclomatic 66) · ×1
  • ArticleScreenKt.ArticleScreen (cyclomatic 66) app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:126 — ArticleScreenKt.ArticleScreen has cyclomatic complexity 66 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DanmakuMaskParser.flattenPathData (cyclomatic 65) · ×1
  • DanmakuMaskParser.flattenPathData (cyclomatic 65) app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:188 — DanmakuMaskParser.flattenPathData has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeMusicTrackListKt.MusicTrackList (cyclomatic 63) · ×1
  • HomeMusicTrackListKt.MusicTrackList (cyclomatic 63) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:89 — HomeMusicTrackListKt.MusicTrackList has cyclomatic complexity 63 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MyScreenKt.MyScreen (cyclomatic 61) · ×1
  • MyScreenKt.MyScreen (cyclomatic 61) app/src/main/java/dev/openbili/webdemo/my/MyScreen.kt:79 — MyScreenKt.MyScreen has cyclomatic complexity 61 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProfileScreenKt.ProfileScreen (cyclomatic 61) · ×1
  • ProfileScreenKt.ProfileScreen (cyclomatic 61) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:233 — ProfileScreenKt.ProfileScreen has cyclomatic complexity 61 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProfileDynamicScreenKt.ProfileDynamicGrid (cyclomatic 60) · ×1
  • ProfileDynamicScreenKt.ProfileDynamicGrid (cyclomatic 60) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:283 — ProfileDynamicScreenKt.ProfileDynamicGrid has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MyScreenHistoryKt.HistoryPanel (cyclomatic 58) · ×1
  • MyScreenHistoryKt.HistoryPanel (cyclomatic 58) app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:223 — MyScreenHistoryKt.HistoryPanel has cyclomatic complexity 58 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootProfileLayerKt.AppRootProfileLayer (cyclomatic 58) · ×1
  • AppRootProfileLayerKt.AppRootProfileLayer (cyclomatic 58) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:67 — AppRootProfileLayerKt.AppRootProfileLayer has cyclomatic complexity 58 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AppRootEnterBangumiContext.startEnterVideo (cyclomatic 54) · ×1
  • AppRootEnterBangumiContext.startEnterVideo (cyclomatic 54) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:174 — AppRootEnterBangumiContext.startEnterVideo has cyclomatic complexity 54 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HomeMusicLibraryPaneKt.MusicLibraryPane (cyclomatic 54) · ×1
  • HomeMusicLibraryPaneKt.MusicLibraryPane (cyclomatic 54) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicLibraryPane.kt:68 — HomeMusicLibraryPaneKt.MusicLibraryPane has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BangumiIndexScreenKt.BangumiIndexScreen (cyclomatic 53) · ×1
  • BangumiIndexScreenKt.BangumiIndexScreen (cyclomatic 53) app/src/main/java/dev/openbili/webdemo/ui/BangumiIndexScreen.kt:166 — BangumiIndexScreenKt.BangumiIndexScreen has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoActionDialogsKt.RecommendationCard (cyclomatic 51) · ×1
  • VideoActionDialogsKt.RecommendationCard (cyclomatic 51) app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:581 — VideoActionDialogsKt.RecommendationCard has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LiveRoomControlNavigationKt.LiveRoomControllerPlaybackScreen (cyclomatic 50) · ×1
  • LiveRoomControlNavigationKt.LiveRoomControllerPlaybackScreen (cyclomatic 50) app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:73 — LiveRoomControlNavigationKt.LiveRoomControllerPlaybackScreen has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProfileDynamicScreenKt.DynamicDetail (cyclomatic 47) · ×1
  • ProfileDynamicScreenKt.DynamicDetail (cyclomatic 47) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1434 — ProfileDynamicScreenKt.DynamicDetail has cyclomatic complexity 47 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootExitContext.startExitRootBangumi (cyclomatic 46) · ×1
  • AppRootExitContext.startExitRootBangumi (cyclomatic 46) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:279 — AppRootExitContext.startExitRootBangumi has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LiveRoomScreenKt.LiveRoomScreen (cyclomatic 45) · ×1
  • LiveRoomScreenKt.LiveRoomScreen (cyclomatic 45) app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:158 — LiveRoomScreenKt.LiveRoomScreen has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BangumiExploringRailKt.AnimeFollowingSection (cyclomatic 45) · ×1
  • BangumiExploringRailKt.AnimeFollowingSection (cyclomatic 45) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:875 — BangumiExploringRailKt.AnimeFollowingSection has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProfileScreenKt.ProfileHeader (cyclomatic 44) · ×1
  • ProfileScreenKt.ProfileHeader (cyclomatic 44) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:927 — ProfileScreenKt.ProfileHeader has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MyViewModel.select (cyclomatic 42) · ×1
  • MyViewModel.select (cyclomatic 42) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:416 — MyViewModel.select has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BiliPrivateMessageApi.parsePrivateContent (cyclomatic 41) · ×1
  • BiliPrivateMessageApi.parsePrivateContent (cyclomatic 41) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:320 — BiliPrivateMessageApi.parsePrivateContent has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MyScreenMessagesKt.NativeMessagePane (cyclomatic 40) · ×1
  • MyScreenMessagesKt.NativeMessagePane (cyclomatic 40) app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:247 — MyScreenMessagesKt.NativeMessagePane has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SearchScreenKt.SearchResultsScreen (cyclomatic 39) · ×1
  • SearchScreenKt.SearchResultsScreen (cyclomatic 39) app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:520 — SearchScreenKt.SearchResultsScreen has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BangumiExploreScreenKt.BangumiExploreScreen (cyclomatic 38) · ×1
  • BangumiExploreScreenKt.BangumiExploreScreen (cyclomatic 38) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:152 — BangumiExploreScreenKt.BangumiExploreScreen has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BiliHistoryApi.parseHistoryResponse (cyclomatic 36) · ×1
  • BiliHistoryApi.parseHistoryResponse (cyclomatic 36) app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:215 — BiliHistoryApi.parseHistoryResponse has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootExitContext.reverseActiveEnter (cyclomatic 36) · ×1
  • AppRootExitContext.reverseActiveEnter (cyclomatic 36) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1186 — AppRootExitContext.reverseActiveEnter 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.
D1 · Cyclomatic Complexity · AppRootProfileContext.openCommentProfileFrom (cyclomatic 36) · ×1
  • AppRootProfileContext.openCommentProfileFrom (cyclomatic 36) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:364 — AppRootProfileContext.openCommentProfileFrom 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.
D1 · Cyclomatic Complexity · AppRootUiOverlaysKt.AppRootUiOverlays (cyclomatic 36) · ×1
  • AppRootUiOverlaysKt.AppRootUiOverlays (cyclomatic 36) app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:54 — AppRootUiOverlaysKt.AppRootUiOverlays 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.
D1 · Cyclomatic Complexity · PlayerGesturesKt.PlayerGestureLayer (cyclomatic 36) · ×1
  • PlayerGesturesKt.PlayerGestureLayer (cyclomatic 36) app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt:61 — PlayerGesturesKt.PlayerGestureLayer 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.
D1 · Cyclomatic Complexity · MyScreenFavoritesKt.VideoPanel (cyclomatic 35) · ×1
  • MyScreenFavoritesKt.VideoPanel (cyclomatic 35) app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:217 — MyScreenFavoritesKt.VideoPanel has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MyScreenSettingsKt.SettingsPane (cyclomatic 35) · ×1
  • MyScreenSettingsKt.SettingsPane (cyclomatic 35) app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:89 — MyScreenSettingsKt.SettingsPane has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootProfileContext.openAvatarProfileFrom (cyclomatic 35) · ×1
  • AppRootProfileContext.openAvatarProfileFrom (cyclomatic 35) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:200 — AppRootProfileContext.openAvatarProfileFrom has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BangumiRecommendationScreenKt.BangumiCardStack (cyclomatic 35) · ×1
  • BangumiRecommendationScreenKt.BangumiCardStack (cyclomatic 35) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1603 — BangumiRecommendationScreenKt.BangumiCardStack has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootPlayerKt.AppRootPlayerEffects (cyclomatic 34) · ×1
  • AppRootPlayerKt.AppRootPlayerEffects (cyclomatic 34) app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayer.kt:253 — AppRootPlayerKt.AppRootPlayerEffects has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlaybackHeaderKt.PlaybackHeader (cyclomatic 34) · ×1
  • PlaybackHeaderKt.PlaybackHeader (cyclomatic 34) app/src/main/java/dev/openbili/webdemo/video/PlaybackHeader.kt:79 — PlaybackHeaderKt.PlaybackHeader has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlayerControlsKt.DanmakuComposer (cyclomatic 34) · ×1
  • PlayerControlsKt.DanmakuComposer (cyclomatic 34) app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:97 — PlayerControlsKt.DanmakuComposer has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlayerControlsKt.ModernPlayerControls (cyclomatic 34) · ×1
  • PlayerControlsKt.ModernPlayerControls (cyclomatic 34) app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:455 — PlayerControlsKt.ModernPlayerControls has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SearchScreenKt.SearchScreen (cyclomatic 33) · ×1
  • SearchScreenKt.SearchScreen (cyclomatic 33) app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:136 — SearchScreenKt.SearchScreen 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.
D1 · Cyclomatic Complexity · CommentComposerKt.CommentComposer (cyclomatic 33) · ×1
  • CommentComposerKt.CommentComposer (cyclomatic 33) app/src/main/java/dev/openbili/webdemo/video/CommentComposer.kt:97 — CommentComposerKt.CommentComposer 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.
D1 · Cyclomatic Complexity · ControllerPlaybackStateKt.resolveControllerPlaybackKeyAction (cyclomatic 32) · ×1
  • ControllerPlaybackStateKt.resolveControllerPlaybackKeyAction (cyclomatic 32) app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackState.kt:52 — ControllerPlaybackStateKt.resolveControllerPlaybackKeyAction has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoScreenWidgetsKt.VideoActionPanel (cyclomatic 31) · ×1
  • VideoScreenWidgetsKt.VideoActionPanel (cyclomatic 31) app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1191 — VideoScreenWidgetsKt.VideoActionPanel has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BangumiExploreViewModel.loadFollowing (cyclomatic 29) · ×1
  • BangumiExploreViewModel.loadFollowing (cyclomatic 29) app/src/main/java/dev/openbili/webdemo/bangumi/BangumiExploreViewModel.kt:398 — BangumiExploreViewModel.loadFollowing has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BiliBangumiApi.resolveVideoBvid (cyclomatic 28) · ×1
  • BiliBangumiApi.resolveVideoBvid (cyclomatic 28) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:1106 — BiliBangumiApi.resolveVideoBvid has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeedScreenKt.FeedCard (cyclomatic 28) · ×1
  • FeedScreenKt.FeedCard (cyclomatic 28) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:925 — FeedScreenKt.FeedCard has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PopularFeedViewModel.loadCurrent (cyclomatic 28) · ×1
  • PopularFeedViewModel.loadCurrent (cyclomatic 28) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:178 — PopularFeedViewModel.loadCurrent has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MyScreenMessagesKt.PrivateMessageBubble (cyclomatic 28) · ×1
  • MyScreenMessagesKt.PrivateMessageBubble (cyclomatic 28) app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:653 — MyScreenMessagesKt.PrivateMessageBubble has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProfileScreenKt.ProfileMenu (cyclomatic 28) · ×1
  • ProfileScreenKt.ProfileMenu (cyclomatic 28) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:768 — ProfileScreenKt.ProfileMenu has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoHeaderContentKt.VideoInfoTile (cyclomatic 28) · ×1
  • VideoHeaderContentKt.VideoInfoTile (cyclomatic 28) app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:210 — VideoHeaderContentKt.VideoInfoTile has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoScreenControlKt.handleControlPlayerKey (cyclomatic 28) · ×1
  • VideoScreenControlKt.handleControlPlayerKey (cyclomatic 28) app/src/main/java/dev/openbili/webdemo/video/VideoScreenControl.kt:353 — VideoScreenControlKt.handleControlPlayerKey has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BiliInteractionApi.parseLikeMessagePage (cyclomatic 27) · ×1
  • BiliInteractionApi.parseLikeMessagePage (cyclomatic 27) app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:86 — BiliInteractionApi.parseLikeMessagePage has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AppRootExitContext.startExitBangumi (cyclomatic 27) · ×1
  • AppRootExitContext.startExitBangumi (cyclomatic 27) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:501 — AppRootExitContext.startExitBangumi has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootLiveLayerKt.AppRootLiveLayer (cyclomatic 27) · ×1
  • AppRootLiveLayerKt.AppRootLiveLayer (cyclomatic 27) app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveLayer.kt:52 — AppRootLiveLayerKt.AppRootLiveLayer has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DanmakuOverlayView.update (cyclomatic 27) · ×1
  • DanmakuOverlayView.update (cyclomatic 27) app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:343 — DanmakuOverlayView.update has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootProfileContext.closeProfile (cyclomatic 26) · ×1
  • AppRootProfileContext.closeProfile (cyclomatic 26) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:595 — AppRootProfileContext.closeProfile has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommentVideoLinksKt.parseCommentVideoLinks (cyclomatic 26) · ×1
  • CommentVideoLinksKt.parseCommentVideoLinks (cyclomatic 26) app/src/main/java/dev/openbili/webdemo/video/CommentVideoLinks.kt:181 — CommentVideoLinksKt.parseCommentVideoLinks has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BangumiExploreScreenKt.ExploreCategoryGridContent (cyclomatic 25) · ×1
  • BangumiExploreScreenKt.ExploreCategoryGridContent (cyclomatic 25) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1176 — BangumiExploreScreenKt.ExploreCategoryGridContent has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PopularFeedScreenKt.PopularFeedScreen (cyclomatic 24) · ×1
  • PopularFeedScreenKt.PopularFeedScreen (cyclomatic 24) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:127 — PopularFeedScreenKt.PopularFeedScreen has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SearchViewModel.loadPage (cyclomatic 24) · ×1
  • SearchViewModel.loadPage (cyclomatic 24) app/src/main/java/dev/openbili/webdemo/search/SearchViewModel.kt:301 — SearchViewModel.loadPage has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootUiValuesFileKt.computeAppRootUiValues (cyclomatic 24) · ×1
  • AppRootUiValuesFileKt.computeAppRootUiValues (cyclomatic 24) app/src/main/java/dev/openbili/webdemo/ui/AppRootUiValuesFile.kt:39 — AppRootUiValuesFileKt.computeAppRootUiValues has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BottomCapsuleKt.CapsuleItem (cyclomatic 24) · ×1
  • BottomCapsuleKt.CapsuleItem (cyclomatic 24) app/src/main/java/dev/openbili/webdemo/ui/BottomCapsule.kt:272 — BottomCapsuleKt.CapsuleItem has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProfileCollectionScreenKt.ProfileCollectionGrid (cyclomatic 23) · ×1
  • ProfileCollectionScreenKt.ProfileCollectionGrid (cyclomatic 23) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:87 — ProfileCollectionScreenKt.ProfileCollectionGrid has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootExitContext.startBackToPreviousVideo (cyclomatic 23) · ×1
  • AppRootExitContext.startBackToPreviousVideo (cyclomatic 23) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1006 — AppRootExitContext.startBackToPreviousVideo has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BangumiExploringRailKt.AnimeExploreContent (cyclomatic 23) · ×1
  • BangumiExploringRailKt.AnimeExploreContent (cyclomatic 23) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:105 — BangumiExploringRailKt.AnimeExploreContent 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.
D1 · Cyclomatic Complexity · VideoScreenWidgetsKt.CommentImagePreviewPage (cyclomatic 23) · ×1
  • VideoScreenWidgetsKt.CommentImagePreviewPage (cyclomatic 23) app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:633 — VideoScreenWidgetsKt.CommentImagePreviewPage 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.
D1 · Cyclomatic Complexity · BiliBangumiApi.getBangumiSeason (cyclomatic 22) · ×1
  • BiliBangumiApi.getBangumiSeason (cyclomatic 22) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:918 — BiliBangumiApi.getBangumiSeason has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeDynamicScreenKt.HomeDynamicScreen (cyclomatic 22) · ×1
  • HomeDynamicScreenKt.HomeDynamicScreen (cyclomatic 22) app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:150 — HomeDynamicScreenKt.HomeDynamicScreen has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CachedVideosPaneKt.OfflineFeedCard (cyclomatic 22) · ×1
  • CachedVideosPaneKt.OfflineFeedCard (cyclomatic 22) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:498 — CachedVideosPaneKt.OfflineFeedCard has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProfileScreenKt.ProfileBangumiGrid (cyclomatic 22) · ×1
  • ProfileScreenKt.ProfileBangumiGrid (cyclomatic 22) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1521 — ProfileScreenKt.ProfileBangumiGrid has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AppRootExitContext.startExitVideoToProfile (cyclomatic 22) · ×1
  • AppRootExitContext.startExitVideoToProfile (cyclomatic 22) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:685 — AppRootExitContext.startExitVideoToProfile has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlayerGesturesKt.twoFingerPlayerGesture (cyclomatic 22) · ×1
  • PlayerGesturesKt.twoFingerPlayerGesture (cyclomatic 22) app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt:525 — PlayerGesturesKt.twoFingerPlayerGesture has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoSelectionPanelKt.VideoSelectionPanel (cyclomatic 22) · ×1
  • VideoSelectionPanelKt.VideoSelectionPanel (cyclomatic 22) app/src/main/java/dev/openbili/webdemo/video/VideoSelectionPanel.kt:64 — VideoSelectionPanelKt.VideoSelectionPanel has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlayerViewModel.preparePlayer (cyclomatic 21) · ×1
  • PlayerViewModel.preparePlayer (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:486 — PlayerViewModel.preparePlayer has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LivePacketParser.parseBusinessMessages (cyclomatic 21) · ×1
  • LivePacketParser.parseBusinessMessages (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/live/LiveDanmakuClient.kt:285 — LivePacketParser.parseBusinessMessages has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · LiveRoomViewModel.handleSocketEvent (cyclomatic 21) · ×1
  • LiveRoomViewModel.handleSocketEvent (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt:913 — LiveRoomViewModel.handleSocketEvent has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CachedVideosPaneKt.CachedVideosPane (cyclomatic 21) · ×1
  • CachedVideosPaneKt.CachedVideosPane (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:119 — CachedVideosPaneKt.CachedVideosPane has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CachedVideosPaneKt.BatchDeleteDialog (cyclomatic 21) · ×1
  • CachedVideosPaneKt.BatchDeleteDialog (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:739 — CachedVideosPaneKt.BatchDeleteDialog has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootArticleLayerKt.AppRootArticleLayer (cyclomatic 21) · ×1
  • AppRootArticleLayerKt.AppRootArticleLayer (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticleLayer.kt:28 — AppRootArticleLayerKt.AppRootArticleLayer has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootEnterBangumiContext.startSearchBangumi (cyclomatic 21) · ×1
  • AppRootEnterBangumiContext.startSearchBangumi (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:899 — AppRootEnterBangumiContext.startSearchBangumi has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootEnterBangumiContext.startProfileBangumi (cyclomatic 21) · ×1
  • AppRootEnterBangumiContext.startProfileBangumi (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1063 — AppRootEnterBangumiContext.startProfileBangumi has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppTransitionsKt.CardTransitionOverlay (cyclomatic 21) · ×1
  • AppTransitionsKt.CardTransitionOverlay (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/ui/AppTransitions.kt:390 — AppTransitionsKt.CardTransitionOverlay has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ControlRemoteKt.resolveControlVideoSurfaceAction (cyclomatic 21) · ×1
  • ControlRemoteKt.resolveControlVideoSurfaceAction (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/ui/ControlRemote.kt:133 — ControlRemoteKt.resolveControlVideoSurfaceAction has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HomeMusicRemoteControlsKt.MusicTransportControls (cyclomatic 21) · ×1
  • HomeMusicRemoteControlsKt.MusicTransportControls (cyclomatic 21) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicRemoteControls.kt:71 — HomeMusicRemoteControlsKt.MusicTransportControls has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FeedScreenKt.FeedScreen (cyclomatic 20) · ×1
  • FeedScreenKt.FeedScreen (cyclomatic 20) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:124 — FeedScreenKt.FeedScreen has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MyScreenFollowingKt.FollowingPanel (cyclomatic 20) · ×1
  • MyScreenFollowingKt.FollowingPanel (cyclomatic 20) app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:226 — MyScreenFollowingKt.FollowingPanel has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MyViewModel.loadFollowingPage (cyclomatic 20) · ×1
  • MyViewModel.loadFollowingPage (cyclomatic 20) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1588 — MyViewModel.loadFollowingPage has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OfflineCacheChooserDialogKt.OfflineCacheChooserDialog (cyclomatic 20) · ×1
  • OfflineCacheChooserDialogKt.OfflineCacheChooserDialog (cyclomatic 20) app/src/main/java/dev/openbili/webdemo/offline/OfflineCacheChooserDialog.kt:56 — OfflineCacheChooserDialogKt.OfflineCacheChooserDialog has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootArticleContext.startEnterArticle (cyclomatic 20) · ×1
  • AppRootArticleContext.startEnterArticle (cyclomatic 20) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticle.kt:242 — AppRootArticleContext.startEnterArticle has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootExitContext.startExitVideo (cyclomatic 20) · ×1
  • AppRootExitContext.startExitVideo (cyclomatic 20) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:864 — AppRootExitContext.startExitVideo has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BangumiExploreScreenKt.ExploreFocusBanner (cyclomatic 20) · ×1
  • BangumiExploreScreenKt.ExploreFocusBanner (cyclomatic 20) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1472 — BangumiExploreScreenKt.ExploreFocusBanner has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ControllerPlaybackSelectionPanelKt.ControllerPlaybackSelectionPanel (cyclomatic 20) · ×1
  • ControllerPlaybackSelectionPanelKt.ControllerPlaybackSelectionPanel (cyclomatic 20) app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackSelectionPanel.kt:41 — ControllerPlaybackSelectionPanelKt.ControllerPlaybackSelectionPanel has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SubtitleViewProtoParser.parseTrack (cyclomatic 19) · ×1
  • SubtitleViewProtoParser.parseTrack (cyclomatic 19) app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:381 — SubtitleViewProtoParser.parseTrack has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DanmakuProtoParser.parseElement (cyclomatic 19) · ×1
  • DanmakuProtoParser.parseElement (cyclomatic 19) app/src/main/java/dev/openbili/webdemo/api/DanmakuProtoParser.kt:29 — DanmakuProtoParser.parseElement has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HomeDynamicViewModel.load (cyclomatic 19) · ×1
  • HomeDynamicViewModel.load (cyclomatic 19) app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicViewModel.kt:348 — HomeDynamicViewModel.load has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootArticleContext.openInteractionTarget (cyclomatic 19) · ×1
  • AppRootArticleContext.openInteractionTarget (cyclomatic 19) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticle.kt:326 — AppRootArticleContext.openInteractionTarget has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootEnterBangumiContext.startProfileVideo (cyclomatic 19) · ×1
  • AppRootEnterBangumiContext.startProfileVideo (cyclomatic 19) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:418 — AppRootEnterBangumiContext.startProfileVideo has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ControlRemoteKt.resolveControlPlayerAction (cyclomatic 19) · ×1
  • ControlRemoteKt.resolveControlPlayerAction (cyclomatic 19) app/src/main/java/dev/openbili/webdemo/ui/ControlRemote.kt:193 — ControlRemoteKt.resolveControlPlayerAction has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PressableVideoCardKt.PressableVideoCard (cyclomatic 19) · ×1
  • PressableVideoCardKt.PressableVideoCard (cyclomatic 19) app/src/main/java/dev/openbili/webdemo/ui/PressableVideoCard.kt:41 — PressableVideoCardKt.PressableVideoCard has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BiliRichTextKt.BiliRichText (cyclomatic 19) · ×1
  • BiliRichTextKt.BiliRichText (cyclomatic 19) app/src/main/java/dev/openbili/webdemo/video/BiliRichText.kt:102 — BiliRichTextKt.BiliRichText has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BiliInteractionApi.parseAccountMessagePage (cyclomatic 18) · ×1
  • BiliInteractionApi.parseAccountMessagePage (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:303 — BiliInteractionApi.parseAccountMessagePage 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.
D1 · Cyclomatic Complexity · PopularFeedScreenKt.PopularVideoCard (cyclomatic 18) · ×1
  • PopularFeedScreenKt.PopularVideoCard (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:850 — PopularFeedScreenKt.PopularVideoCard has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LiveRoomSecondaryKt.LiveRankSection (cyclomatic 18) · ×1
  • LiveRoomSecondaryKt.LiveRankSection (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/live/LiveRoomSecondary.kt:174 — LiveRoomSecondaryKt.LiveRankSection has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MyViewModel.updateFavoriteFolders (cyclomatic 18) · ×1
  • MyViewModel.updateFavoriteFolders (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:2085 — MyViewModel.updateFavoriteFolders has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WatchLaterViewModel.update (cyclomatic 18) · ×1
  • WatchLaterViewModel.update (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/my/WatchLaterViewModel.kt:102 — WatchLaterViewModel.update has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OfflineMediaManager.prepareAndQueue (cyclomatic 18) · ×1
  • OfflineMediaManager.prepareAndQueue (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:601 — OfflineMediaManager.prepareAndQueue has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootProfileOverlayKt.AppRootProfileOverlay (cyclomatic 18) · ×1
  • AppRootProfileOverlayKt.AppRootProfileOverlay (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:29 — AppRootProfileOverlayKt.AppRootProfileOverlay has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BangumiRecommendationScreenKt.BangumiRecommendationFallbackWithExplore (cyclomatic 18) · ×1
  • BangumiRecommendationScreenKt.BangumiRecommendationFallbackWithExplore (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:901 — BangumiRecommendationScreenKt.BangumiRecommendationFallbackWithExplore has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DanmakuOverlayView.drawDanmaku (cyclomatic 18) · ×1
  • DanmakuOverlayView.drawDanmaku (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:754 — DanmakuOverlayView.drawDanmaku has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoSelectionOverlayKt.VideoSelectionOverlay (cyclomatic 18) · ×1
  • VideoSelectionOverlayKt.VideoSelectionOverlay (cyclomatic 18) app/src/main/java/dev/openbili/webdemo/video/VideoSelectionOverlay.kt:31 — VideoSelectionOverlayKt.VideoSelectionOverlay has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BaselineProfileGenerator.captureBaselineProfile (cyclomatic 18) · ×1
  • BaselineProfileGenerator.captureBaselineProfile (cyclomatic 18) baselineprofile/src/main/java/dev/openbili/webdemo/baselineprofile/BaselineProfileGenerator.kt:32 — BaselineProfileGenerator.captureBaselineProfile has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BiliVideoApi.parsePlayUrlData (cyclomatic 17) · ×1
  • BiliVideoApi.parsePlayUrlData (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:294 — BiliVideoApi.parsePlayUrlData has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MyScreenFollowingKt.FollowingUserCard (cyclomatic 17) · ×1
  • MyScreenFollowingKt.FollowingUserCard (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:389 — MyScreenFollowingKt.FollowingUserCard has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MyViewModel.loadHistoryPeriodPage (cyclomatic 17) · ×1
  • MyViewModel.loadHistoryPeriodPage (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1020 — MyViewModel.loadHistoryPeriodPage has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProfileDynamicScreenKt.DynamicImageGrid (cyclomatic 17) · ×1
  • ProfileDynamicScreenKt.DynamicImageGrid (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1267 — ProfileDynamicScreenKt.DynamicImageGrid has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BangumiExploringRailKt.AnimeHotStackCard (cyclomatic 17) · ×1
  • BangumiExploringRailKt.AnimeHotStackCard (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:711 — BangumiExploringRailKt.AnimeHotStackCard has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BangumiRecommendationScreenKt.bangumiPreviewPriority (cyclomatic 17) · ×1
  • BangumiRecommendationScreenKt.bangumiPreviewPriority (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:200 — BangumiRecommendationScreenKt.bangumiPreviewPriority has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · HomeHubScreenKt.HomeHubTabCapsule (cyclomatic 17) · ×1
  • HomeHubScreenKt.HomeHubTabCapsule (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1596 — HomeHubScreenKt.HomeHubTabCapsule has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HomeMusicRemoteControlsKt.MusicProgressBar (cyclomatic 17) · ×1
  • HomeMusicRemoteControlsKt.MusicProgressBar (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicRemoteControls.kt:391 — HomeMusicRemoteControlsKt.MusicProgressBar has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoScreenDialogsKt.VideoScreenDialogs (cyclomatic 17) · ×1
  • VideoScreenDialogsKt.VideoScreenDialogs (cyclomatic 17) app/src/main/java/dev/openbili/webdemo/video/VideoScreenDialogs.kt:24 — VideoScreenDialogsKt.VideoScreenDialogs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PopularFeedScreenKt.PopularSectionBar (cyclomatic 16) · ×1
  • PopularFeedScreenKt.PopularSectionBar (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:369 — PopularFeedScreenKt.PopularSectionBar has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MyViewModelModelsKt.normalizePrivateMessageHistory (cyclomatic 16) · ×1
  • MyViewModelModelsKt.normalizePrivateMessageHistory (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/my/MyViewModelModels.kt:128 — MyViewModelModelsKt.normalizePrivateMessageHistory has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootArticleContext.startExitArticle (cyclomatic 16) · ×1
  • AppRootArticleContext.startExitArticle (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticle.kt:438 — AppRootArticleContext.startExitArticle has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppRootEnterBangumiContext.startRootBangumi (cyclomatic 16) · ×1
  • AppRootEnterBangumiContext.startRootBangumi (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:820 — AppRootEnterBangumiContext.startRootBangumi has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppRootOverlayTransitionsKt.closeSearchResultsAnimated (cyclomatic 16) · ×1
  • AppRootOverlayTransitionsKt.closeSearchResultsAnimated (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:288 — AppRootOverlayTransitionsKt.closeSearchResultsAnimated has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BangumiExploringRailKt.AnimeHotHeroContent (cyclomatic 16) · ×1
  • BangumiExploringRailKt.AnimeHotHeroContent (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:458 — BangumiExploringRailKt.AnimeHotHeroContent has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BangumiRecommendationScreenKt.BangumiPreviewPlayer (cyclomatic 16) · ×1
  • BangumiRecommendationScreenKt.BangumiPreviewPlayer (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1461 — BangumiRecommendationScreenKt.BangumiPreviewPlayer has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HomeHubScreenKt.HomeGlassIconButton (cyclomatic 16) · ×1
  • HomeHubScreenKt.HomeGlassIconButton (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1301 — HomeHubScreenKt.HomeGlassIconButton has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeMusicPlayerScreenKt.MusicPlayerPane (cyclomatic 16) · ×1
  • HomeMusicPlayerScreenKt.MusicPlayerPane (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:1280 — HomeMusicPlayerScreenKt.MusicPlayerPane has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HomeMusicRemoteControlsKt.AdvancedAudioButton (cyclomatic 16) · ×1
  • HomeMusicRemoteControlsKt.AdvancedAudioButton (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicRemoteControls.kt:262 — HomeMusicRemoteControlsKt.AdvancedAudioButton has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VideoHeaderContentKt.ReplyThreadPanel (cyclomatic 16) · ×1
  • VideoHeaderContentKt.ReplyThreadPanel (cyclomatic 16) app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:530 — VideoHeaderContentKt.ReplyThreadPanel 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.
D2 · Cognitive Complexity · VideoPageContentKt.VideoContent (cognitive 273) · ×1
  • VideoPageContentKt.VideoContent (cognitive 273) app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:139 — VideoPageContentKt.VideoContent has cognitive complexity 273 (threshold 15). Drivers by points: if/else 153 (223 pts), boolean chains 40, loops 3 (5 pts), match/switch 3 (5 pts) (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoScreenKt.VideoScreen (cognitive 240) · ×1
  • VideoScreenKt.VideoScreen (cognitive 240) app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:220 — VideoScreenKt.VideoScreen has cognitive complexity 240 (threshold 15). Drivers by points: if/else 125 (169 pts), boolean chains 63, match/switch 4 (7 pts), loops 1 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootFeedContext.FeedLayer (cognitive 216) · ×1
  • AppRootFeedContext.FeedLayer (cognitive 216) app/src/main/java/dev/openbili/webdemo/ui/AppRootFeedLayer.kt:319 — AppRootFeedContext.FeedLayer has cognitive complexity 216 (threshold 15). Drivers by points: if/else 63 (190 pts), boolean chains 22, match/switch 1 (4 pts) (nesting depth added 130). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HomeHubScreenKt.HomeHubScreen (cognitive 184) · ×1
  • HomeHubScreenKt.HomeHubScreen (cognitive 184) app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:264 — HomeHubScreenKt.HomeHubScreen has cognitive complexity 184 (threshold 15). Drivers by points: if/else 101 (119 pts), boolean chains 40, match/switch 11 (22 pts), loops 3 (nesting depth added 29). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CommentCardKt.CommentRow (cognitive 181) · ×1
  • CommentCardKt.CommentRow (cognitive 181) app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:320 — CommentCardKt.CommentRow has cognitive complexity 181 (threshold 15). Drivers by points: if/else 126 (154 pts), boolean chains 25, match/switch 2 (nesting depth added 28). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootVideoContext.VideoLayer (cognitive 140) · ×1
  • AppRootVideoContext.VideoLayer (cognitive 140) app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoLayer.kt:275 — AppRootVideoContext.VideoLayer has cognitive complexity 140 (threshold 15). Drivers by points: if/else 44 (104 pts), boolean chains 26, match/switch 3 (10 pts) (nesting depth added 67). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DanmakuMaskParser.flattenPathData (cognitive 139) · ×1
  • DanmakuMaskParser.flattenPathData (cognitive 139) app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:188 — DanmakuMaskParser.flattenPathData has cognitive complexity 139 (threshold 15). Drivers by points: if/else 63 (121 pts), loops 9 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProfileDynamicScreenKt.ProfileDynamicGrid (cognitive 130) · ×1
  • ProfileDynamicScreenKt.ProfileDynamicGrid (cognitive 130) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:283 — ProfileDynamicScreenKt.ProfileDynamicGrid has cognitive complexity 130 (threshold 15). Drivers by points: if/else 56 (109 pts), boolean chains 19, match/switch 1 (2 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeMusicPlayerScreenKt.HomeMusicPlayerScreen (cognitive 122) · ×1
  • HomeMusicPlayerScreenKt.HomeMusicPlayerScreen (cognitive 122) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:135 — HomeMusicPlayerScreenKt.HomeMusicPlayerScreen has cognitive complexity 122 (threshold 15). Drivers by points: if/else 77 (90 pts), boolean chains 24, loops 4 (5 pts), match/switch 3 (nesting depth added 14). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoActionDialogsKt.RecommendationCard (cognitive 122) · ×1
  • VideoActionDialogsKt.RecommendationCard (cognitive 122) app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:581 — VideoActionDialogsKt.RecommendationCard has cognitive complexity 122 (threshold 15). Drivers by points: if/else 62 (111 pts), boolean chains 6, match/switch 2 (5 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootKt.AppRoot (cognitive 92) · ×1
  • AppRootKt.AppRoot (cognitive 92) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:228 — AppRootKt.AppRoot has cognitive complexity 92 (threshold 15). Drivers by points: if/else 58 (64 pts), boolean chains 26, loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LiveRoomScreenKt.LivePlayerCard (cognitive 90) · ×1
  • LiveRoomScreenKt.LivePlayerCard (cognitive 90) app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:801 — LiveRoomScreenKt.LivePlayerCard has cognitive complexity 90 (threshold 15). Drivers by points: if/else 52 (66 pts), boolean chains 18, match/switch 3 (5 pts), loops 1 (nesting depth added 16). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootTailKt.appRootTailContent (cognitive 89) · ×1
  • AppRootTailKt.appRootTailContent (cognitive 89) app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:189 — AppRootTailKt.appRootTailContent has cognitive complexity 89 (threshold 15). Drivers by points: if/else 52 (58 pts), boolean chains 28, match/switch 2, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BangumiRecommendationScreenKt.BangumiRecommendationScreen (cognitive 87) · ×1
  • BangumiRecommendationScreenKt.BangumiRecommendationScreen (cognitive 87) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:302 — BangumiRecommendationScreenKt.BangumiRecommendationScreen has cognitive complexity 87 (threshold 15). Drivers by points: if/else 48 (52 pts), boolean chains 30, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ArticleScreenKt.ArticleScreen (cognitive 85) · ×1
  • ArticleScreenKt.ArticleScreen (cognitive 85) app/src/main/java/dev/openbili/webdemo/article/ArticleScreen.kt:126 — ArticleScreenKt.ArticleScreen has cognitive complexity 85 (threshold 15). Drivers by points: if/else 59 (63 pts), boolean chains 20, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HomeMusicTrackListKt.MusicTrackList (cognitive 82) · ×1
  • HomeMusicTrackListKt.MusicTrackList (cognitive 82) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt:89 — HomeMusicTrackListKt.MusicTrackList has cognitive complexity 82 (threshold 15). Drivers by points: if/else 45 (57 pts), boolean chains 18, match/switch 3 (7 pts) (nesting depth added 16). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ControllerFullscreenPlaybackScreenKt.ControllerFullscreenPlaybackScreen (cognitive 82) · ×1
  • ControllerFullscreenPlaybackScreenKt.ControllerFullscreenPlaybackScreen (cognitive 82) app/src/main/java/dev/openbili/webdemo/video/ControllerFullscreenPlaybackScreen.kt:69 — ControllerFullscreenPlaybackScreenKt.ControllerFullscreenPlaybackScreen has cognitive complexity 82 (threshold 15). Drivers by points: if/else 48 (55 pts), boolean chains 18, match/switch 5 (8 pts), loops 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootExitContext.startExitRootBangumi (cognitive 81) · ×1
  • AppRootExitContext.startExitRootBangumi (cognitive 81) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:279 — AppRootExitContext.startExitRootBangumi has cognitive complexity 81 (threshold 15). Drivers by points: if/else 40 (66 pts), boolean chains 14, match/switch 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeMusicLibraryPaneKt.MusicLibraryPane (cognitive 70) · ×1
  • HomeMusicLibraryPaneKt.MusicLibraryPane (cognitive 70) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicLibraryPane.kt:68 — HomeMusicLibraryPaneKt.MusicLibraryPane has cognitive complexity 70 (threshold 15). Drivers by points: if/else 32 (47 pts), boolean chains 20, match/switch 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProfileScreenKt.ProfileScreen (cognitive 68) · ×1
  • ProfileScreenKt.ProfileScreen (cognitive 68) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:233 — ProfileScreenKt.ProfileScreen has cognitive complexity 68 (threshold 15). Drivers by points: if/else 40 (50 pts), boolean chains 13, match/switch 3, error handling 2 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ProfileDynamicScreenKt.DynamicDetail (cognitive 67) · ×1
  • ProfileDynamicScreenKt.DynamicDetail (cognitive 67) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1434 — ProfileDynamicScreenKt.DynamicDetail has cognitive complexity 67 (threshold 15). Drivers by points: if/else 51 (56 pts), boolean chains 10, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootEnterBangumiContext.startEnterVideo (cognitive 66) · ×1
  • AppRootEnterBangumiContext.startEnterVideo (cognitive 66) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:174 — AppRootEnterBangumiContext.startEnterVideo has cognitive complexity 66 (threshold 15). Drivers by points: if/else 38 (48 pts), boolean chains 13, loops 2 (4 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MyScreenMessagesKt.NativeMessagePane (cognitive 65) · ×1
  • MyScreenMessagesKt.NativeMessagePane (cognitive 65) app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:247 — MyScreenMessagesKt.NativeMessagePane has cognitive complexity 65 (threshold 15). Drivers by points: if/else 30 (49 pts), boolean chains 13, match/switch 1 (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.
D2 · Cognitive Complexity · MyScreenHistoryKt.HistoryPanel (cognitive 63) · ×1
  • MyScreenHistoryKt.HistoryPanel (cognitive 63) app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:223 — MyScreenHistoryKt.HistoryPanel has cognitive complexity 63 (threshold 15). Drivers by points: if/else 32 (40 pts), boolean chains 17, match/switch 4 (6 pts) (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ProfileScreenKt.ProfileHeader (cognitive 63) · ×1
  • ProfileScreenKt.ProfileHeader (cognitive 63) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:927 — ProfileScreenKt.ProfileHeader has cognitive complexity 63 (threshold 15). Drivers by points: if/else 45 (51 pts), boolean chains 8, match/switch 4 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerControlsKt.DanmakuComposer (cognitive 63) · ×1
  • PlayerControlsKt.DanmakuComposer (cognitive 63) app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:97 — PlayerControlsKt.DanmakuComposer has cognitive complexity 63 (threshold 15). Drivers by points: if/else 55 (59 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BangumiIndexScreenKt.BangumiIndexScreen (cognitive 62) · ×1
  • BangumiIndexScreenKt.BangumiIndexScreen (cognitive 62) app/src/main/java/dev/openbili/webdemo/ui/BangumiIndexScreen.kt:166 — BangumiIndexScreenKt.BangumiIndexScreen has cognitive complexity 62 (threshold 15). Drivers by points: if/else 30 (40 pts), boolean chains 20, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MyScreenKt.MyScreen (cognitive 61) · ×1
  • MyScreenKt.MyScreen (cognitive 61) app/src/main/java/dev/openbili/webdemo/my/MyScreen.kt:79 — MyScreenKt.MyScreen has cognitive complexity 61 (threshold 15). Drivers by points: if/else 38 (43 pts), boolean chains 15, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootProfileContext.closeProfile (cognitive 61) · ×1
  • AppRootProfileContext.closeProfile (cognitive 61) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:595 — AppRootProfileContext.closeProfile has cognitive complexity 61 (threshold 15). Drivers by points: if/else 33 (61 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.
D2 · Cognitive Complexity · MyViewModel.select (cognitive 59) · ×1
  • MyViewModel.select (cognitive 59) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:416 — MyViewModel.select has cognitive complexity 59 (threshold 15). Drivers by points: if/else 38 (53 pts), boolean chains 4, error handling 1, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BangumiExploringRailKt.AnimeFollowingSection (cognitive 59) · ×1
  • BangumiExploringRailKt.AnimeFollowingSection (cognitive 59) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:875 — BangumiExploringRailKt.AnimeFollowingSection has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (38 pts), boolean chains 16, match/switch 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CachedVideosPaneKt.BatchDeleteDialog (cognitive 58) · ×1
  • CachedVideosPaneKt.BatchDeleteDialog (cognitive 58) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:739 — CachedVideosPaneKt.BatchDeleteDialog has cognitive complexity 58 (threshold 15). Drivers by points: if/else 34 (54 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootProfileLayerKt.AppRootProfileLayer (cognitive 58) · ×1
  • AppRootProfileLayerKt.AppRootProfileLayer (cognitive 58) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileLayer.kt:67 — AppRootProfileLayerKt.AppRootProfileLayer has cognitive complexity 58 (threshold 15). Drivers by points: boolean chains 34, if/else 18, match/switch 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MyScreenMessagesKt.PrivateMessageBubble (cognitive 55) · ×1
  • MyScreenMessagesKt.PrivateMessageBubble (cognitive 55) app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:653 — MyScreenMessagesKt.PrivateMessageBubble has cognitive complexity 55 (threshold 15). Drivers by points: if/else 28 (47 pts), boolean chains 8 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootExitContext.reverseActiveEnter (cognitive 55) · ×1
  • AppRootExitContext.reverseActiveEnter (cognitive 55) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1186 — AppRootExitContext.reverseActiveEnter has cognitive complexity 55 (threshold 15). Drivers by points: if/else 36 (47 pts), boolean chains 7, match/switch 1 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LiveRoomControlNavigationKt.LiveRoomControllerPlaybackScreen (cognitive 54) · ×1
  • LiveRoomControlNavigationKt.LiveRoomControllerPlaybackScreen (cognitive 54) app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:73 — LiveRoomControlNavigationKt.LiveRoomControllerPlaybackScreen has cognitive complexity 54 (threshold 15). Drivers by points: if/else 31 (35 pts), boolean chains 12, match/switch 5 (6 pts), loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BiliBangumiApi.resolveVideoBvid (cognitive 53) · ×1
  • BiliBangumiApi.resolveVideoBvid (cognitive 53) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:1106 — BiliBangumiApi.resolveVideoBvid has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (35 pts), loops 4 (11 pts), boolean chains 7 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BiliHistoryApi.parseHistoryResponse (cognitive 53) · ×1
  • BiliHistoryApi.parseHistoryResponse (cognitive 53) app/src/main/java/dev/openbili/webdemo/api/BiliHistoryApi.kt:215 — BiliHistoryApi.parseHistoryResponse has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 12, match/switch 4 (10 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootExitContext.startExitBangumi (cognitive 53) · ×1
  • AppRootExitContext.startExitBangumi (cognitive 53) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:501 — AppRootExitContext.startExitBangumi has cognitive complexity 53 (threshold 15). Drivers by points: if/else 32 (48 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LiveRoomScreenKt.LiveRoomScreen (cognitive 52) · ×1
  • LiveRoomScreenKt.LiveRoomScreen (cognitive 52) app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:158 — LiveRoomScreenKt.LiveRoomScreen has cognitive complexity 52 (threshold 15). Drivers by points: if/else 29 (33 pts), boolean chains 17, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootPlayerKt.AppRootPlayerEffects (cognitive 52) · ×1
  • AppRootPlayerKt.AppRootPlayerEffects (cognitive 52) app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayer.kt:253 — AppRootPlayerKt.AppRootPlayerEffects has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (38 pts), boolean chains 10, loops 2 (3 pts), match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BangumiRecommendationScreenKt.BangumiCardStack (cognitive 52) · ×1
  • BangumiRecommendationScreenKt.BangumiCardStack (cognitive 52) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1603 — BangumiRecommendationScreenKt.BangumiCardStack has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 11, loops 2 (3 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentComposerKt.CommentComposer (cognitive 52) · ×1
  • CommentComposerKt.CommentComposer (cognitive 52) app/src/main/java/dev/openbili/webdemo/video/CommentComposer.kt:97 — CommentComposerKt.CommentComposer has cognitive complexity 52 (threshold 15). Drivers by points: if/else 40 (45 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerGesturesKt.twoFingerPlayerGesture (cognitive 52) · ×1
  • PlayerGesturesKt.twoFingerPlayerGesture (cognitive 52) app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt:525 — PlayerGesturesKt.twoFingerPlayerGesture has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (44 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppRootExitContext.startExitVideoToProfile (cognitive 51) · ×1
  • AppRootExitContext.startExitVideoToProfile (cognitive 51) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:685 — AppRootExitContext.startExitVideoToProfile has cognitive complexity 51 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · PlaybackHeaderKt.PlaybackHeader (cognitive 51) · ×1
  • PlaybackHeaderKt.PlaybackHeader (cognitive 51) app/src/main/java/dev/openbili/webdemo/video/PlaybackHeader.kt:79 — PlaybackHeaderKt.PlaybackHeader has cognitive complexity 51 (threshold 15). Drivers by points: if/else 32 (39 pts), boolean chains 6, match/switch 4 (6 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SearchScreenKt.SearchScreen (cognitive 50) · ×1
  • SearchScreenKt.SearchScreen (cognitive 50) app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:136 — SearchScreenKt.SearchScreen has cognitive complexity 50 (threshold 15). Drivers by points: if/else 32 (41 pts), boolean chains 8, match/switch 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoHeaderContentKt.VideoInfoTile (cognitive 50) · ×1
  • VideoHeaderContentKt.VideoInfoTile (cognitive 50) app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:210 — VideoHeaderContentKt.VideoInfoTile has cognitive complexity 50 (threshold 15). Drivers by points: if/else 29 (43 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeedScreenKt.FeedCard (cognitive 49) · ×1
  • FeedScreenKt.FeedCard (cognitive 49) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:925 — FeedScreenKt.FeedCard has cognitive complexity 49 (threshold 15). Drivers by points: if/else 32 (42 pts), boolean chains 7 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BangumiExploreScreenKt.BangumiExploreScreen (cognitive 49) · ×1
  • BangumiExploreScreenKt.BangumiExploreScreen (cognitive 49) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:152 — BangumiExploreScreenKt.BangumiExploreScreen has cognitive complexity 49 (threshold 15). Drivers by points: if/else 31 (34 pts), boolean chains 13, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerControlsKt.ModernPlayerControls (cognitive 49) · ×1
  • PlayerControlsKt.ModernPlayerControls (cognitive 49) app/src/main/java/dev/openbili/webdemo/video/PlayerControls.kt:455 — PlayerControlsKt.ModernPlayerControls has cognitive complexity 49 (threshold 15). Drivers by points: if/else 36 (42 pts), boolean chains 7 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerGesturesKt.PlayerGestureLayer (cognitive 49) · ×1
  • PlayerGesturesKt.PlayerGestureLayer (cognitive 49) app/src/main/java/dev/openbili/webdemo/video/PlayerGestures.kt:61 — PlayerGesturesKt.PlayerGestureLayer has cognitive complexity 49 (threshold 15). Drivers by points: if/else 31 (37 pts), boolean chains 9, match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SearchScreenKt.SearchResultsScreen (cognitive 46) · ×1
  • SearchScreenKt.SearchResultsScreen (cognitive 46) app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:520 — SearchScreenKt.SearchResultsScreen has cognitive complexity 46 (threshold 15). Drivers by points: if/else 32 (33 pts), boolean chains 13 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppRootUiOverlaysKt.AppRootUiOverlays (cognitive 46) · ×1
  • AppRootUiOverlaysKt.AppRootUiOverlays (cognitive 46) app/src/main/java/dev/openbili/webdemo/ui/AppRootUiOverlays.kt:54 — AppRootUiOverlaysKt.AppRootUiOverlays has cognitive complexity 46 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 16, loops 3 (6 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MyScreenSettingsKt.SettingsPane (cognitive 45) · ×1
  • MyScreenSettingsKt.SettingsPane (cognitive 45) app/src/main/java/dev/openbili/webdemo/my/MyScreenSettings.kt:89 — MyScreenSettingsKt.SettingsPane has cognitive complexity 45 (threshold 15). Drivers by points: if/else 37 (41 pts), boolean chains 2, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootExitContext.startBackToPreviousVideo (cognitive 45) · ×1
  • AppRootExitContext.startBackToPreviousVideo (cognitive 45) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1006 — AppRootExitContext.startBackToPreviousVideo has cognitive complexity 45 (threshold 15). Drivers by points: if/else 28 (42 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ControllerPlaybackStateKt.resolveControllerPlaybackKeyAction (cognitive 45) · ×1
  • ControllerPlaybackStateKt.resolveControllerPlaybackKeyAction (cognitive 45) app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackState.kt:52 — ControllerPlaybackStateKt.resolveControllerPlaybackKeyAction has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (35 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MyScreenFavoritesKt.VideoPanel (cognitive 44) · ×1
  • MyScreenFavoritesKt.VideoPanel (cognitive 44) app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:217 — MyScreenFavoritesKt.VideoPanel has cognitive complexity 44 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 10, match/switch 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootProfileContext.openCommentProfileFrom (cognitive 44) · ×1
  • AppRootProfileContext.openCommentProfileFrom (cognitive 44) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:364 — AppRootProfileContext.openCommentProfileFrom has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 20 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ProfileScreenKt.ProfileMenu (cognitive 43) · ×1
  • ProfileScreenKt.ProfileMenu (cognitive 43) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:768 — ProfileScreenKt.ProfileMenu has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 10, match/switch 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.
D2 · Cognitive Complexity · AppRootProfileContext.openAvatarProfileFrom (cognitive 43) · ×1
  • AppRootProfileContext.openAvatarProfileFrom (cognitive 43) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:200 — AppRootProfileContext.openAvatarProfileFrom has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 17 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoScreenWidgetsKt.VideoActionPanel (cognitive 42) · ×1
  • VideoScreenWidgetsKt.VideoActionPanel (cognitive 42) app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1191 — VideoScreenWidgetsKt.VideoActionPanel has cognitive complexity 42 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 14 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ProfileCollectionScreenKt.ProfileCollectionGrid (cognitive 41) · ×1
  • ProfileCollectionScreenKt.ProfileCollectionGrid (cognitive 41) app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:87 — ProfileCollectionScreenKt.ProfileCollectionGrid has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 4, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PopularFeedScreenKt.PopularVideoCard (cognitive 37) · ×1
  • PopularFeedScreenKt.PopularVideoCard (cognitive 37) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:850 — PopularFeedScreenKt.PopularVideoCard has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22 (34 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProfileDynamicScreenKt.DynamicImageGrid (cognitive 37) · ×1
  • ProfileDynamicScreenKt.DynamicImageGrid (cognitive 37) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1267 — ProfileDynamicScreenKt.DynamicImageGrid has cognitive complexity 37 (threshold 15). Drivers by points: if/else 28 (36 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootLiveLayerKt.AppRootLiveLayer (cognitive 36) · ×1
  • AppRootLiveLayerKt.AppRootLiveLayer (cognitive 36) app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveLayer.kt:52 — AppRootLiveLayerKt.AppRootLiveLayer has cognitive complexity 36 (threshold 15). Drivers by points: if/else 24 (26 pts), boolean chains 9, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoSelectionPanelKt.VideoSelectionPanel (cognitive 36) · ×1
  • VideoSelectionPanelKt.VideoSelectionPanel (cognitive 36) app/src/main/java/dev/openbili/webdemo/video/VideoSelectionPanel.kt:64 — VideoSelectionPanelKt.VideoSelectionPanel has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootArticleContext.startEnterArticle (cognitive 35) · ×1
  • AppRootArticleContext.startEnterArticle (cognitive 35) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticle.kt:242 — AppRootArticleContext.startEnterArticle has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23 (31 pts), boolean chains 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.
D2 · Cognitive Complexity · DanmakuOverlayView.update (cognitive 35) · ×1
  • DanmakuOverlayView.update (cognitive 35) app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:343 — DanmakuOverlayView.update has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 10 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoScreenWidgetsKt.CommentImagePreviewPage (cognitive 35) · ×1
  • VideoScreenWidgetsKt.CommentImagePreviewPage (cognitive 35) app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:633 — VideoScreenWidgetsKt.CommentImagePreviewPage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 27 (31 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CachedVideosPaneKt.CachedVideosPane (cognitive 34) · ×1
  • CachedVideosPaneKt.CachedVideosPane (cognitive 34) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:119 — CachedVideosPaneKt.CachedVideosPane has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppTransitionsKt.CardTransitionOverlay (cognitive 34) · ×1
  • AppTransitionsKt.CardTransitionOverlay (cognitive 34) app/src/main/java/dev/openbili/webdemo/ui/AppTransitions.kt:390 — AppTransitionsKt.CardTransitionOverlay has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BiliBangumiApi.getBangumiSeason (cognitive 33) · ×1
  • BiliBangumiApi.getBangumiSeason (cognitive 33) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:918 — BiliBangumiApi.getBangumiSeason has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 4 (7 pts), boolean chains 6 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootArticleContext.openInteractionTarget (cognitive 33) · ×1
  • AppRootArticleContext.openInteractionTarget (cognitive 33) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticle.kt:326 — AppRootArticleContext.openInteractionTarget has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 5, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BangumiExploreViewModel.loadFollowing (cognitive 32) · ×1
  • BangumiExploreViewModel.loadFollowing (cognitive 32) app/src/main/java/dev/openbili/webdemo/bangumi/BangumiExploreViewModel.kt:398 — BangumiExploreViewModel.loadFollowing has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19, boolean chains 12, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PopularFeedViewModel.loadCurrent (cognitive 32) · ×1
  • PopularFeedViewModel.loadCurrent (cognitive 32) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:178 — PopularFeedViewModel.loadCurrent has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 4, match/switch 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WatchLaterViewModel.update (cognitive 32) · ×1
  • WatchLaterViewModel.update (cognitive 32) app/src/main/java/dev/openbili/webdemo/my/WatchLaterViewModel.kt:102 — WatchLaterViewModel.update has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (30 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OfflineCacheChooserDialogKt.OfflineCacheChooserDialog (cognitive 32) · ×1
  • OfflineCacheChooserDialogKt.OfflineCacheChooserDialog (cognitive 32) app/src/main/java/dev/openbili/webdemo/offline/OfflineCacheChooserDialog.kt:56 — OfflineCacheChooserDialogKt.OfflineCacheChooserDialog has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootEnterBangumiContext.startSearchBangumi (cognitive 32) · ×1
  • AppRootEnterBangumiContext.startSearchBangumi (cognitive 32) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:899 — AppRootEnterBangumiContext.startSearchBangumi has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 2, match/switch 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootEnterBangumiContext.startProfileBangumi (cognitive 32) · ×1
  • AppRootEnterBangumiContext.startProfileBangumi (cognitive 32) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1063 — AppRootEnterBangumiContext.startProfileBangumi has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SearchViewModel.loadPage (cognitive 31) · ×1
  • SearchViewModel.loadPage (cognitive 31) app/src/main/java/dev/openbili/webdemo/search/SearchViewModel.kt:301 — SearchViewModel.loadPage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24 (26 pts), boolean chains 2, match/switch 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootProfileOverlayKt.AppRootProfileOverlay (cognitive 31) · ×1
  • AppRootProfileOverlayKt.AppRootProfileOverlay (cognitive 31) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileOverlay.kt:29 — AppRootProfileOverlayKt.AppRootProfileOverlay has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 3, match/switch 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.
D2 · Cognitive Complexity · PressableVideoCardKt.PressableVideoCard (cognitive 31) · ×1
  • PressableVideoCardKt.PressableVideoCard (cognitive 31) app/src/main/java/dev/openbili/webdemo/ui/PressableVideoCard.kt:41 — PressableVideoCardKt.PressableVideoCard has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MyViewModel.loadFollowingPage (cognitive 30) · ×1
  • MyViewModel.loadFollowingPage (cognitive 30) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1588 — MyViewModel.loadFollowingPage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 5, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootArticleContext.startExitArticle (cognitive 30) · ×1
  • AppRootArticleContext.startExitArticle (cognitive 30) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticle.kt:438 — AppRootArticleContext.startExitArticle has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BangumiExploreScreenKt.ExploreCategoryGridContent (cognitive 30) · ×1
  • BangumiExploreScreenKt.ExploreCategoryGridContent (cognitive 30) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1176 — BangumiExploreScreenKt.ExploreCategoryGridContent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 8, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BangumiExploringRailKt.AnimeExploreContent (cognitive 30) · ×1
  • BangumiExploringRailKt.AnimeExploreContent (cognitive 30) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:105 — BangumiExploringRailKt.AnimeExploreContent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23 (25 pts), boolean chains 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DanmakuOverlayView.drawDanmaku (cognitive 30) · ×1
  • DanmakuOverlayView.drawDanmaku (cognitive 30) app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:754 — DanmakuOverlayView.drawDanmaku has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 6, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DanmakuOverlayView.applySmartMaskClip (cognitive 30) · ×1
  • DanmakuOverlayView.applySmartMaskClip (cognitive 30) app/src/main/java/dev/openbili/webdemo/video/DanmakuOverlayView.kt:1072 — DanmakuOverlayView.applySmartMaskClip has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (7 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoSelectionOverlayKt.VideoSelectionOverlay (cognitive 30) · ×1
  • VideoSelectionOverlayKt.VideoSelectionOverlay (cognitive 30) app/src/main/java/dev/openbili/webdemo/video/VideoSelectionOverlay.kt:31 — VideoSelectionOverlayKt.VideoSelectionOverlay has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeDynamicScreenKt.HomeDynamicScreen (cognitive 29) · ×1
  • HomeDynamicScreenKt.HomeDynamicScreen (cognitive 29) app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:150 — HomeDynamicScreenKt.HomeDynamicScreen has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 7, match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · HomeDynamicViewModel.load (cognitive 29) · ×1
  • HomeDynamicViewModel.load (cognitive 29) app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicViewModel.kt:348 — HomeDynamicViewModel.load has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 5, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CommentVideoLinksKt.parseCommentVideoLinks (cognitive 29) · ×1
  • CommentVideoLinksKt.parseCommentVideoLinks (cognitive 29) app/src/main/java/dev/openbili/webdemo/video/CommentVideoLinks.kt:181 — CommentVideoLinksKt.parseCommentVideoLinks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 9, match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ControllerPlaybackSelectionPanelKt.ControllerPlaybackSelectionPanel (cognitive 29) · ×1
  • ControllerPlaybackSelectionPanelKt.ControllerPlaybackSelectionPanel (cognitive 29) app/src/main/java/dev/openbili/webdemo/video/ControllerPlaybackSelectionPanel.kt:41 — ControllerPlaybackSelectionPanelKt.ControllerPlaybackSelectionPanel has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BiliInteractionApi.parseLikeMessagePage (cognitive 28) · ×1
  • BiliInteractionApi.parseLikeMessagePage (cognitive 28) app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:86 — BiliInteractionApi.parseLikeMessagePage has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (9 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppRootExitContext.startExitVideo (cognitive 28) · ×1
  • AppRootExitContext.startExitVideo (cognitive 28) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:864 — AppRootExitContext.startExitVideo has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (23 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BottomCapsuleKt.CapsuleItem (cognitive 28) · ×1
  • BottomCapsuleKt.CapsuleItem (cognitive 28) app/src/main/java/dev/openbili/webdemo/ui/BottomCapsule.kt:272 — BottomCapsuleKt.CapsuleItem has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 5, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HomeHubScreenKt.HomeHubTabCapsule (cognitive 28) · ×1
  • HomeHubScreenKt.HomeHubTabCapsule (cognitive 28) app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1596 — HomeHubScreenKt.HomeHubTabCapsule has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MyScreenFollowingKt.FollowingUserCard (cognitive 27) · ×1
  • MyScreenFollowingKt.FollowingUserCard (cognitive 27) app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:389 — MyScreenFollowingKt.FollowingUserCard has cognitive complexity 27 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BangumiExploringRailKt.AnimeHotStackCard (cognitive 27) · ×1
  • BangumiExploringRailKt.AnimeHotStackCard (cognitive 27) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:711 — BangumiExploringRailKt.AnimeHotStackCard has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FollowButtonKt.FollowButton (cognitive 27) · ×1
  • FollowButtonKt.FollowButton (cognitive 27) app/src/main/java/dev/openbili/webdemo/ui/FollowButton.kt:33 — FollowButtonKt.FollowButton has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25 (27 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HomeMusicRemoteControlsKt.MusicProgressBar (cognitive 27) · ×1
  • HomeMusicRemoteControlsKt.MusicProgressBar (cognitive 27) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicRemoteControls.kt:391 — HomeMusicRemoteControlsKt.MusicProgressBar has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerControlWidgetsKt.YoutubeSeekBar (cognitive 27) · ×1
  • PlayerControlWidgetsKt.YoutubeSeekBar (cognitive 27) app/src/main/java/dev/openbili/webdemo/video/PlayerControlWidgets.kt:38 — PlayerControlWidgetsKt.YoutubeSeekBar has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 2, match/switch 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.
D2 · Cognitive Complexity · BiliArticleApi.parseArticleParagraphs (cognitive 26) · ×1
  • BiliArticleApi.parseArticleParagraphs (cognitive 26) app/src/main/java/dev/openbili/webdemo/api/BiliArticleApi.kt:250 — BiliArticleApi.parseArticleParagraphs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PopularFeedScreenKt.PopularFeedScreen (cognitive 26) · ×1
  • PopularFeedScreenKt.PopularFeedScreen (cognitive 26) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:127 — PopularFeedScreenKt.PopularFeedScreen has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootArticleLayerKt.AppRootArticleLayer (cognitive 26) · ×1
  • AppRootArticleLayerKt.AppRootArticleLayer (cognitive 26) app/src/main/java/dev/openbili/webdemo/ui/AppRootArticleLayer.kt:28 — AppRootArticleLayerKt.AppRootArticleLayer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, boolean chains 8, loops 1 (2 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.
D2 · Cognitive Complexity · AppRootLiveTransitionsKt.startExitLive (cognitive 26) · ×1
  • AppRootLiveTransitionsKt.startExitLive (cognitive 26) app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveTransitions.kt:530 — AppRootLiveTransitionsKt.startExitLive has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoScreenDialogsKt.VideoScreenDialogs (cognitive 26) · ×1
  • VideoScreenDialogsKt.VideoScreenDialogs (cognitive 26) app/src/main/java/dev/openbili/webdemo/video/VideoScreenDialogs.kt:24 — VideoScreenDialogsKt.VideoScreenDialogs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootEnterBangumiContext.startProfileVideo (cognitive 25) · ×1
  • AppRootEnterBangumiContext.startProfileVideo (cognitive 25) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:418 — AppRootEnterBangumiContext.startProfileVideo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppRootOverlayTransitionsKt.closeSearchResultsAnimated (cognitive 25) · ×1
  • AppRootOverlayTransitionsKt.closeSearchResultsAnimated (cognitive 25) app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:288 — AppRootOverlayTransitionsKt.closeSearchResultsAnimated has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HomeMusicPlayerScreenKt.MusicAmbientLayer (cognitive 25) · ×1
  • HomeMusicPlayerScreenKt.MusicAmbientLayer (cognitive 25) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:769 — HomeMusicPlayerScreenKt.MusicAmbientLayer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HomeMusicRemoteControlsKt.MusicControlButton (cognitive 25) · ×1
  • HomeMusicRemoteControlsKt.MusicControlButton (cognitive 25) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicRemoteControls.kt:189 — HomeMusicRemoteControlsKt.MusicControlButton has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (22 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoScreenControlKt.handleControlPlayerKey (cognitive 25) · ×1
  • VideoScreenControlKt.handleControlPlayerKey (cognitive 25) app/src/main/java/dev/openbili/webdemo/video/VideoScreenControl.kt:353 — VideoScreenControlKt.handleControlPlayerKey has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, match/switch 2 (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.
D2 · Cognitive Complexity · BaselineProfileGenerator.captureBaselineProfile (cognitive 25) · ×1
  • BaselineProfileGenerator.captureBaselineProfile (cognitive 25) baselineprofile/src/main/java/dev/openbili/webdemo/baselineprofile/BaselineProfileGenerator.kt:32 — BaselineProfileGenerator.captureBaselineProfile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BiliBangumiApi.parseBangumiRecommendations (cognitive 24) · ×1
  • BiliBangumiApi.parseBangumiRecommendations (cognitive 24) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:831 — BiliBangumiApi.parseBangumiRecommendations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BiliSpaceApi.parseSpaceDynamics (cognitive 24) · ×1
  • BiliSpaceApi.parseSpaceDynamics (cognitive 24) app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:174 — BiliSpaceApi.parseSpaceDynamics has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeedViewModel.loadPage (cognitive 24) · ×1
  • FeedViewModel.loadPage (cognitive 24) app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:124 — FeedViewModel.loadPage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BangumiExploreScreenKt.ExploreFocusBanner (cognitive 24) · ×1
  • BangumiExploreScreenKt.ExploreFocusBanner (cognitive 24) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1472 — BangumiExploreScreenKt.ExploreFocusBanner has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 7, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BiliPrivateMessageApi.getPrivateMessageHistory (cognitive 23) · ×1
  • BiliPrivateMessageApi.getPrivateMessageHistory (cognitive 23) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:185 — BiliPrivateMessageApi.getPrivateMessageHistory has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3, match/switch 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.
D2 · Cognitive Complexity · LiveHomeViewModel.loadPage (cognitive 23) · ×1
  • LiveHomeViewModel.loadPage (cognitive 23) app/src/main/java/dev/openbili/webdemo/live/LiveHomeViewModel.kt:213 — LiveHomeViewModel.loadPage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CachedVideosPaneKt.OfflineFeedCard (cognitive 23) · ×1
  • CachedVideosPaneKt.OfflineFeedCard (cognitive 23) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:498 — CachedVideosPaneKt.OfflineFeedCard has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 4, match/switch 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.
D2 · Cognitive Complexity · BangumiRecommendationScreenKt.BangumiRecommendationFallbackWithExplore (cognitive 23) · ×1
  • BangumiRecommendationScreenKt.BangumiRecommendationFallbackWithExplore (cognitive 23) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:901 — BangumiRecommendationScreenKt.BangumiRecommendationFallbackWithExplore has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 7, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · HomeMusicLibraryPaneKt.MusicFolderSetupMessage (cognitive 23) · ×1
  • HomeMusicLibraryPaneKt.MusicFolderSetupMessage (cognitive 23) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicLibraryPane.kt:364 — HomeMusicLibraryPaneKt.MusicFolderSetupMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LiveRoomSecondaryKt.LiveRankSection (cognitive 22) · ×1
  • LiveRoomSecondaryKt.LiveRankSection (cognitive 22) app/src/main/java/dev/openbili/webdemo/live/LiveRoomSecondary.kt:174 — LiveRoomSecondaryKt.LiveRankSection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MyViewModel.loadFavoritePage (cognitive 22) · ×1
  • MyViewModel.loadFavoritePage (cognitive 22) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:2018 — MyViewModel.loadFavoritePage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 1, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootPlaybackContext.prepareExitTransition (cognitive 22) · ×1
  • AppRootPlaybackContext.prepareExitTransition (cognitive 22) app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:398 — AppRootPlaybackContext.prepareExitTransition has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootVideoEntryBackdropKt.RootVideoEntryBackdrop (cognitive 22) · ×1
  • RootVideoEntryBackdropKt.RootVideoEntryBackdrop (cognitive 22) app/src/main/java/dev/openbili/webdemo/ui/RootVideoEntryBackdrop.kt:28 — RootVideoEntryBackdropKt.RootVideoEntryBackdrop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoCardPaletteKt.extractVideoCoverDominantColors (cognitive 22) · ×1
  • VideoCardPaletteKt.extractVideoCoverDominantColors (cognitive 22) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:259 — VideoCardPaletteKt.extractVideoCoverDominantColors has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentComposerKt.CommentToolPanel (cognitive 22) · ×1
  • CommentComposerKt.CommentToolPanel (cognitive 22) app/src/main/java/dev/openbili/webdemo/video/CommentComposer.kt:661 — CommentComposerKt.CommentToolPanel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DanmakuMaskTimeline.isProtectedAt (cognitive 21) · ×1
  • DanmakuMaskTimeline.isProtectedAt (cognitive 21) app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:345 — DanmakuMaskTimeline.isProtectedAt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BiliPrivateMessageApi.parsePrivateContent (cognitive 21) · ×1
  • BiliPrivateMessageApi.parsePrivateContent (cognitive 21) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:320 — BiliPrivateMessageApi.parsePrivateContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 4, loops 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FeedViewModel.loadPreservingRefresh (cognitive 21) · ×1
  • FeedViewModel.loadPreservingRefresh (cognitive 21) app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:205 — FeedViewModel.loadPreservingRefresh has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PopularFeedScreenKt.PopularSectionBar (cognitive 21) · ×1
  • PopularFeedScreenKt.PopularSectionBar (cognitive 21) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:369 — PopularFeedScreenKt.PopularSectionBar has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MyScreenFollowingKt.FollowingPanel (cognitive 21) · ×1
  • MyScreenFollowingKt.FollowingPanel (cognitive 21) app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:226 — MyScreenFollowingKt.FollowingPanel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootLiveTransitionsKt.startEnterLive (cognitive 21) · ×1
  • AppRootLiveTransitionsKt.startEnterLive (cognitive 21) app/src/main/java/dev/openbili/webdemo/ui/AppRootLiveTransitions.kt:255 — AppRootLiveTransitionsKt.startEnterLive has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootPlaybackContext.prepareCardTransition (cognitive 21) · ×1
  • AppRootPlaybackContext.prepareCardTransition (cognitive 21) app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:310 — AppRootPlaybackContext.prepareCardTransition has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeMusicPlayerScreenKt.MusicPlayerPane (cognitive 21) · ×1
  • HomeMusicPlayerScreenKt.MusicPlayerPane (cognitive 21) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:1280 — HomeMusicPlayerScreenKt.MusicPlayerPane has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BiliInteractionApi.parseAccountMessagePage (cognitive 20) · ×1
  • BiliInteractionApi.parseAccountMessagePage (cognitive 20) app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:303 — BiliInteractionApi.parseAccountMessagePage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MyScreenHistoryKt.HistoryTimeScale (cognitive 20) · ×1
  • MyScreenHistoryKt.HistoryTimeScale (cognitive 20) app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:947 — MyScreenHistoryKt.HistoryTimeScale has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MyViewModel.updateFavoriteFolders (cognitive 20) · ×1
  • MyViewModel.updateFavoriteFolders (cognitive 20) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:2085 — MyViewModel.updateFavoriteFolders has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, error handling 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppRootUiValuesFileKt.computeAppRootUiValues (cognitive 20) · ×1
  • AppRootUiValuesFileKt.computeAppRootUiValues (cognitive 20) app/src/main/java/dev/openbili/webdemo/ui/AppRootUiValuesFile.kt:39 — AppRootUiValuesFileKt.computeAppRootUiValues has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 16, if/else 2, match/switch 2. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AppRootVideoState.setFavoriteFolders (cognitive 20) · ×1
  • AppRootVideoState.setFavoriteFolders (cognitive 20) app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:732 — AppRootVideoState.setFavoriteFolders has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BangumiRecommendationScreenKt.BangumiPreviewPlayer (cognitive 20) · ×1
  • BangumiRecommendationScreenKt.BangumiPreviewPlayer (cognitive 20) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1461 — BangumiRecommendationScreenKt.BangumiPreviewPlayer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HomeHubScreenKt.HomeGlassIconButton (cognitive 20) · ×1
  • HomeHubScreenKt.HomeGlassIconButton (cognitive 20) app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1301 — HomeHubScreenKt.HomeGlassIconButton has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeMusicRemoteControlsKt.MusicTransportControls (cognitive 20) · ×1
  • HomeMusicRemoteControlsKt.MusicTransportControls (cognitive 20) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicRemoteControls.kt:71 — HomeMusicRemoteControlsKt.MusicTransportControls has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 5, match/switch 3 (4 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.
D2 · Cognitive Complexity · HomeMusicRemoteControlsKt.AdvancedAudioButton (cognitive 20) · ×1
  • HomeMusicRemoteControlsKt.AdvancedAudioButton (cognitive 20) app/src/main/java/dev/openbili/webdemo/ui/HomeMusicRemoteControls.kt:262 — HomeMusicRemoteControlsKt.AdvancedAudioButton has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 5, match/switch 1 (2 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.
D2 · Cognitive Complexity · BiliRichTextKt.BiliRichText (cognitive 20) · ×1
  • BiliRichTextKt.BiliRichText (cognitive 20) app/src/main/java/dev/openbili/webdemo/video/BiliRichText.kt:102 — BiliRichTextKt.BiliRichText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerViewModel.preparePlayer (cognitive 19) · ×1
  • PlayerViewModel.preparePlayer (cognitive 19) app/src/main/java/dev/openbili/webdemo/PlayerViewModel.kt:486 — PlayerViewModel.preparePlayer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · BiliPrivateMessageApi.getPrivateMessageSessions (cognitive 19) · ×1
  • BiliPrivateMessageApi.getPrivateMessageSessions (cognitive 19) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:90 — BiliPrivateMessageApi.getPrivateMessageSessions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DanmakuMaskParser.parseBytes (cognitive 19) · ×1
  • DanmakuMaskParser.parseBytes (cognitive 19) app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:22 — DanmakuMaskParser.parseBytes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeedScreenKt.FeedScreen (cognitive 19) · ×1
  • FeedScreenKt.FeedScreen (cognitive 19) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:124 — FeedScreenKt.FeedScreen has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FeedScreenKt.FeedCardContent (cognitive 19) · ×1
  • FeedScreenKt.FeedCardContent (cognitive 19) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:578 — FeedScreenKt.FeedCardContent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MyScreenMessagesKt.PrivateMessageComposer (cognitive 19) · ×1
  • MyScreenMessagesKt.PrivateMessageComposer (cognitive 19) app/src/main/java/dev/openbili/webdemo/my/MyScreenMessages.kt:867 — MyScreenMessagesKt.PrivateMessageComposer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MyViewModelModelsKt.normalizePrivateMessageHistory (cognitive 19) · ×1
  • MyViewModelModelsKt.normalizePrivateMessageHistory (cognitive 19) app/src/main/java/dev/openbili/webdemo/my/MyViewModelModels.kt:128 — MyViewModelModelsKt.normalizePrivateMessageHistory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 6, match/switch 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.
D2 · Cognitive Complexity · ControlRemoteKt.resolveControlVideoSurfaceAction (cognitive 19) · ×1
  • ControlRemoteKt.resolveControlVideoSurfaceAction (cognitive 19) app/src/main/java/dev/openbili/webdemo/ui/ControlRemote.kt:133 — ControlRemoteKt.resolveControlVideoSurfaceAction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (7 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.
D2 · Cognitive Complexity · HomeHubScreenKt.HomeHubHeader (cognitive 19) · ×1
  • HomeHubScreenKt.HomeHubHeader (cognitive 19) app/src/main/java/dev/openbili/webdemo/ui/HomeHubScreen.kt:1448 — HomeHubScreenKt.HomeHubHeader has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoHeaderContentKt.ReplyThreadPanel (cognitive 19) · ×1
  • VideoHeaderContentKt.ReplyThreadPanel (cognitive 19) app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:530 — VideoHeaderContentKt.ReplyThreadPanel has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VideoScreenWidgetsKt.CommentImagePreviewOverlay (cognitive 19) · ×1
  • VideoScreenWidgetsKt.CommentImagePreviewOverlay (cognitive 19) app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:459 — VideoScreenWidgetsKt.CommentImagePreviewOverlay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AuthViewModel.startPolling (cognitive 18) · ×1
  • AuthViewModel.startPolling (cognitive 18) app/src/main/java/dev/openbili/webdemo/AuthViewModel.kt:182 — AuthViewModel.startPolling has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (2 pts), match/switch 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.
D2 · Cognitive Complexity · AuthViewModel.startAppPolling (cognitive 18) · ×1
  • AuthViewModel.startAppPolling (cognitive 18) app/src/main/java/dev/openbili/webdemo/AuthViewModel.kt:239 — AuthViewModel.startAppPolling has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (2 pts), match/switch 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.
D2 · Cognitive Complexity · BiliArticleApi.parseArticleTextNodes (cognitive 18) · ×1
  • BiliArticleApi.parseArticleTextNodes (cognitive 18) app/src/main/java/dev/openbili/webdemo/api/BiliArticleApi.kt:329 — BiliArticleApi.parseArticleTextNodes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · BiliDanmakuApi.fetchHistoricalDanmaku (cognitive 18) · ×1
  • BiliDanmakuApi.fetchHistoricalDanmaku (cognitive 18) app/src/main/java/dev/openbili/webdemo/api/BiliDanmakuApi.kt:280 — BiliDanmakuApi.fetchHistoricalDanmaku has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MyScreenFavoritesKt.FavoriteFolderEditorDialog (cognitive 18) · ×1
  • MyScreenFavoritesKt.FavoriteFolderEditorDialog (cognitive 18) app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:538 — MyScreenFavoritesKt.FavoriteFolderEditorDialog has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MyViewModel.loadHistoryThrough (cognitive 18) · ×1
  • MyViewModel.loadHistoryThrough (cognitive 18) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:741 — MyViewModel.loadHistoryThrough has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MyViewModel.loadPrivateMessageHistory (cognitive 18) · ×1
  • MyViewModel.loadPrivateMessageHistory (cognitive 18) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1321 — MyViewModel.loadPrivateMessageHistory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OfflineMediaManager.prepareAndQueue (cognitive 18) · ×1
  • OfflineMediaManager.prepareAndQueue (cognitive 18) app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:601 — OfflineMediaManager.prepareAndQueue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 3, match/switch 2, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ProfileScreenKt.ProfileBangumiGrid (cognitive 18) · ×1
  • ProfileScreenKt.ProfileBangumiGrid (cognitive 18) app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1521 — ProfileScreenKt.ProfileBangumiGrid has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, match/switch 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppRootEnterBangumiContext.startRootBangumi (cognitive 18) · ×1
  • AppRootEnterBangumiContext.startRootBangumi (cognitive 18) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:820 — AppRootEnterBangumiContext.startRootBangumi has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 5, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppRootExitContext.startRecommendedVideo (cognitive 18) · ×1
  • AppRootExitContext.startRecommendedVideo (cognitive 18) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1427 — AppRootExitContext.startRecommendedVideo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BiliReportApiKt.parsePlayerPageInfo (cognitive 17) · ×1
  • BiliReportApiKt.parsePlayerPageInfo (cognitive 17) app/src/main/java/dev/openbili/webdemo/api/BiliReportApi.kt:182 — BiliReportApiKt.parsePlayerPageInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BiliVideoApi.requestVideoInfoByParameter (cognitive 17) · ×1
  • BiliVideoApi.requestVideoInfoByParameter (cognitive 17) app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:84 — BiliVideoApi.requestVideoInfoByParameter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoverImageKt.CoverImage (cognitive 17) · ×1
  • CoverImageKt.CoverImage (cognitive 17) app/src/main/java/dev/openbili/webdemo/feed/CoverImage.kt:163 — CoverImageKt.CoverImage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LiveRoomViewModel.handleSocketEvent (cognitive 17) · ×1
  • LiveRoomViewModel.handleSocketEvent (cognitive 17) app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt:913 — LiveRoomViewModel.handleSocketEvent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootOverlayTransitionsKt.closeBangumiIndexAnimated (cognitive 17) · ×1
  • AppRootOverlayTransitionsKt.closeBangumiIndexAnimated (cognitive 17) app/src/main/java/dev/openbili/webdemo/ui/AppRootOverlayTransitions.kt:429 — AppRootOverlayTransitionsKt.closeBangumiIndexAnimated has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AppRootProfileState.loadSpacePage (cognitive 17) · ×1
  • AppRootProfileState.loadSpacePage (cognitive 17) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfileState.kt:80 — AppRootProfileState.loadSpacePage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BangumiExploringRailKt.AnimeHotHeroContent (cognitive 17) · ×1
  • BangumiExploringRailKt.AnimeHotHeroContent (cognitive 17) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:458 — BangumiExploringRailKt.AnimeHotHeroContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LoginSheetKt.QrImage (cognitive 17) · ×1
  • LoginSheetKt.QrImage (cognitive 17) app/src/main/java/dev/openbili/webdemo/ui/LoginSheet.kt:200 — LoginSheetKt.QrImage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (5 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ControllerVideoSelectionPanelKt.ControllerVideoSelectionPanel (cognitive 17) · ×1
  • ControllerVideoSelectionPanelKt.ControllerVideoSelectionPanel (cognitive 17) app/src/main/java/dev/openbili/webdemo/video/ControllerVideoSelectionPanel.kt:8 — ControllerVideoSelectionPanelKt.ControllerVideoSelectionPanel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoActionDialogsKt.FavoriteFolderDialog (cognitive 17) · ×1
  • VideoActionDialogsKt.FavoriteFolderDialog (cognitive 17) app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:391 — VideoActionDialogsKt.FavoriteFolderDialog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BiliBangumiApi.parseBangumiWatchProgress (cognitive 16) · ×1
  • BiliBangumiApi.parseBangumiWatchProgress (cognitive 16) app/src/main/java/dev/openbili/webdemo/api/BiliBangumiApi.kt:286 — BiliBangumiApi.parseBangumiWatchProgress has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (5 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.
D2 · Cognitive Complexity · BiliVideoApi.parsePlayUrlData (cognitive 16) · ×1
  • BiliVideoApi.parsePlayUrlData (cognitive 16) app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:294 — BiliVideoApi.parsePlayUrlData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 1 (4 pts), loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LiveHomeScreenKt.LivePreviewPanel (cognitive 16) · ×1
  • LiveHomeScreenKt.LivePreviewPanel (cognitive 16) app/src/main/java/dev/openbili/webdemo/live/LiveHomeScreen.kt:563 — LiveHomeScreenKt.LivePreviewPanel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 2, match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · MyViewModel.loadHistoryPeriodPage (cognitive 16) · ×1
  • MyViewModel.loadHistoryPeriodPage (cognitive 16) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1020 — MyViewModel.loadHistoryPeriodPage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, error handling 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MyViewModel.replyToSelectedPrivate (cognitive 16) · ×1
  • MyViewModel.replyToSelectedPrivate (cognitive 16) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1725 — MyViewModel.replyToSelectedPrivate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 3 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OfflineMediaManager.copyDirectoryWithProgress (cognitive 16) · ×1
  • OfflineMediaManager.copyDirectoryWithProgress (cognitive 16) app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:1075 — OfflineMediaManager.copyDirectoryWithProgress has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppRootVideoState.toggleCommentLike (cognitive 16) · ×1
  • AppRootVideoState.toggleCommentLike (cognitive 16) app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:510 — AppRootVideoState.toggleCommentLike has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoCardPaletteKt.VideoCardGradient (cognitive 16) · ×1
  • VideoCardPaletteKt.VideoCardGradient (cognitive 16) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:68 — VideoCardPaletteKt.VideoCardGradient has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BangumiPageContentKt.BangumiEpisodeCard (cognitive 16) · ×1
  • BangumiPageContentKt.BangumiEpisodeCard (cognitive 16) app/src/main/java/dev/openbili/webdemo/video/BangumiPageContent.kt:593 — BangumiPageContentKt.BangumiEpisodeCard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VideoScreenControlKt.VideoControlEffects (cognitive 16) · ×1
  • VideoScreenControlKt.VideoControlEffects (cognitive 16) app/src/main/java/dev/openbili/webdemo/video/VideoScreenControl.kt:470 — VideoScreenControlKt.VideoControlEffects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (422 shared lines) · ×1
  • Near-duplicate member pair (422 shared lines) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:242 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:242-1452 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:220-2022 — These two members are variants of one another: 422 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (93 shared lines) · ×1
  • Near-duplicate member pair (93 shared lines) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1196 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1196-1465 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:132-354 — These two members are variants of one another: 93 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (84 shared lines) · ×1
  • Near-duplicate member pair (84 shared lines) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:206 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:206-355 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:370-533 — These two members are variants of one another: 84 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (59 shared lines) · ×1
  • Near-duplicate member pair (59 shared lines) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:147 — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:147-290 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:152-366 — These two members are variants of one another: 59 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (30 shared lines) · ×1
  • Near-duplicate member pair (30 shared lines) app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:259 — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:259-326 | app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:131-190 — These two members are variants of one another: 30 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:259 — app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:259-276 | app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:279-296 | app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:299-317 | app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:259-278 | app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:281-300 | app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:303-318 | app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:32-48 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:685-702 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:291 — app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:291-304 | app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:230-247 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:2228-2241 | app/src/main/java/dev/openbili/webdemo/my/WatchLaterViewModel.kt:268-283 | app/src/main/java/dev/openbili/webdemo/ui/AppRootModels.kt:612-625 — 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 (81 corresponding lines) · ×1
  • Edited copy of a member (81 corresponding lines) app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:313 — app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:313-395 | app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:401-481 — These two members are one piece of code written twice and then edited apart: 81 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (87 corresponding lines) · ×1
  • Edited copy of a member (87 corresponding lines) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:468 — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:468-562 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:760-846 — These two members are one piece of code written twice and then edited apart: 87 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1392 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1392-1443 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1445-1485 — 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 (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) app/src/main/java/dev/openbili/webdemo/ui/AppRootTransitionTargets.kt:78 — app/src/main/java/dev/openbili/webdemo/ui/AppRootTransitionTargets.kt:78-108 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTransitionTargets.kt:112-143 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1859 — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1859-1893 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1954-1993 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:489 — app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:489-514 | app/src/main/java/dev/openbili/webdemo/api/BiliPrivateMessageApi.kt:623-659 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1136 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1136-1167 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1774-1805 — 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 (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:867 — app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:867-897 | app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt:899-928 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:1236 — app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:1236-1260 | app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt:1264-1288 — 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 (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1388 — app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1388-1408 | app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:1515-1535 — 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 copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:154 — app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:154-172 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:857-874 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:924-943 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:950-968 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliFollowApi.kt:164 — app/src/main/java/dev/openbili/webdemo/api/BiliFollowApi.kt:164-174 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:704-715 | app/src/main/java/dev/openbili/webdemo/api/BiliVideoApi.kt:499-509 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:351 — app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:351-366 | app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:368-379 | app/src/main/java/dev/openbili/webdemo/api/DanmakuProtoParser.kt:11-26 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) app/src/main/java/dev/openbili/webdemo/MainViewModel.kt:28 — app/src/main/java/dev/openbili/webdemo/MainViewModel.kt:28-46 | app/src/main/java/dev/openbili/webdemo/MainViewModel.kt:51-71 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:632 — app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:632-638 | app/src/main/java/dev/openbili/webdemo/api/BiliModels.kt:641-647 | app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:373-379 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 6+ corresponding lines) app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:295 — app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:295-300 | app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaModels.kt:163-170 | app/src/main/java/dev/openbili/webdemo/ui/HomeMusicPlayerScreen.kt:1540-1547 | app/src/main/java/dev/openbili/webdemo/video/PlayerControlWidgets.kt:243-250 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:459 — app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:459-467 | app/src/main/java/dev/openbili/webdemo/api/DanmakuProtoParser.kt:105-113 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) REDACTED:170 — REDACTED:170-173 | app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt:465-469 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (141 lines × 2) · ×1
  • Duplicated block (141 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:280 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:280-420 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:254-394 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:279` calls `rememberAppRootStates` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:253` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (58–60 lines × 2) · ×1
  • Duplicated block (58–60 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:313 — app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:313-372 | app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:401-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:313` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:919 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:919-976 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1051-1108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:919` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:517 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:517-573 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:404-460 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:516` calls `mutableStateOf`, `RootPlayerOwnership` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:403` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (55–57 lines × 2) · ×1
  • Duplicated block (55–57 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:644 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:644-700 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:496-550 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:641` calls `LaunchedEffect` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:495` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1618 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1618-1660 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt:611-653 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1618` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (38–40 lines × 2) · ×1
  • Duplicated block (38–40 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1283 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1283-1320 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:624-663 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1282` calls `closeProfile` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:621` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (34–35 lines × 2) · ×1
  • Duplicated block (34–35 lines × 2) app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:193 — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:193-227 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:213-246 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:193` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:313 — app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:313-344 | app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:412-443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/VideoActionDialogs.kt:313` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:694 — app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:694-724 | app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:750-780 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/VideoHeaderContent.kt:694` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1302 — app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1302-1330 | app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1397-1425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRootExit.kt:1397` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:243 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:243-270 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:221-248 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–28 lines × 2) · ×1
  • Duplicated block (19–28 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1400 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1400-1418 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:683-710 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:809 — app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:809-835 | app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1279-1305 — 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 `app/src/main/java/dev/openbili/webdemo/video/VideoPageContent.kt:809` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:352 — app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:352-376 | app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:383-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:352` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (23–26 lines × 2) · ×1
  • Duplicated block (23–26 lines × 2) app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:307 — app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:307-329 | app/src/main/java/dev/openbili/webdemo/ui/BangumiIndexScreen.kt:351-376 — 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 `app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:307` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1143 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1143-1167 | app/src/main/java/dev/openbili/webdemo/profile/ProfileScreen.kt:1782-1805 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–25 lines × 2) · ×1
  • Duplicated block (18–25 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:762 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:762-779 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:568-592 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1011 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1011-1034 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1145-1168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1011` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:414 — app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:414-434 | app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:438-460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/DanmakuMaskParser.kt:414` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1054 — app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1054-1076 | app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1078-1099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1054` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:608 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:608-625 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:633-650 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:707-725 — 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 `app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:608` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:622 — app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:622-640 | app/src/main/java/dev/openbili/webdemo/ui/AppRootProfile.kt:696-714 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1243 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1243-1256 | app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:594-611 — before extracting anything, compare `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt` and `app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 452 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1615 — app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1615-1631 | app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1644-1660 | app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1679-1695 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt:1615` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:397 — app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:397-413 | app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:697-710 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:397` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:789 — app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:789-805 | app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1013-1027 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:789` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:787` calls `settleVerticalPage`, `onControlLevelChanged` and `app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt:1012` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–16 lines × 5) · ×1
  • Duplicated block (15–16 lines × 5) app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1437 — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1437-1452 | app/src/main/java/dev/openbili/webdemo/ui/AppRootStates.kt:502-517 | app/src/main/java/dev/openbili/webdemo/ui/AppRootUiValuesFile.kt:178-193 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:829-843 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:851-866 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1437` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:153 — app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:153-167 | app/src/main/java/dev/openbili/webdemo/feed/FeedViewModel.kt:260-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.
D4 · Code Duplication · Duplicated block (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:317 — app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:317-329 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:510-522 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1016-1029 | app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1170-1183 — 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 `app/src/main/java/dev/openbili/webdemo/ui/AppRootEnterBangumi.kt:1016` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1009 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1009-1022 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1143-1156 | app/src/main/java/dev/openbili/webdemo/ui/BangumiIndexScreen.kt:827-840 — 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 `app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1009` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:291 — app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:291-302 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:2228-2239 | app/src/main/java/dev/openbili/webdemo/ui/AppRootModels.kt:612-623 — 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 `app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:425 — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:425-436 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:1698-1708 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1267 — app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1267-1276 | app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1357-1367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1267` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:184 — app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:184-192 | app/src/main/java/dev/openbili/webdemo/video/ControllerFullscreenPlaybackScreen.kt:169-178 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:184` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:295 — app/src/main/java/dev/openbili/webdemo/feed/PopularFeedViewModel.kt:295-303 | app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:236-244 | app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:2232-2240 | app/src/main/java/dev/openbili/webdemo/my/WatchLaterViewModel.kt:274-282 | app/src/main/java/dev/openbili/webdemo/ui/AppRootModels.kt:616-624 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:711 — app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:711-719 | app/src/main/java/dev/openbili/webdemo/profile/ProfileCollectionScreen.kt:607-615 | app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:833-841 | app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt:1078-1086 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt:711` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicViewModel.kt:145 — app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicViewModel.kt:145-153 | app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicViewModel.kt:230-238 | app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicViewModel.kt:257-265 — 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 `app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicViewModel.kt:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:462 — app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:462-470 | app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt:644-650 — 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 `app/src/main/java/dev/openbili/webdemo/my/MyScreenFavorites.kt:462` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:289 — app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:289-294 | app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:311-316 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:695-700 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:289` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:286` calls `toString` and `app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:309` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:915 — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:915-919 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1047-1051 | app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1485-1489 | app/src/main/java/dev/openbili/webdemo/ui/BangumiIndexScreen.kt:724-728 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:269 — app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:269-276 | app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:289-296 | app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:310-317 | app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:293-300 | app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt:311-318 | app/src/main/java/dev/openbili/webdemo/api/BiliInteractionApi.kt:41-48 | app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:695-702 — there are 7 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:269` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/dev/openbili/webdemo/api/BiliCommentApi.kt:266` calls `toString` and `app/src/main/java/dev/openbili/webdemo/api/BiliFavoriteApi.kt: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.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap app/src/main/java/dev/openbili/webdemo/api/BiliArticleApi.kt:302 — `BiliArticleApi.parseArticleJson` is public, takes a document from its caller (line 117) and hands it to `BiliArticleApi.parseArticleParagraphs`, which calls itself at line 302 with a piece of `paragraphs` (and at line 316) — the function is not `tailrec`, so every call is a real frame — and nowhere in `BiliArticleApi.parseArticleParagraphs` 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. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `BiliArticleApi.parseArticleParagraphs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`.
Minor — 70 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:475 — `!FeedPerformanceConfig.aggressiveFastPathEnabled || !gridState.isScrollInProgress` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt, app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:206 — `!backgroundWorkAllowed || gridState.isScrollInProgress` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt, app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:163 — `!bufferingForRecovery || !activePlayer.playWhenReady` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt, app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt:983 — `!colorfulCardsEnabled || avatarColors.isEmpty()` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt, app/src/main/java/dev/openbili/webdemo/video/CommentCard.kt. 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 app/src/main/java/dev/openbili/webdemo/ui/HomeMusicLibraryPane.kt:108 — `!controlMode || !controlFocusable || controlFocusRequest <= 0` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/ui/HomeMusicLibraryPane.kt, app/src/main/java/dev/openbili/webdemo/ui/HomeMusicTrackList.kt. 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 app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt:1581 — `!directory.exists() && !directory.mkdirs()` appears character-identically in 3 files — app/src/main/java/dev/openbili/webdemo/music/HomeMusicPlayerViewModel.kt, app/src/main/java/dev/openbili/webdemo/ui/StaticBackgroundImage.kt, app/src/main/java/dev/openbili/webdemo/video/VideoScreenWidgets.kt. 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 app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:673 — `!isPlaying || videoExitPrelude != null || transitionSession != null || (transitionPhase !is TransitionPhase.Feed && transitionPhase !is Tran…` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt, app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt. 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 app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:342 — `(state.playbackLoading || buffering) && state.playbackError == null` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt, app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt:165 — `activePlayer.playbackState == Player.STATE_BUFFERING && activePlayer.playWhenReady` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/live/LiveRoomControlNavigation.kt, app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:263 — `android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O && bitmap.config == Bitmap.Config.HARDWARE` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt, app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt. 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 app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1216 — `available.y < 0f && pullDistance > handoffSlop` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt, app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt. 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 app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:1206 — `available.y > 0f && !gridState.canScrollBackward` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt, app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt. 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 app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt:215 — `bangumiSubType > 0 && bangumiEpisodeId > 0L && bangumiSeasonId > 0L` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayback.kt, app/src/main/java/dev/openbili/webdemo/ui/AppRootPlayer.kt. 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 app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt:1740 — `bounds.outWidth <= 0 || bounds.outHeight <= 0` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/my/MyViewModel.kt, app/src/main/java/dev/openbili/webdemo/ui/AppRootVideoState.kt. 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 app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt:144 — `category == BangumiExploreCategory.ANIME || category == BangumiExploreCategory.GUOCHUANG` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/api/BiliSearchApi.kt, app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt:482 — `colorfulCardsEnabled && avatarColors.isEmpty()` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt, app/src/main/java/dev/openbili/webdemo/search/SearchScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt:945 — `controlMode && controlLevel == BangumiControlLevel.EXPLORE_CONTENT` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt, app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt. 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 app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt:1357 — `current.hasUsableSize() && current.approximatelyEquals(previous)` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/ui/AppRoot.kt, app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt. 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 app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt:425 — `event.type == KeyEventType.KeyDown && event.nativeKeyEvent.repeatCount == 0` appears character-identically in 10 files — app/src/main/java/dev/openbili/webdemo/dynamic/HomeDynamicScreen.kt, app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt, app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt, app/src/main/java/dev/openbili/webdemo/my/MyScreenFollowing.kt. 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 app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt:616 — `event.type == androidx.compose.ui.input.key.KeyEventType.KeyDown && event.nativeKeyEvent.repeatCount == 0` appears character-identically in 4 files — app/src/main/java/dev/openbili/webdemo/profile/ProfileDynamicScreen.kt, app/src/main/java/dev/openbili/webdemo/ui/BangumiExploreScreen.kt, app/src/main/java/dev/openbili/webdemo/ui/BangumiExploringRail.kt, app/src/main/java/dev/openbili/webdemo/ui/BangumiRecommendationScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:398 — `fullscreenTransitionBusy || !fullscreenLayerVisible` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt, app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:378 — `fullscreenTransitionBusy || fullscreenLayerVisible` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt, app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:921 — `gestureFeedbackVersion != version || gestureFeedback != displayed` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt, app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt:924 — `gestureFeedbackVersion == version && gestureFeedback == displayed` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/live/LiveRoomScreen.kt, app/src/main/java/dev/openbili/webdemo/video/VideoScreen.kt. 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 app/src/main/java/dev/openbili/webdemo/video/ControllerVideoSelectionPanel.kt:35 — `info.bvid == episode.bvid && it.cid == episode.cid` appears character-identically in 2 files — app/src/main/java/dev/openbili/webdemo/video/ControllerVideoSelectionPanel.kt, app/src/main/java/dev/openbili/webdemo/video/VideoSelectionOverlay.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×18
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/CdnRouting.kt:71 — `cdnHost` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/api/BiliSpaceApi.kt:117 — `getSpaceIpLocation` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/api/BiliSubtitleApi.kt:234 — `parseJsonError` swallows every exception into `"字幕接口返回异常"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/article/ArticleReaderControls.kt:36 — `restoreFocus` swallows every exception into `false` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/bangumi/BangumiExploreViewModel.kt:754 — `resolveFollowingSeasonTypes` swallows every exception into `0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/feed/FeedScreen.kt:1007 — `FeedCard` swallows every exception into `false` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/feed/PopularFeedScreen.kt:914 — `PopularVideoCard` swallows every exception into `false` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt:756 — `loadFollowingGroups` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt:1293 — `enqueueMissingAvatars` swallows every exception into `emptyMap()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:360 — `loadDanmaku` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:598 — `totalBytes` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:1065 — `availableBytes` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/offline/OfflineMediaManager.kt:1072 — `directoryBytes` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/search/SearchViewModel.kt:147 — `open` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/search/SearchViewModel.kt:177 — `setQuery` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/ui/AppRootTail.kt:812 — `appRootTailContent` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/ui/VideoCardPalette.kt:303 — `extractVideoCoverDominantColors` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/dev/openbili/webdemo/video/CommentPalette.kt:170 — `extractAvatarDominantColors` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found app/build.gradle.kts:5 — 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 `app/build.gradle.kts` makes this repository a deployable product (line 5).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion app/build.gradle.kts:1 — `app` (109071 LoC, 1176 module-visible types across 18 directories) overshoots its size bounds. 1 of 2 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 0.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.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D37 · Vulnerability-disclosure Policy · REDACTED · ×1
  • REDACTED
M1 · Documentation (README) · Thin README · ×1
  • Thin README README.md:1 — The root README is 103 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation app/build.gradle.kts:114 — `app/build.gradle.kts` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
PF1 · Benchmark discipline · Benchmarks don't track allocations · ×1
  • Benchmarks don't track allocations — A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
X9 · Subsumed condition operand · Subsumed condition operand · ×1
  • Subsumed condition operand app/src/main/java/dev/openbili/webdemo/UrlPolicy.kt:28 — `path.startsWith("/payment")` can never decide this `||` — every value satisfying `path.startsWith("/payment")` also satisfies `path.startsWith("/pay")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-b3a7ca231f7c46a3b8287382abb112f4/history.json --exit-code 0 --source .2artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-b3a7ca231f7c46a3b8287382abb112f4/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .3artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).0—
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 9 file(s) — `app/src/main/java/dev/openbili/webdemo/live/LiveRoomSecondary.kt`, `app/src/main/java/dev/openbili/webdemo/live/LiveRoomViewModel.kt`, `app/src/main/java/dev/openbili/webdemo/my/CachedVideosPane.kt`, `app/src/main/java/dev/openbili/webdemo/my/MyScreenHistory.kt`, `app/src/main/java/dev/openbili/webdemo/settings/AppSettingsViewModel.kt`, … (+4 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).0—

Run 01a1e862-c270-700b-a468-918b6531a1f3 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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