Public report of BeerEgg2001/Komorebi, 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, 04:37 UTC · Survey ID cd_76f9e73c658942a99daade1ab9c6fe71

BeerEgg2001/Komorebi

Measured 17 November 2026, 04:34 UTC, at code version 6f20e8b

First survey, so nothing to compare with yet
CAI score 41.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 medium codebase: 63,131 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Production Readiness, 12.0

Findings by how serious they are

4 critical 583 serious 61 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, 04:34 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 ▸

39of 39 dimensions measured by tools.
639of 648 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
39dimensions across 6 lenses, read from 63,131 lines of product code in 5 projects.
Chapters

Executive summary

BeerEgg2001/Komorebi falls short of our standard for production because the project has no automated tests and we found no working pipeline that builds or tests changes to the code. It scores 41.0 out of 100 and is rated Weak, and three of its four critical findings are security problems.

Production Readiness, at 12.0, is the weakest lens and counts most in the score. The best first step is adding automated tests, worth about 25.7 points. Raising Production Readiness to 70 would lift the score to about 64.3.

Two passwords or keys are open to anyone who can read the repository. One weakness in the code could be used by an attacker, and the project has no automated tests, so a change can break it without warning. Adding automated tests, replacing each exposed password or key and fixing the weaknesses the scanner points to would close these risks.

The product code is 63,131 lines, about €61,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 12.0 · counts for 46%Maturity 53.7 · counts for 25%Code Health 69.1 · counts for 14%Architecture 80.4 · counts for 8%Security and Compliance 84.0 · counts for 4%Performance 100.0 · counts for 2%

If Production Readiness rose from 12.0 to 70, the lowest score rated Strong, the score would rise from 41.0 to about 64.3.

Code composition: what the lines of code are
Business logic 33%Supporting code 67%
Rebuild cost: about €61,000 · Estimate
Cost to rebuild€20,000 to €100,000, for 337 to 1,068 hours of work, about 0.4 person-years for one engineer
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 41. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 63,131 lines of product code
Comment linesThe estimate prices 63,071 lines. Comment lines count towards the size of 63,131 lines but aren't priced as work.
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 25.7 points · High effort · Code Coverage
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with KomorebiConfigurator.csproj.
Raises the score by about 5.9 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 5.2 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 €61,000 to build again, about 0.4 person-years of work. Its weakest lens is Production Readiness, at 12.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 1 No automated tests finding(s) in Code Coverage. Of all the actions in this report, it raises the score most for the work it takes: about 25.7 points for high effort, because it clears the 1 Code Coverage 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 4.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 9% to 20% on every change. The history of the code shows how much it changes: about 14,927 lines over the last 90 days, which is about 60,537 lines a year. At that pace, the extra work comes to an estimated 13.6 to 81.9 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.

100 modules, with 148 dependencies between them. 2 loops run through 12 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 60 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 data.jikkyo2 data.model3 ui.theme4 data5 data.api6 data.local.entity7 data.model.BackendConfig8 data.repository.edcb.EdcbRecordRepository9 data.repository.epgstation.EpgStationDataMapper10 ui.epg.engine11 ui.subtitle.NativeCaptionTimeline12 ui.video13 util14 data.api.interceptor15 data.local.dao16 data.mapper17 data.repository.edcb18 data.repository.epgstation19 ui.subtitle20 ui.video.components21 ui.video.smb22 data.local23 data.repository24 ui.video.player25 data.sync26 di27 viewmodel28 com.beeregg2001.komorebi29 ui.epg30 ui.epg.components31 ui.home32 ui.live33 ui.main34 ui.reserve35 ui.setting36 ui.video.smb.player37 viewmodel.EpgUiState38 ui.components39 ui.home.components40 ui.setting.SettingDialogState
1 data.jikkyo
2 data.model
3 ui.theme
4 data2
5 data.api41
6 data.local.entity1
7 data.model.BackendConfig4
8 data.repository.edcb.EdcbRecordRepository1
9 data.repository.epgstation.EpgStationDataMapper1
10 ui.epg.engine41
11 ui.subtitle.NativeCaptionTimeline1
12 ui.video14
13 util2
14 data.api.interceptor11
15 data.local.dao18
16 data.mapper74
17 data.repository.edcb117424
18 data.repository.epgstation2453534
19 ui.subtitle11
20 ui.video.components488
21 ui.video.smb33
22 data.local7
23 data.repository41323544
24 ui.video.player9313
25 data.sync11122
26 di221615
27 viewmodel3284322111824
28 com.beeregg2001.komorebi114
29 ui.epg716
30 ui.epg.components32
31 ui.home1924
32 ui.live21421115213
33 ui.main9220
34 ui.reserve62
35 ui.setting1117
36 ui.video.smb.player113
37 viewmodel.EpgUiState13
38 ui.components611
39 ui.home.components14131
40 ui.setting.SettingDialogState311
Uses a module listed above itPart of a loopThe module itself
1 data.jikkyo2 data.model3 ui.theme4 data5 data.api6 data.local.entity7 data.model.BackendConfig8 data.repository.edcb.EdcbRecordRepository9 data.repository.epgstation.EpgStationDataMapper10 ui.epg.engine11 ui.subtitle.NativeCaptionTimeline12 ui.video13 util14 data.api.interceptor15 data.local.dao16 data.mapper17 data.repository.edcb18 data.repository.epgstation19 ui.subtitle20 ui.video.components21 ui.video.smb22 data.local23 data.repository24 ui.video.player25 data.sync26 di27 viewmodel28 com.beeregg2001.komorebi29 ui.epg30 ui.epg.components31 ui.home32 ui.live33 ui.main34 ui.reserve35 ui.setting36 ui.video.smb.player37 viewmodel.EpgUiState38 ui.components39 ui.home.components40 ui.setting.SettingDialogStatedata.jikkyo1data.model2ui.theme3data4data.api5data.local.entity6data.model.BackendConfig7data.repository.edcb.EdcbRecordRepository8data.repository.epgstation.EpgStationDataMapper9ui.epg.engine10ui.subtitle.NativeCaptionTimeline11ui.video12util13data.api.interceptor14data.local.dao15data.mapper16data.repository.edcb17data.repository.epgstation18ui.subtitle19ui.video.components20ui.video.smb21data.local22data.repository23ui.video.player24data.sync25di26viewmodel27com.beeregg2001.komorebi28ui.epg29ui.epg.components30ui.home31ui.live32ui.main33ui.reserve34ui.setting35ui.video.smb.player36viewmodel.EpgUiState37ui.components38ui.home.components39ui.setting.SettingDialogState4024114114111421118741174242453534114883374132354493131112222161532843221118241147163219242142111521392206211171131361114131311+60 more modules (most-connected shown)

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

At a glance — Architecture · 80.4 · Strong ·

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

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

At a glance — Security · 84.0 · Strong ·

At a glance — Performance · 100.0 · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection4High / Critical
A07:2025 — Authentication Failures3High / Critical

Roadmap

Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; Resolve the 1 No ADRs found finding(s) in ADR Quality — start with KomorebiConfigurator.csproj; Add a CI workflow that builds and runs the test suite on every push/PR.

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

Do thisHelpsEffortDimension
Resolve the 1 No automated tests finding(s) in Code Coverage.+25.7 ptsHighCode Coverage
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with KomorebiConfigurator.csproj.+5.9 ptsLowADR Quality
Add a CI workflow that builds and runs the test suite on every push/PR.+5.2 ptsMediumCI/CD gates
Adopt SLF4J (with a Logback or Log4j2 JSON encoder) and log at meaningful points in the modules you run.+5.2 ptsMediumObservability
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.+5.2 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.+5.1 ptsMediumArchitecture documentation
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.+2.3 ptsMediumDocumentation (README)
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+2.2 ptsMediumRelease Hygiene

File quality

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

FileScoreBandWorst signal
REDACTED3.0SlopSecrets (history): REDACTED: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt5.5MixedCyclomatic Complexity: SettingComponentsKt.GeminiSetupDialog (cyclomatic 19)
app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt5.5MixedCyclomatic Complexity: SmbViewModel.parseLuaFormat (cyclomatic 23)
app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt5.6MixedCyclomatic Complexity: SettingScreenKt.SettingsScreen (cyclomatic 106)
app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt5.9MixedGod Classes: TooManyMethods: RecordViewModel
app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt5.9MixedCode Duplication: Edited copy of a member (14 corresponding lines)
app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt6.0MixedCyclomatic Complexity: EdcbApi.getEventInfos (cyclomatic 24)
app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.kt6.3MixedCyclomatic Complexity: HomeContentsKt.HomeContents (cyclomatic 43)
app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt6.3MixedCyclomatic Complexity: VideoPlayerManagerKt.rememberManagedExoPlayer (cyclomatic 30)
app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt7.0MixedCyclomatic Complexity: VideoPlayerScreenKt.VideoPlayerScreen (cyclomatic 130)
app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt7.0MixedCyclomatic Complexity: EpgDrawer.draw (cyclomatic 90)
app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt7.0MixedCyclomatic Complexity: RecordListScreenKt.RecordListScreen (cyclomatic 83)
app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt7.0MixedCyclomatic Complexity: ConditionEditDialogKt.ConditionEditDialog (cyclomatic 68)
app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt7.0MixedCyclomatic Complexity: LivePlayerSubMenuKt.LiveTopSubMenuUI (cyclomatic 66)
app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt7.0MixedCyclomatic Complexity: SettingContentsKt.ConnectionSettingsContent (cyclomatic 53)
app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt7.0MixedCyclomatic Complexity: LivePlayerViewModel.playMainChannel (cyclomatic 22)
app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt7.0MixedCyclomatic Complexity: SettingsViewModel.forceSyncStreamQualities (cyclomatic 20)
app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt7.0MixedCyclomatic Complexity: LibraryCardsKt.VideoRecentRecordCard (cyclomatic 19)
app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt7.0MixedCyclomatic Complexity: LivePlayerOverlaysKt.LCropOverlay (cyclomatic 19)

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

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

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

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 39 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, 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 — 39 dimensions across the health lenses
D1D2D3D4D5D6D8D13D14D15D17D19D20D21D27D28D29D30D34D35D43D44AX10AX2AX3AX4AX5AX6AX8GD1M1M2M3P1P2P3P6PF3X5

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, 639 of 648 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 01a1e7c9-0e87-77c9-a558-84a07b817915.

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.

  • 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. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (8 contributor(s) across 515 commit(s) sampled, automation and bot accounts excluded). One of them holds 92% of the history; the other 7 hold 1.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 0 deducted marker(s) and the 0.0/KLoC density on this row were taken over this repository's .NET projects ALONE: .kt (55,584 lines, 90% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 1 task marker(s) (TODO/FIXME/HACK/XXX) across 1 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • 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. `REDACTED`, `app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgJumpMenu.kt`, `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt`, `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt`, `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt`, … (+1 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.
  • 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. * What went wrong: Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'. > [CXX1300] CMake '3.30.5' was not found in SDK, PATH, or by cmake.dir pro…; runtime evidence skipped (launch chosen because app/build.gradle.kts applies the Android application plugin and gradlew builds it).
  • 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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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.
  • X1 Async correctness — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X12 Unreachable branch — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X13 Undrained process stream — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X23 Unguarded diagnostic materialisation — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X4 Structured logging — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • 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.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • 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.0 / 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.0 / 10 · rule-coverage 100% · ceiling Prevented

79 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was LivePlayerScreenKt.LivePlayerScreen at 147.

LivePlayerScreenKt.LivePlayerScreen (cyclomatic 147)app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:63
MainRootScreenKt.MainRootScreen (cyclomatic 138)app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.kt:47
VideoPlayerScreenKt.VideoPlayerScreen (cyclomatic 130)app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:120
SmbVlcPlayerScreenKt.SmbVlcPlayerScreen (cyclomatic 121)app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:65
HomeLauncherScreenKt.HomeLauncherScreen (cyclomatic 120)app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt:131

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

What to do

  1. Bring the 34 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with LivePlayerScreenKt.LivePlayerScreen (cyclomatic 147), MainRootScreenKt.MainRootScreen (cyclomatic 138), VideoPlayerScreenKt.VideoPlayerScreen (cyclomatic 130). — 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 34 together lifts Cyclomatic Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; 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

117 method(s) exceeded the cognitive complexity threshold of 15; the worst was SmbVlcPlayerScreenKt.SmbVlcPlayerScreen at 320.

SmbVlcPlayerScreenKt.SmbVlcPlayerScreen (cognitive 320)app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:65
EpgDrawer.draw (cognitive 264)app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:94
VideoPlayerScreenKt.VideoPlayerScreen (cognitive 236)app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:120
LivePlayerScreenKt.LivePlayerScreen (cognitive 211)app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:63
HomeLauncherScreenKt.HomeLauncherScreen (cognitive 184)app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt:131

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

What to do

  1. Bring the 117 bodies over 15 down to 15 or less in Cognitive Complexity — start with SmbVlcPlayerScreenKt.SmbVlcPlayerScreen (cognitive 320), EpgDrawer.draw (cognitive 264), VideoPlayerScreenKt.VideoPlayerScreen (cognitive 236). — 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 117 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

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

68 god class(es) detected.

MethodTooLong: ConditionEditDialogKt.ConditionEditDialog · ×38app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:53
FileTooLong: setting/SettingComponents.kt · ×19app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt
ClassTooLong: LivePlayerViewModel · ×7app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:77
TooManyMethods: EdcbByteUtils · ×4app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:10

What to do

  1. Resolve the 38 MethodTooLong finding(s) in God Classes — start with SettingContents.kt (4), ModernEpgCanvasEngine.kt (2), LivePlayerOverlays.kt (2). — One of this dimension's main actionable groups (38 warning-level).
  2. Resolve the 19 FileTooLong finding(s) in God Classes — start with SettingComponents.kt, SettingContents.kt, LivePlayerViewModel.kt. — One of this dimension's main actionable groups (19 warning-level).
  3. Resolve the 7 ClassTooLong finding(s) in God Classes — start with LivePlayerViewModel.kt, SettingsViewModel.kt, EdcbByteUtils.kt. — One of this dimension's main actionable groups (7 warning-level).

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

D4 · Code Duplication4.2 / 10Weak✓ Tool-verified

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

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

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

224 duplicated block group(s) detected. 14.5 % of the production lines (8,330 of 57,370) are in a reported copy. A further 44 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (9 lines × 2) · ×14app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:84
Duplicated block (11 lines × 2) · ×12app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:111
Duplicated block (7 lines × 2) · ×11app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:511
Duplicated block (13 lines × 2) · ×9app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:105
Duplicated block (10 lines × 2) · ×9app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:596

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

What to do

  1. Resolve the 14 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with LivePlayerViewModel.kt (3), SettingContents.kt (2), EdcbDataMapper.kt. — One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 12 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with EpgSearchListItem.kt, EpgDrawer.kt, VideoTabContent.kt. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 11 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with EdcbApi.kt (2), REDACTED (2), EdcbDataMapper.kt. — One of this dimension's main actionable groups (11 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

5 production modules (Gradle+CMake), 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 2 of the 5 (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)9.4 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

3 of 58 classes have LCOM4 above 3.

Low cohesion: HomeViewModel (LCOM4 6) · ×3app/src/main/java/com/beeregg2001/komorebi/viewmodel/HomeViewModel.kt:45

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with HomeViewModel.kt, RecordViewModel.kt, SmbViewModel.kt. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

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

No automated tests

What to do

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

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 134 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 7 direct `PackageReference`(s), and 127 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares a Gradle build (build.gradle/build.gradle.kts), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots7.5 / 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 7.5 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt (10×130=1300); app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt (5×147=735); app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt (6×120=720) Repeated repair below the complexity floor: app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt (8 of 10 changes were fixes); app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt (6 of 8 changes were fixes); app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.kt (5 of 7 changes were fixes)

Hotspot: app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt · ×21app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:120
Repeated repair: app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt · ×11app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:103

What to do

  1. Resolve the 21 Hotspot finding(s) in Churn × Complexity Hotspots — start with VideoPlayerScreen.kt, LivePlayerScreen.kt, HomeLauncherScreen.kt. — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 11 Repeated repair finding(s) in Churn × Complexity Hotspots — start with EpgStationRecordRepository.kt, UrlBuilder.kt, VideoPlayerViewModel.kt. — One of this dimension's main actionable groups (11 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 debt markers + 0 dead symbols across 625 LoC in the .NET projects (0.0/KLoC) → score 10.0. Measured on the .NET source only: .kt (90% of production source) was not read, and carries at least 1 uncounted task marker(s) in 1 file(s).

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundKomorebiConfigurator/KomorebiConfigurator.csproj:3

What to do

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

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

D21 · Naming Consistency7.5 / 10Strong✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

7 naming inconsistencies among 283 declarations measured against a convention their peers follow.

`originalNetworkID` spells `ID` where 323 names in the project spell it `Id`app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:52
`transportStreamID` spells `ID` where 323 names in the project spell it `Id`app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:52
`eventID` spells `ID` where 323 names in the project spell it `Id`app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:53
`reserveID` spells `ID` where 323 names in the project spell it `Id`app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:53
`serviceID` spells `ID` where 323 names in the project spell it `Id`app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:53

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

What to do

  1. Resolve the 1 `originalNetworkID` spells `ID` where 323 names in the project spell it… finding(s) in Naming Consistency — start with EdcbApi.kt. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `transportStreamID` spells `ID` where 323 names in the project spell it… finding(s) in Naming Consistency — start with EdcbApi.kt. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 `eventID` spells `ID` where 323 names in the project spell it `Id` finding(s) in Naming Consistency — start with EdcbApi.kt. — One of this dimension's main actionable groups (1 recommendation-level).

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

D27 · Navigability9.2 / 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 9.2 / 10 · rule-coverage 100% · ceiling Documented

16 % of calls cross a namespace and 15 % 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)8.0 / 10Adequategated by 2 critical findings✓ 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 8.0 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 0 critical, 2 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 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)7.2 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

4 finding(s): 0 critical, 1 high, 3 medium, 0 low. semgrep hit a parse error in 2 file(s) — `REDACTED` (line 265, line 344, line 365, …), `gradlew` (line 74, line 180) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. 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.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

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

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

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

1 of 155 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is app/src/main/java/com/beeregg2001/komorebi/data/util/EpgUtils.kt. Counted over 155 of the 210 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned files with no living knowledge
Orphaned fileapp/src/main/java/com/beeregg2001/komorebi/data/util/EpgUtils.kt:1

✓ On the Gold path — maintain.

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

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

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

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

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

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

Strongest change-coupling: SettingScreen.kt↔SettingState.kt 100%; VideoPlayerManager.kt↔VideoPlayerScreen.kt 83%; SettingComponents.kt↔SettingContents.kt 71%

Change coupling: SettingScreen.kt ↔ SettingState.kt · ×6app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:1

What to do

  1. Resolve the 6 Change coupling finding(s) in Change Coupling — start with SettingScreen.kt, VideoPlayerManager.kt, SettingComponents.kt. — One of this dimension's main actionable groups (6 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition8.2 / 10Strong✓ Tool-verified

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

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

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

AX2 · Stateful singletons5.2 / 10Adequate✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `JikkyoChannelResolver` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (jikkyoChannelsCache; e.g. `jikkyoChannelsCache` in `getJikkyoChannels` at line 64). — app/src/main/java/com/beeregg2001/komorebi/data/jikkyo/JikkyoChannelResolver.kt:25
  • `EdcbLiveRepository` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (failedLogoIds; e.g. `failedLogoIds` in `getChannelLogoUrl` at line 299). — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:28
  • `EpgStationRecordRepository` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (seriesFeatureDisabled, seriesCache, seriesCacheAt, streamId, qualities; e.g. `seriesFeatureDisabled` in `getSeriesList` at line 103). — app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:28
  • `LiveJikkyoManager` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (jikkyoClient, processedCommentIds; e.g. `jikkyoClient` in `startJikkyo` at line 51). — app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveJikkyoManager.kt:35

What to do

  • Java/Kotlin: keep container singletons stateless — move per-request data into locals or a request-scoped bean — or back the state with java.util.concurrent types (ConcurrentHashMap, AtomicInteger/AtomicReference), guard it with synchronized / a Lock (Kotlin: withLock), or mark a flag that is only ever overwritten volatile (@Volatile).
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.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX6 · Interface segregation9.3 / 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.

  • `EpgStationApi` declares 32 abstract methods: `getChannels`, `getSchedules`, `getBroadcasting`, `getScheduleDetail`, `getRecordedList`, `getRecordedDetail`, `getNextUp`, `getSeries`, `getDictionaryWorks`, `getSeriesDetail`, `getSeriesImage`, `getSeriesMapping`, `getDuration`, `getVideoFileMetadata`, `getChapters`, `getPlaybackPosition`, `updatePlaybackPosition`, `getAudioTracks`, `getConfig`, `getReserves`, `getReserve`, `addReserve`, `updateReserve`, `deleteReserve`, `getRules`, `getRule`, `addRule`, `updateRule`, `deleteRule`, `startLiveHls`, `startRecordedHls`, `keepStream`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — app/src/main/java/com/beeregg2001/komorebi/data/api/EpgStationApi.kt:15
  • `KonomiApi` declares 21 abstract methods: `getCurrentUser`, `getChannels`, `getRecordedPrograms`, `searchVideos`, `getRecordedProgram`, `keepAlive`, `getBookmarks`, `getWatchHistory`, `updateWatchHistory`, `getJikkyoInfo`, `getArchivedJikkyo`, `getReserves`, `addReserve`, `updateReserve`, `deleteReservation`, `getReservationConditions`, `addReservationCondition`, `getReservationCondition`, `updateReservationCondition`, `deleteReservationCondition`, `getEpgPrograms`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — app/src/main/java/com/beeregg2001/komorebi/data/api/KonomiApi.kt:8
  • `RecordedProgramDao` declares 41 abstract methods: `upsertAll`, `getById`, `getByIds`, `getAllIds`, `deleteOrphans`, `deleteByIds`, `getAll_DateDesc`, `getAll_DateAsc`, `getAll_TitleDesc`, `getAll_TitleAsc`, `getAll_DurationDesc`, `getAll_DurationAsc`, `getUnwatched_DateDesc`, `getUnwatched_DateAsc`, `getUnwatched_TitleDesc`, `getUnwatched_TitleAsc`, `getUnwatched_DurationDesc`, `getUnwatched_DurationAsc`, `getAllPagingSource`, `getPagingSourceByChannel`, `searchPagingSource`, `searchSeriesPagingSource`, `searchSeriesPagingSourceById`, `getSeriesFocusProgramId`, `getSeriesFocusProgramIdById`, `getPagingSourceByGenre`, `getPagingSourceByDayOfWeek`, `getRecordingProgramIds`, `getPagingSourceUnwatched`, `getRecentRecordingsFlow`, `getAllPrograms`, `getTotalCountFlow`, `getDistinctChannels`, `getGroupedSeries`, `getAllTitlesAndSeries`, `getTitlesNotInDictionary`, `updateSeriesName`, `updateSeriesNameByOriginalTitle`, `clearAll`, `getUnknownTitles`, and 1 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — app/src/main/java/com/beeregg2001/komorebi/data/local/dao/RecordedProgramDao.kt:9

What to do

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

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

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

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

M1 · Documentation (README)6.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • 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 documentation2.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.

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.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

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

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

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

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

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

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

What to do

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

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

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

  • No logging call was found in the 199 Python, JVM production file(s) this check read across 3 module(s). Each was searched for its ecosystem's logging libraries (JVM: SLF4J, Log4j2, java.util.logging, Logback, kotlin-logging, scala-logging; Python: logging, structlog, loguru) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.

What to do

  • Adopt SLF4J (with a Logback or Log4j2 JSON encoder) and log at meaningful points in the modules you run.
  • Add a health-check endpoint (Spring Boot Actuator's /actuator/health, or a /health route) so orchestrators and load balancers can probe liveness/readiness.
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.
  • `KomorebiConfigurator/KomorebiConfigurator.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — KomorebiConfigurator/KomorebiConfigurator.csproj:16

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

X5 · Nullable reference types9.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

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

  • ~1.3 `!` suppressions per 1k syntax nodes — 2 suppression(s) across the 1569 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

Reference — by lens

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

LensScoreRatingImpact
Code Health69.1Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture80.4StrongSolid.
Maturity53.7Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness12.0Critical — gated by D8, P1, P2, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security84.0StrongSolid.
Performance100.0ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

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

  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 32 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 10 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 — 73 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • 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. * What went wrong: Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'. > [CXX1300] CMake '3.30.5' was not found in SDK, PATH, or by cmake.dir pro…; 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
  • D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
  • D12 Dependency Hygiene — Dependency hygiene not measured
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .cpp, .kt, .lua, .py, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
  • D24 Comment Value — 50 of 51 comment blocks were not judged (49 in a non-Latin script, 1 in a language other than English): redundancy is judged by word overlap with the code's identifiers, which cannot be measured across languages.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — This repository is one project, `KomorebiConfigurator` (625 LoC, 7 public types across 4 namespaces), within the size bounds. Not scored: a single unit of this size gives project cohesion nothing to grade.
  • 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) — 6 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 89 value object(s); 2 repository port(s) loading or saving an aggregate/entity
  • 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
  • IC1 Incompleteness & stubs — IC1 reached only 1% of this repository's production lines — kotlin (56,638 lines), cpp (5,560 lines), lua (201 lines), python (107 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • M4 Documentation accuracy — Not applicable: the 5 current-state document(s) make no claim of a kind M4 checks. 142 claim(s) of kinds M4 does not check were not checked (path 118, environment variable 22, cd 2); M4 checks only links and versions and artefact counts.
  • P12 CI test-gate honesty — no CI workflow found
  • P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • X1 Async correctness — X1 reached only 1% of this repository's production lines — kotlin (56,638 lines), cpp (5,560 lines), lua (201 lines), python (107 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X12 Unreachable branch — X12 reached only 1% of this repository's production lines — kotlin (56,638 lines), cpp (5,560 lines), lua (201 lines), python (107 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — X13 reached only 1% of this repository's production lines — kotlin (56,638 lines), cpp (5,560 lines), lua (201 lines), python (107 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 async method does work a token could cancel
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — X23 reached only 1% of this repository's production lines — kotlin (56,638 lines), cpp (5,560 lines), lua (201 lines), python (107 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — X27 reached only 1% of this repository's production lines — kotlin (56,638 lines), cpp (5,560 lines), lua (201 lines), python (107 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • X3 Exception handling — X3 reached only 1% of this repository's production lines — kotlin (56,638 lines), cpp (5,560 lines), lua (201 lines), python (107 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X4 Structured logging — X4 reached only 1% of this repository's production lines — kotlin (56,638 lines), cpp (5,560 lines), lua (201 lines), python (107 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 4 finding(s)
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D8 · Code Coverage · No automated tests · ×1
  • No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (JUnit (with Kotest or MockK on Kotlin)), and run it in CI so the gap cannot reopen.
Serious — 583 finding(s)
D3 · God Classes · MethodTooLong · ×38
  • MethodTooLong: ConditionEditDialogKt.ConditionEditDialog app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:53 — MethodTooLong — ConditionEditDialog runs 614 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 514 over it, 6.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: EpgDrawer.draw app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:94 — MethodTooLong — draw runs 436 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 336 over it, 4.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: EpgReserveDialogKt.EpgReserveDialog app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:40 — MethodTooLong — EpgReserveDialog runs 349 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 249 over it, 3.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EpgNavigationContainerKt.EpgNavigationContainer app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:65 — MethodTooLong — EpgNavigationContainer runs 346 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 246 over it, 3.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: LivePlayerSubMenuKt.LiveTopSubMenuUI app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:43 — MethodTooLong — LiveTopSubMenuUI runs 331 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 231 over it, 3.31× 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: AiConciergePanelKt.AiConciergePanel app/src/main/java/com/beeregg2001/komorebi/ui/components/AiConciergePanel.kt:54 — MethodTooLong — AiConciergePanel runs 325 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 225 over it, 3.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainRootDialogsKt.MainRootDialogs app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootDialogs.kt:51 — MethodTooLong — MainRootDialogs runs 322 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 222 over it, 3.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: ModernEpgCanvasEngineKt.ModernEpgCanvasEngine_Smooth app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:53 — MethodTooLong — ModernEpgCanvasEngine_Smooth 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: ModernEpgCanvasEngine_NoAnimeKt.ModernEpgCanvasEngine_NoAnime app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine_NoAnime.kt:48 — MethodTooLong — ModernEpgCanvasEngine_NoAnime runs 275 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 175 over it, 2.75× 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: SettingContentsKt.ConnectionSettingsContent app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:251 — MethodTooLong — ConnectionSettingsContent runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SeasonalDecorKt.SeasonalDecor app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:33 — MethodTooLong — SeasonalDecor runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AdvancedSettingsDialogKt.AdvancedSettingsDialog app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:55 — MethodTooLong — AdvancedSettingsDialog runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainRootBackgroundKt.MainRootBackground app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt:37 — MethodTooLong — MainRootBackground runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LiveDualPlayerKt.DualDisplayPlayer app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:71 — MethodTooLong — DualDisplayPlayer runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RecordSyncEngine.syncAllRecords app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt:195 — MethodTooLong — syncAllRecords runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ReserveSettingsDialogKt.ReserveSettingsDialog app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:45 — MethodTooLong — ReserveSettingsDialog 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.
  • MethodTooLong: LivePlayerOverlaysKt.LCropOverlay app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:433 — MethodTooLong — LCropOverlay runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingComponentsKt.GeminiSetupDialog app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1195 — MethodTooLong — GeminiSetupDialog runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.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: LivePlayerState.handleKeyEvent app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerState.kt:118 — MethodTooLong — handleKeyEvent runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× 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: VideoPlayerOverlaysKt.VideoLCropOverlay app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:68 — MethodTooLong — VideoLCropOverlay runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SceneSearchOverlayKt.ChapterListOverlay REDACTED:457 — MethodTooLong — ChapterListOverlay runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BaseballDashboardKt.BaseballDashboardScreen app/src/main/java/com/beeregg2001/komorebi/ui/home/BaseballDashboard.kt:46 — MethodTooLong — BaseballDashboardScreen runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EpgSearchListItemKt.EpgSearchListItem app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:38 — MethodTooLong — EpgSearchListItem runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ModernEpgCanvasEngineKt.EpgHeaderSection app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:469 — MethodTooLong — EpgHeaderSection runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.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: SettingContentsKt.PlaybackSettingsContent app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:607 — MethodTooLong — PlaybackSettingsContent runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 13 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×21
  • Hotspot: app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:120 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 130 in VideoPlayerScreenKt.VideoPlayerScreen at line 120. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.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/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:63 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 147 in LivePlayerScreenKt.LivePlayerScreen at line 63. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.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/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt:131 — app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 120 in HomeLauncherScreenKt.HomeLauncherScreen at line 131. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.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/com/beeregg2001/komorebi/ui/main/MainRootScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.kt:47 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 138 in MainRootScreenKt.MainRootScreen at line 47. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:89 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in RecordListScreenKt.RecordListScreen at line 89. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.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/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:53 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in SettingScreenKt.SettingsScreen at line 53. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerState.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerState.kt:74 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerState.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in VideoPlayerState.handleKeyEvent at line 74. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerState.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/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:652 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in LivePlayerViewModel.playMainChannel at line 652. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.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/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:43 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in LivePlayerSubMenuKt.LiveTopSubMenuUI at line 43. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.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/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt:195 — app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in RecordSyncEngine.syncAllRecords at line 195. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt:88 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in VideoPlayerManagerKt.rememberManagedExoPlayer at line 88. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.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/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:396 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in EdcbRecordRepository.mapToRecordedProgram at line 396. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.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/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt:37 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in MainRootBackgroundKt.MainRootBackground at line 37. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootBackground.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/com/beeregg2001/komorebi/ui/home/LiveContents.kt app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:68 — app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in LiveContentsKt.LiveContent at line 68. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.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/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:63 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in RecordListContentKt.RecordListContent at line 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.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/com/beeregg2001/komorebi/ui/home/HomeContents.kt app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.kt:39 — app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in HomeContentsKt.HomeContents at line 39. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.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/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:53 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in RecordSeriesContentKt.RecordSeriesContent at line 53. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.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/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:52 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in RecordSeriesGridContentKt.RecordSeriesGridContent at line 52. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.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/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt:69 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in EdcbEpgCacheManager.fetchEpgDataIfNeeded at line 69. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:384 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in VideoPlayerSubMenuKt.ModernVideoSettingsOverlay at line 384. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.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/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:105 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in EdcbLiveRepository.getChannels at line 105. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.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.
D3 · God Classes · FileTooLong · ×19
  • FileTooLong: setting/SettingComponents.kt app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt — FileTooLong — 1091 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 591 over it, 2.18× 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: setting/SettingContents.kt app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt — FileTooLong — 1039 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 539 over it, 2.08× 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: viewmodel/LivePlayerViewModel.kt app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt — FileTooLong — 1014 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: LivePlayerViewModel (77-1425). The bar is 500 significant lines; this is 514 over it, 2.03× 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: setting/SettingScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt — FileTooLong — 902 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 402 over it, 1.80× 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: smb/SmbLibraryScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt — FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 326 over it, 1.65× 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/RecordListScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt — FileTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 318 over it, 1.64× 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: player/VideoPlayerScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt — FileTooLong — 761 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 261 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: live/LivePlayerScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt — FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: val (59-1052). The bar is 500 significant lines; this is 253 over it, 1.51× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: home/HomeLauncherScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt — FileTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 245 over it, 1.49× 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: viewmodel/SettingsViewModel.kt app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt — FileTooLong — 698 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: SettingsViewModel (67-1006). The bar is 500 significant lines; this is 198 over it, 1.40× 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: player/SmbVlcPlayerScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt — FileTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: val (61-855). The bar is 500 significant lines; this is 197 over it, 1.39× 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: reserve/ConditionEditDialog.kt app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt — FileTooLong — 664 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 164 over it, 1.33× 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: main/MainRootScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.kt — FileTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 73 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: player/PlayerControls.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/player/PlayerControls.kt — FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 42 over it, 1.08× 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: components/LibraryCards.kt app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt — FileTooLong — 517 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 17 over it, 1.03× 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: player/VideoPlayerSubMenu.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt — FileTooLong — 513 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 13 over it, 1.03× 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: sync/RecordSyncEngine.kt app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt — FileTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: RecordSyncEngine (65-715). The bar is 500 significant lines; this is 4 over it, 1.01× 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: live/LivePlayerOverlays.kt app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt — FileTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: engine/EpgDrawer.kt app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt — FileTooLong — 502 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: EpgDrawer (41-736). The bar is 500 significant lines; this is 2 over it, 1.00× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×14
  • Duplicated block (9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:84 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:84-92 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:125-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:605 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:605-613 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:753-761 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:605` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:163 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:163-171 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:113-122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:163` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:771 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:771-779 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:656-664 — 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:771` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:613 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:613-621 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:666-674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:613` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:375 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:375-383 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.kt:251-259 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:513 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:513-521 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:605-613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:513` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1185 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1185-1193 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1270-1278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:66 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:66-74 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingState.kt:68-76 — 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/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:61 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:61-69 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:99-111 — 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/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.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.
  • Duplicated block (9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:465 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:465-473 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:494-502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:465` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:475 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:475-483 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:504-512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:475` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:292 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:292-300 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:384-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:292` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:113 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:113-121 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:123-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×12
  • Duplicated block (11 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:111 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:111-121 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt:145-155 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:111` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:290 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:290-300 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:494-504 — both copies are in the same file, so extract the 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/com/beeregg2001/komorebi/ui/home/VideoTabContent.kt:282 — app/src/main/java/com/beeregg2001/komorebi/ui/home/VideoTabContent.kt:282-292 | app/src/main/java/com/beeregg2001/komorebi/ui/home/VideoTabContent.kt:371-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/com/beeregg2001/komorebi/ui/home/VideoTabContent.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.
  • Duplicated block (11 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:420 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:420-430 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:521-531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:420` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:201 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:201-211 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:155-165 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:138 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:138-148 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:89-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:138` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:458 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:458-468 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordNavigationPane.kt:115-125 — 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/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:458` 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:936 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:936-946 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:1067-1077 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:936` 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/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:715 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:715-725 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:780-790 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:715` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt:262 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt:262-272 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt:372-382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:197 — REDACTED:197-207 | REDACTED:466-476 — both copies are in the same file, so extract the 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/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:564 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:564-574 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:660-670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:564` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D15 · Churn × Complexity Hotspots · Repeated repair · ×11
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:103 — app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt changed 10 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is EpgStationRecordRepository.getSeriesList at line 103), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・EPGStationの手動予約を更新すると保存先・エンコード設定が消える不具合を修正(GET /api/reserves/{id}で読み直して送り返すread-modify-write方式に変更。サーバーに現存しないエンコードモードの枠は外して送る) ・EPGStationの自動予約条件の更新で検索対象期間(searchPeriods)が消える不具合と、放送波フラグ(GR/BS/NW*等)指定のルールが編集のたびに個別チャンネル指定へ展開される不具合を修正 ・重複回避を使わない自動予約条件がKomorebiから追加・更新できない(HTTP 500)不具合を修正(avoidDuplicate=false時にperiodToAvoidDuplicateを送らない) ・自動予約条件の有効/無効の切り替えがEPGStationへ反映されない不具合を修正 ・時刻指定ルールの更新でキーワードが空になり拒否される問題を修正 ・新形式(streamProfiles)で配信設定しているEPGStationで画質一覧がサーバー設定から構築されない不具合を修正(streamProfilesを優先し、無い旧サーバーのみstreamConfigを使用) ・ライブ再生を開くたびに保存済みのライブ画質が別ソース向けの画質一覧で照合され、先頭の画質で上書き保存される競合を修正(画質取得ジョブの取り消しと、現在ソース向けの一覧のみで照合) ・EPGStationのログイン認証(auth.enabled: true)で書き込み系APIやストリームkeepが401になった場合に原因を示すメッセージ・ログを追加し、READMEに既知の制限として追記”; “fix: ・リリース前レビューで検出したリグレッション・既存バグを修正(EsRuleEncodeOption型不一致、EPGStationライブ画質のLIVE_QUALITY誤上書き、streamId=0誤判定、エラーメッセージ英語化、他)”; “fix: ・EPGStation録画のMIME誤判定・画質mode衝突・自動予約ルールのフィールド消失を修正(EP-3,4,5)”; “fix: ・EPGStationライブ配信の画質リスト未構築・HLS強制停止・番組表過剰取得・ロゴ再試行を修正(EP-1,2,6,10a-c)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:18 — app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is UrlBuilder.formatBaseUrl at line 18), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・最終検証で検出した軽微な退行を修正(basePath境界チェック、SSE由来HTTPエラーの表示、LiveJikkyoManagerのURL組み立て)”; “fix: ・EDCB低優先度項目(E-11/E-12/E-15/E-16)を本家ソース再検証のうえ修正”; “fix: ・EDCB EPG時刻フィルタのJST/UTC変換ずれ・ライブ再生エラー握り潰し・URL組み立て・デッドコード・チャプター誤取得を修正”; “fix: ・KonomiTV original画質(生MPEG-TS直接再生)対応を追加(ライブ/録画両対応、画質ピッカー・URL組み立て・EDCB直接再生方式のDataSourceルーティング) ・録画/EDCB直接/Original再生で字幕が表示されない不具合を修正(DirectSubtitlePayloadReaderFactory方式へ統一。id3conv.cppが生成するID3 PESのdata_alignment_indicatorビット不備も修正) ・Original再生後に次の番組の再生が開始しない不具合を修正(LaunchedEffectのキー漏れ、program/isEdcbDirect/cfAccessHeadersのremember{}内クロージャ固定、filterStateRefの番組またぎ残留を修正) ・録画リストで再生後に戻るとサブメニューが開いたまま残りフォーカスが効かなくなる不具合を修正 ・ホーム画面のタブ移動が緩慢な問題を修正(refreshHomeDataの多重起動防止・間引き、不要なFlow購読の削除、フルスクリーン再生中のポーリング停止) ・二画面ライブ視聴のフォーカス漏れ・クロップ崩れを修正 ・ラボ設定の二画面制限(labAllowMirakurunDual)をoriginal画質にも一貫適用”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.kt app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.kt:104 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.kt changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is VideoPlayerViewModel.fetchAvailableQualities at line 104), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・KonomiTVのoriginal画質がBS4K等のHEVC録画で選択できず1080p(60fps)へフォールバックする不具合を修正(可否判定から映像コーデック条件を外し「録画完了済み+MPEG-TSコンテナ」のみで判定するよう変更。本家KonomiTVがMPEG-2限定なのはブラウザ側のWASMトランスコーダmpeg2toh264に依存するためで、tsreadex経由でMedia3へ渡すKomorebiには当てはまらない制約だった。servicefilter.cppはH_262/AVC/H_265を等しく扱い、Media3もTS_STREAM_TYPE_H265に対応済み。サーバー側の録画ダウンロードAPIもコーデックを見ない) ・original非対応の録画を一度再生しただけで既定画質設定(VIDEO_QUALITY)が黙って書き換えられ、以降は対応録画を開いてもoriginalに戻らなくなる不具合を修正(番組固有の理由で除外された画質は書き戻さないようperProgramExcludedQualitiesで条件化。バックエンド切替時に値空間が変わった場合の正規化(2c3d8c0)は従来どおり維持) ・画質ラベルを「オリジナル (MPEG-2)」から「オリジナル (無変換)」へ変更(H.264/H.265でも選択可能になり表記が実態と合わなくなったため) ・画質一覧取得が前回分をキャンセルしておらず、録画を連続で開くと遅延応答が別番組の画質一覧・除外情報を上書きしうる問題を修正(detailFetchJobと同じキャンセル方式で直列化し、onClearedでも破棄) ・.gitignoreにIDE設定とビルド生成物の除外を追加(.idea/markdown.xml、tools/ts_synth_gen/build/、tools/ts_index_builder/build/、gradle/gradle-daemon-jvm.properties)”; “fix ・シーンサーチ/L字クロップオーバーレイの呼び出しが過去のリファクタリングで消失していた回帰を修正(録画再生画面に復元。L字クロップは戻るキーでプレイヤーごと終了してしまう実害があったため、キー入力のオーバーレイ判定にも組み込み) ・録画ファイル消失時のエラー検出(HTTP 404判定)をEDCB直接アクセス/KonomiTV original経路だけでなく、EDCB API経由等のHTTP経路にも拡張(Issue #89対応) ・字幕表示がExoPlayer内部の不連続イベントのたびに無条件でちらつく不具合を修正(DISCONTINUITY_REASON_INTERNAL以外でのみクリアするよう変更) ・モダンUIの設定パネルからL字クロップを有効化した際、自分自身(isModernSettingsOpen)ではなく別UIのフラグを閉じていたため設定パネルが閉じずにL字クロップオーバーレイと二重表示・フォーカス競合していた不具合を修正 ・不要になったデッドコードを削除(isLiveStream、RecordViewModelの重複したストリーム維持処理、未使用Composable(UpdateDialog/VideoToast/SettingToggleItem/DualDisplayMock)、未使用FocusRequester等)”; “fix: ・アプリ全体の動作緩慢化を調査・改善(局ロゴキャッシュ、EPG描画、季節演出、起動時のログ/WorkManager/Cloudflareインターセプタ最適化) ・PiP復帰時にタブ→再生中ボタンへフォーカスが通過してしまう不具合を修正 ・PiP中に設定画面を開くとフォーカスが消失し戻るキー連打でアプリ終了ダイアログが出る不具合を修正(PR#103由来) ・EDCBの録画再生方式(直接アクセス/API経由)設定がライブ視聴の画質取得にも誤って連動していた不具合を修正 ・EDCBの画質取得をキャッシュ即時表示+バックグラウンド更新方式に変更し、設定画面の再生設定タブを開くたびに画質一覧を再取得するよう修正 ・未対応のMirakurun単体バックエンド選択肢を選べないよう非表示化 ・タブ切り替え時の固定delay(500-800ms)を実データの準備完了検知に置き換え、初回起動時にホームのデータが空の場合の3秒フォールバックへ丸ごと落ちてしまう不具合を修正 ・コールドブート計測用の軽量診断ログ(ColdStartDiag)を追加”; “fix: ・KonomiTV original画質(生MPEG-TS直接再生)対応を追加(ライブ/録画両対応、画質ピッカー・URL組み立て・EDCB直接再生方式のDataSourceルーティング) ・録画/EDCB直接/Original再生で字幕が表示されない不具合を修正(DirectSubtitlePayloadReaderFactory方式へ統一。id3conv.cppが生成するID3 PESのdata_alignment_indicatorビット不備も修正) ・Original再生後に次の番組の再生が開始しない不具合を修正(LaunchedEffectのキー漏れ、program/isEdcbDirect/cfAccessHeadersのremember{}内クロージャ固定、filterStateRefの番組またぎ残留を修正) ・録画リストで再生後に戻るとサブメニューが開いたまま残りフォーカスが効かなくなる不具合を修正 ・ホーム画面のタブ移動が緩慢な問題を修正(refreshHomeDataの多重起動防止・間引き、不要なFlow購読の削除、フルスクリーン再生中のポーリング停止) ・二画面ライブ視聴のフォーカス漏れ・クロップ崩れを修正 ・ラボ設定の二画面制限(labAllowMirakurunDual)をoriginal画質にも一貫適用”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationLiveRepository.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationLiveRepository.kt:265 — app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationLiveRepository.kt changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is EpgStationLiveRepository.getChannelLogoUrl at line 265), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・EPGStationの手動予約を更新すると保存先・エンコード設定が消える不具合を修正(GET /api/reserves/{id}で読み直して送り返すread-modify-write方式に変更。サーバーに現存しないエンコードモードの枠は外して送る) ・EPGStationの自動予約条件の更新で検索対象期間(searchPeriods)が消える不具合と、放送波フラグ(GR/BS/NW*等)指定のルールが編集のたびに個別チャンネル指定へ展開される不具合を修正 ・重複回避を使わない自動予約条件がKomorebiから追加・更新できない(HTTP 500)不具合を修正(avoidDuplicate=false時にperiodToAvoidDuplicateを送らない) ・自動予約条件の有効/無効の切り替えがEPGStationへ反映されない不具合を修正 ・時刻指定ルールの更新でキーワードが空になり拒否される問題を修正 ・新形式(streamProfiles)で配信設定しているEPGStationで画質一覧がサーバー設定から構築されない不具合を修正(streamProfilesを優先し、無い旧サーバーのみstreamConfigを使用) ・ライブ再生を開くたびに保存済みのライブ画質が別ソース向けの画質一覧で照合され、先頭の画質で上書き保存される競合を修正(画質取得ジョブの取り消しと、現在ソース向けの一覧のみで照合) ・EPGStationのログイン認証(auth.enabled: true)で書き込み系APIやストリームkeepが401になった場合に原因を示すメッセージ・ログを追加し、READMEに既知の制限として追記”; “fix: ・リリース前レビューで検出したリグレッション・既存バグを修正(EsRuleEncodeOption型不一致、EPGStationライブ画質のLIVE_QUALITY誤上書き、streamId=0誤判定、エラーメッセージ英語化、他)”; “fix: ・EPGStationライブ配信の画質リスト未構築・HLS強制停止・番組表過剰取得・ロゴ再試行を修正(EP-1,2,6,10a-c)”; “fix: EPGStationで実況の勢いが表示されない問題を修正”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationLiveRepository.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationReserveRepository.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationReserveRepository.kt:261 — app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationReserveRepository.kt changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is EpgStationReserveRepository.mapRuleBody at line 261), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・EPGStationの手動予約を更新すると保存先・エンコード設定が消える不具合を修正(GET /api/reserves/{id}で読み直して送り返すread-modify-write方式に変更。サーバーに現存しないエンコードモードの枠は外して送る) ・EPGStationの自動予約条件の更新で検索対象期間(searchPeriods)が消える不具合と、放送波フラグ(GR/BS/NW*等)指定のルールが編集のたびに個別チャンネル指定へ展開される不具合を修正 ・重複回避を使わない自動予約条件がKomorebiから追加・更新できない(HTTP 500)不具合を修正(avoidDuplicate=false時にperiodToAvoidDuplicateを送らない) ・自動予約条件の有効/無効の切り替えがEPGStationへ反映されない不具合を修正 ・時刻指定ルールの更新でキーワードが空になり拒否される問題を修正 ・新形式(streamProfiles)で配信設定しているEPGStationで画質一覧がサーバー設定から構築されない不具合を修正(streamProfilesを優先し、無い旧サーバーのみstreamConfigを使用) ・ライブ再生を開くたびに保存済みのライブ画質が別ソース向けの画質一覧で照合され、先頭の画質で上書き保存される競合を修正(画質取得ジョブの取り消しと、現在ソース向けの一覧のみで照合) ・EPGStationのログイン認証(auth.enabled: true)で書き込み系APIやストリームkeepが401になった場合に原因を示すメッセージ・ログを追加し、READMEに既知の制限として追記”; “fix: ・リリース前レビューで検出したリグレッション・既存バグを修正(EsRuleEncodeOption型不一致、EPGStationライブ画質のLIVE_QUALITY誤上書き、streamId=0誤判定、エラーメッセージ英語化、他)”; “fix: ・EPGStation録画のMIME誤判定・画質mode衝突・自動予約ルールのフィールド消失を修正(EP-3,4,5)”; “fix: EPGStationの実況再生と録画予約を修正”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationReserveRepository.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:550 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is RecordViewModel.rebuildEpgSeries at line 550), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix ・シーンサーチ/L字クロップオーバーレイの呼び出しが過去のリファクタリングで消失していた回帰を修正(録画再生画面に復元。L字クロップは戻るキーでプレイヤーごと終了してしまう実害があったため、キー入力のオーバーレイ判定にも組み込み) ・録画ファイル消失時のエラー検出(HTTP 404判定)をEDCB直接アクセス/KonomiTV original経路だけでなく、EDCB API経由等のHTTP経路にも拡張(Issue #89対応) ・字幕表示がExoPlayer内部の不連続イベントのたびに無条件でちらつく不具合を修正(DISCONTINUITY_REASON_INTERNAL以外でのみクリアするよう変更) ・モダンUIの設定パネルからL字クロップを有効化した際、自分自身(isModernSettingsOpen)ではなく別UIのフラグを閉じていたため設定パネルが閉じずにL字クロップオーバーレイと二重表示・フォーカス競合していた不具合を修正 ・不要になったデッドコードを削除(isLiveStream、RecordViewModelの重複したストリーム維持処理、未使用Composable(UpdateDialog/VideoToast/SettingToggleItem/DualDisplayMock)、未使用FocusRequester等)”; “fix: ・アプリ全体の動作緩慢化を調査・改善(局ロゴキャッシュ、EPG描画、季節演出、起動時のログ/WorkManager/Cloudflareインターセプタ最適化) ・PiP復帰時にタブ→再生中ボタンへフォーカスが通過してしまう不具合を修正 ・PiP中に設定画面を開くとフォーカスが消失し戻るキー連打でアプリ終了ダイアログが出る不具合を修正(PR#103由来) ・EDCBの録画再生方式(直接アクセス/API経由)設定がライブ視聴の画質取得にも誤って連動していた不具合を修正 ・EDCBの画質取得をキャッシュ即時表示+バックグラウンド更新方式に変更し、設定画面の再生設定タブを開くたびに画質一覧を再取得するよう修正 ・未対応のMirakurun単体バックエンド選択肢を選べないよう非表示化 ・タブ切り替え時の固定delay(500-800ms)を実データの準備完了検知に置き換え、初回起動時にホームのデータが空の場合の3秒フォールバックへ丸ごと落ちてしまう不具合を修正 ・コールドブート計測用の軽量診断ログ(ColdStartDiag)を追加”; “fix: PRレビュー指摘の修正 ・formatBaseUrl: スキーム付きホストでもポート欄の設定を反映するよう修正 ・VideoPlayerState: KEYCODE_MEDIA_PLAY / PAUSE をトグルではなく個別動作に分離 ・RecordSyncEngine: 低RAM端末でも明示的な完全同期時は孤児レコードを削除 ・KonomiRepository / EdcbRecordRepository: getRecordedPrograms の limit を反映 ・PlayerControls: 長押し中のチャプタースキップを一定間隔で連続発火 ・EpgStationSeriesDictionary: 一時的な通信エラーによる無効化を10分で自動復帰 ・RecordViewModel: buildEpgSeriesAndChannelMaps に try/finally を追加”; “Fix: EPGStationのライブ再生とシリーズソート”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/data/repository/SettingsRepository.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/SettingsRepository.kt:244 — app/src/main/java/com/beeregg2001/komorebi/data/repository/SettingsRepository.kt changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is SettingsRepository.getStreamSourceUrl at line 244), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・EDCB EPG時刻フィルタのJST/UTC変換ずれ・ライブ再生エラー握り潰し・URL組み立て・デッドコード・チャプター誤取得を修正”; “fix: ・KonomiTVのOriginal画質(ライブ)がバージョン非対応サーバーで再生失敗する不具合に対処”; “fix: ・アプリ全体の動作緩慢化を調査・改善(局ロゴキャッシュ、EPG描画、季節演出、起動時のログ/WorkManager/Cloudflareインターセプタ最適化) ・PiP復帰時にタブ→再生中ボタンへフォーカスが通過してしまう不具合を修正 ・PiP中に設定画面を開くとフォーカスが消失し戻るキー連打でアプリ終了ダイアログが出る不具合を修正(PR#103由来) ・EDCBの録画再生方式(直接アクセス/API経由)設定がライブ視聴の画質取得にも誤って連動していた不具合を修正 ・EDCBの画質取得をキャッシュ即時表示+バックグラウンド更新方式に変更し、設定画面の再生設定タブを開くたびに画質一覧を再取得するよう修正 ・未対応のMirakurun単体バックエンド選択肢を選べないよう非表示化 ・タブ切り替え時の固定delay(500-800ms)を実データの準備完了検知に置き換え、初回起動時にホームのデータが空の場合の3秒フォールバックへ丸ごと落ちてしまう不具合を修正 ・コールドブート計測用の軽量診断ログ(ColdStartDiag)を追加”; “Fix: EPGStationのHTTP/HTTPS接続先を正しく処理”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/SettingsRepository.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/di/NetworkModule.kt app/src/main/java/com/beeregg2001/komorebi/di/NetworkModule.kt:52 — app/src/main/java/com/beeregg2001/komorebi/di/NetworkModule.kt changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is NetworkModule.provideOkHttpClient at line 52), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・最終検証で検出した軽微な退行を修正(basePath境界チェック、SSE由来HTTPエラーの表示、LiveJikkyoManagerのURL組み立て)”; “fix: ・リリース前レビューで検出したリグレッション・既存バグを修正(EsRuleEncodeOption型不一致、EPGStationライブ画質のLIVE_QUALITY誤上書き、streamId=0誤判定、エラーメッセージ英語化、他)”; “fix: ・リバースプロキシのサブディレクトリ運用でパスが失われる不具合、設定画面のEPGStationデフォルト画質、到達不能な作品辞書デッドコードを修正(EP-7,8,9)”; “fix: ・アプリ全体の動作緩慢化を調査・改善(局ロゴキャッシュ、EPG描画、季節演出、起動時のログ/WorkManager/Cloudflareインターセプタ最適化) ・PiP復帰時にタブ→再生中ボタンへフォーカスが通過してしまう不具合を修正 ・PiP中に設定画面を開くとフォーカスが消失し戻るキー連打でアプリ終了ダイアログが出る不具合を修正(PR#103由来) ・EDCBの録画再生方式(直接アクセス/API経由)設定がライブ視聴の画質取得にも誤って連動していた不具合を修正 ・EDCBの画質取得をキャッシュ即時表示+バックグラウンド更新方式に変更し、設定画面の再生設定タブを開くたびに画質一覧を再取得するよう修正 ・未対応のMirakurun単体バックエンド選択肢を選べないよう非表示化 ・タブ切り替え時の固定delay(500-800ms)を実データの準備完了検知に置き換え、初回起動時にホームのデータが空の場合の3秒フォールバックへ丸ごと落ちてしまう不具合を修正 ・コールドブート計測用の軽量診断ログ(ColdStartDiag)を追加”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/di/NetworkModule.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationDataMapper.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationDataMapper.kt:107 — app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationDataMapper.kt changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is EpgStationDataMapper.mapDetail at line 107), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・EPGStationの手動予約を更新すると保存先・エンコード設定が消える不具合を修正(GET /api/reserves/{id}で読み直して送り返すread-modify-write方式に変更。サーバーに現存しないエンコードモードの枠は外して送る) ・EPGStationの自動予約条件の更新で検索対象期間(searchPeriods)が消える不具合と、放送波フラグ(GR/BS/NW*等)指定のルールが編集のたびに個別チャンネル指定へ展開される不具合を修正 ・重複回避を使わない自動予約条件がKomorebiから追加・更新できない(HTTP 500)不具合を修正(avoidDuplicate=false時にperiodToAvoidDuplicateを送らない) ・自動予約条件の有効/無効の切り替えがEPGStationへ反映されない不具合を修正 ・時刻指定ルールの更新でキーワードが空になり拒否される問題を修正 ・新形式(streamProfiles)で配信設定しているEPGStationで画質一覧がサーバー設定から構築されない不具合を修正(streamProfilesを優先し、無い旧サーバーのみstreamConfigを使用) ・ライブ再生を開くたびに保存済みのライブ画質が別ソース向けの画質一覧で照合され、先頭の画質で上書き保存される競合を修正(画質取得ジョブの取り消しと、現在ソース向けの一覧のみで照合) ・EPGStationのログイン認証(auth.enabled: true)で書き込み系APIやストリームkeepが401になった場合に原因を示すメッセージ・ログを追加し、READMEに既知の制限として追記”; “fix: EPGStationで実況の勢いが表示されない問題を修正”; “fix: ・EPGStationの他地域地上波(NW1〜NW40)を地上波として扱うよう修正 ・録画チャプターからCM区間のみを抽出するよう修正 (本編までCM扱いでスキップされる問題) ・番組詳細から録画時のドロップ統計を除去し、見出し付き詳細を正しく解釈するよう修正 ・無変換再生URLをHLSと誤判定して再生できない問題を修正 ・Cloudflare AccessのトークンをEPGStation宛にも付与するよう修正 ・録画一覧のサムネイルURLをKonomiTVのホストで組み立てていた問題を修正 ・チャンネル番号とサブチャンネル判定を事前計算し、録画同期の計算量を削減”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationDataMapper.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationChannelCache.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationChannelCache.kt:47 — app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationChannelCache.kt changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is EpgStationChannelCache.getChannels at line 47), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・EPGStationライブ配信の画質リスト未構築・HLS強制停止・番組表過剰取得・ロゴ再試行を修正(EP-1,2,6,10a-c)”; “fix: ・レビュー再点検で見つかった既存不具合5件を修正”; “fix: ・EPGStationの他地域地上波(NW1〜NW40)を地上波として扱うよう修正 ・録画チャプターからCM区間のみを抽出するよう修正 (本編までCM扱いでスキップされる問題) ・番組詳細から録画時のドロップ統計を除去し、見出し付き詳細を正しく解釈するよう修正 ・無変換再生URLをHLSと誤判定して再生できない問題を修正 ・Cloudflare AccessのトークンをEPGStation宛にも付与するよう修正 ・録画一覧のサムネイルURLをKonomiTVのホストで組み立てていた問題を修正 ・チャンネル番号とサブチャンネル判定を事前計算し、録画同期の計算量を削減”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationChannelCache.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.
  • Repeated repair: app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherState.kt app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherState.kt:126 — app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherState.kt changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is HomeLauncherState.onTabSelected at line 126), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ・アプリ全体の動作緩慢化を調査・改善(局ロゴキャッシュ、EPG描画、季節演出、起動時のログ/WorkManager/Cloudflareインターセプタ最適化) ・PiP復帰時にタブ→再生中ボタンへフォーカスが通過してしまう不具合を修正 ・PiP中に設定画面を開くとフォーカスが消失し戻るキー連打でアプリ終了ダイアログが出る不具合を修正(PR#103由来) ・EDCBの録画再生方式(直接アクセス/API経由)設定がライブ視聴の画質取得にも誤って連動していた不具合を修正 ・EDCBの画質取得をキャッシュ即時表示+バックグラウンド更新方式に変更し、設定画面の再生設定タブを開くたびに画質一覧を再取得するよう修正 ・未対応のMirakurun単体バックエンド選択肢を選べないよう非表示化 ・タブ切り替え時の固定delay(500-800ms)を実データの準備完了検知に置き換え、初回起動時にホームのデータが空の場合の3秒フォールバックへ丸ごと落ちてしまう不具合を修正 ・コールドブート計測用の軽量診断ログ(ColdStartDiag)を追加”; “fix: ・KonomiTV original画質(生MPEG-TS直接再生)対応を追加(ライブ/録画両対応、画質ピッカー・URL組み立て・EDCB直接再生方式のDataSourceルーティング) ・録画/EDCB直接/Original再生で字幕が表示されない不具合を修正(DirectSubtitlePayloadReaderFactory方式へ統一。id3conv.cppが生成するID3 PESのdata_alignment_indicatorビット不備も修正) ・Original再生後に次の番組の再生が開始しない不具合を修正(LaunchedEffectのキー漏れ、program/isEdcbDirect/cfAccessHeadersのremember{}内クロージャ固定、filterStateRefの番組またぎ残留を修正) ・録画リストで再生後に戻るとサブメニューが開いたまま残りフォーカスが効かなくなる不具合を修正 ・ホーム画面のタブ移動が緩慢な問題を修正(refreshHomeDataの多重起動防止・間引き、不要なFlow購読の削除、フルスクリーン再生中のポーリング停止) ・二画面ライブ視聴のフォーカス漏れ・クロップ崩れを修正 ・ラボ設定の二画面制限(labAllowMirakurunDual)をoriginal画質にも一貫適用”; “fix: ・タブ間の移動が効かなくなる問題を修正 ・起動時にフォーカス要求が二重に発行され、ユーザー操作と競合していた問題を修正 ・タブ操作時に保留中のフォーカス要求を取り消すよう変更 ・フォーカス要求の再試行中も、要求が有効かどうかを確認するよう変更 ・タブの左右移動を明示的に指定し、意図しない位置へ移らないよう修正 ・タブ上での十字キー操作を確実に処理するよう追加”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 22:40:47 +09:00' --until='2026-11-07 22:40:47 +09:00' --full-history --no-merges -- app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherState.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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×11
  • Duplicated block (7 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:511 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:511-517 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:532-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:511` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot 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/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:552 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:552-558 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:572-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.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. The matched lines also transfer control out of the body holding them, which cannot 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/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:375 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:375-381 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:468-474 — 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/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:375` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:584 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:584-590 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:1041-1047 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:584` 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/com/beeregg2001/komorebi/ui/theme/Theme.kt:264 — app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:264-270 | app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:297-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/theme/Theme.kt:264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) REDACTED:246 — REDACTED:246-252 | REDACTED:509-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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:246` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbNwPlayDataSource.kt:120 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbNwPlayDataSource.kt:120-126 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbNwPlayDataSource.kt:170-176 — both copies are in the same file, so extract the 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) REDACTED:234 — REDACTED:234-240 | REDACTED:495-501 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:502` calls `isNotEmpty` and `REDACTED:241` 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/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:146 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:146-152 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:447-453 — 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:503 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:503-509 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:781-788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:781` 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/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:578 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:578-584 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:622-628 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:578` 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 (13 lines × 2) · ×9
  • Duplicated block (13 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:105 — app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:105-117 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:363-375 — 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/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:105` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:135 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:135-147 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:217-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:135` 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/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:236 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:236-248 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:322-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:236` 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:156 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:156-168 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:119-131 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:183 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:183-195 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:121-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. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.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.
  • Duplicated block (13 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:892 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:892-904 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:544-556 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:892` 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/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:99 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:99-111 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:81-93 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:216 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:216-228 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:183-195 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:185 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:185-198 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt:235-247 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:185` 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) · ×9
  • Duplicated block (10 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:596 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:596-605 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:239-248 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:596` 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/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:250 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:250-259 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:281-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:250` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:222 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:222-231 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:541-550 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:222` 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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:880 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:880-889 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:532-541 — 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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:880` 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/com/beeregg2001/komorebi/ui/video/components/RecordDetailPanel.kt:68 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDetailPanel.kt:68-77 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt:94-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:265 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:265-274 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:284-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:747 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:747-756 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1267-1276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:747` 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/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:129 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:129-138 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:519-528 — both copies are in the same file, so extract the 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 (10 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:157 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:157-166 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:174-183 — both copies are in the same file, so extract the 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 · ClassTooLong · ×7
  • ClassTooLong: LivePlayerViewModel app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:77 — ClassTooLong — 941 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 541 over it, 2.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SettingsViewModel app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:67 — ClassTooLong — 638 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 238 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.
  • ClassTooLong: EdcbFileData app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:8 — ClassTooLong — 485 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 85 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EpgDrawer app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:41 — ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 66 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RecordSyncEngine app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt:65 — ClassTooLong — 447 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 47 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SmbViewModel app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:36 — ClassTooLong — 424 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 24 over it, 1.06× 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: RecordViewModel app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:83 — ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 16 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×7
  • Duplicated block (8 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:383 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:383-390 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:475-482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:383` 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/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:138 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:138-145 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:345-352 — both copies are in the same file, so extract the 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/com/beeregg2001/komorebi/ui/home/LiveContents.kt:338 — app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:338-345 | app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:580-587 — both copies are in the same file, so extract the 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/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:548 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:548-555 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:644-651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:548` 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/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:208 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:208-215 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:768-775 — 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 (8 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:114 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:114-121 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:85-92 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:93` calls `mutableStateOf` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:123` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:711 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:711-718 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:729-736 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:711` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D35 · Change Coupling · Change coupling · ×6
  • Change coupling: SettingScreen.kt ↔ SettingState.kt app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:1 — `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingState.kt` change together 100% of the time (14 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `09a654b9` fix: ・Gemini APIキーの有効性を保存時にcountTokens()で実際に検証するよう変更 ・通信エラー時は無効と誤判定せず…; `07280d0c` add feature ・Cloudflare Zero Trust (Cloudflare Access) サービストークン認証に対応 …; `624b5a9a` add feature ・番組表の表示時間(縦軸)を設定画面より変更可能に — run `git show` on any of them.
  • Change coupling: VideoPlayerManager.kt ↔ VideoPlayerScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt:1 — `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt` change together 83% of the time (10 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `59fc1781` fix ・シーンサーチ/L字クロップオーバーレイの呼び出しが過去のリファクタリングで消失していた回帰を修正(録画再生画面に復元。L字クロッ…; `f11518d2` fix: ・EDCB録画TS直接再生の音声トラック切替時の音ズレを修正(CServiceFilter状態の引き継ぎ) ・シーク機構をExo…; `91bfb37d` fix: improve ARIB caption synchronization and state resets — run `git show` on any of them.
  • Change coupling: SettingComponents.kt ↔ SettingContents.kt app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1 — `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `09a654b9` fix: ・Gemini APIキーの有効性を保存時にcountTokens()で実際に検証するよう変更 ・通信エラー時は無効と誤判定せず…; `12583f4c` fix ・局ロゴ抜け & CSチューニング失敗に暫定対応 ・長時間視聴での音ズレに対して、ExoPlayerでバッファ切れの際に若干早送り…; `0a4d81eb` fix ・新規テーマ追加 ・録画再生時にコメントがカクツク問題に暫定対応 — run `git show` on any of them.
  • Change coupling: RecordedProgramDao.kt ↔ RecordSyncEngine.kt app/src/main/java/com/beeregg2001/komorebi/data/local/dao/RecordedProgramDao.kt:1 — `app/src/main/java/com/beeregg2001/komorebi/data/local/dao/RecordedProgramDao.kt` and `app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `567eec72` fix ・AI機能を修正 ・録画リストの録画中が戻らない問題に暫定対応; `4c3cd2d1` bug fix ・DB構築周りを再度修正; `83412e85` bug fix ・DB構築周りの大幅改良 — run `git show` on any of them.
  • Change coupling: KonomiRepository.kt ↔ ReserveViewModel.kt app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:1 — `app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt` and `app/src/main/java/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f4be60dd` add feature ・キーワード自動予約(EPG予約)対応; `83a85678` bug fix ・実況コメントが表示されない現象を改善(暫定対応); `af8e8af2` bug fix ・動作速度改善(効果があるかは不明) ・EPGデータをキャッシュすることで、動作速度を改善 — run `git show` on any of them.
  • Change coupling: HomeContents.kt ↔ SettingScreen.kt app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.kt:1 — `app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt` change together 52% of the time (11 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `098b7b4f` bug fix ・録画リストリファクタリング; `c1c368a1` add feature ・リスト型録画リスト機能実装完了 ・Baseline Profile導入; `e529771d` add feature ・Mirakurunソースで5.1chのパススルー、ダウンミックスに対応 ・低スペックな端末での5.1chダウンミ… — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×6
  • Duplicated block (15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:152 — app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:152-166 | app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt:166-180 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:152` 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/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:167` calls `Spacer`, `height` and `app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt:181` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:381 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:381-395 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:288-302 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:381` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:610 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:610-624 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:518-532 — 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:610` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) REDACTED:145 — REDACTED:145-159 | REDACTED:180-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:263 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:263-277 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:286-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:263` 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 (15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:233 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:233-247 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:232-246 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:233` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×6
  • Duplicated block (6 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/mapper/KonomiDataMapper.kt:18 — app/src/main/java/com/beeregg2001/komorebi/data/mapper/KonomiDataMapper.kt:18-23 | app/src/main/java/com/beeregg2001/komorebi/data/mapper/KonomiDataMapper.kt:90-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:716 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:716-721 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveJikkyoManager.kt:131-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveJikkyoManager.kt:130` calls `optString` and `app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:714` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:515 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:515-520 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:573-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:515` 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/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:97 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:97-102 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGenrePane.kt:134-139 — 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/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:97` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:95 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:95-100 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordNavigationPane.kt:111-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:94` calls `scale` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordNavigationPane.kt:110` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/jikkyo/jikkyoClient.kt:105 — app/src/main/java/com/beeregg2001/komorebi/data/jikkyo/jikkyoClient.kt:105-110 | app/src/main/java/com/beeregg2001/komorebi/data/jikkyo/jikkyoClient.kt:150-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/data/jikkyo/jikkyoClient.kt:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:610 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:610-625 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.kt:589-604 — 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/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:610` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:54 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:54-69 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:310-325 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:54` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) REDACTED:278 — REDACTED:278-293 | REDACTED:538-553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:278` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:130 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:130-145 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:317-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:130` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:524 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:524-539 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:587-602 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:524` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×5
  • Duplicated block (5 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:417 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:417-421 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:448-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot 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/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:479 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:479-483 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.kt:395-399 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1178 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1178-1182 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1263-1267 — both copies are in the same file, so extract the 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/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:116 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:116-120 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:590-594 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:116` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/com/beeregg2001/komorebi/util/AudioRecorderHelper.kt:150 — app/src/main/java/com/beeregg2001/komorebi/util/AudioRecorderHelper.kt:150-154 | app/src/main/java/com/beeregg2001/komorebi/util/AudioRecorderHelper.kt:171-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AX2 · Stateful singletons · Stateful singleton · ×4
  • Stateful singleton: JikkyoChannelResolver app/src/main/java/com/beeregg2001/komorebi/data/jikkyo/JikkyoChannelResolver.kt:25 — `JikkyoChannelResolver` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (jikkyoChannelsCache; e.g. `jikkyoChannelsCache` in `getJikkyoChannels` at line 64).
  • Stateful singleton: EdcbLiveRepository app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:28 — `EdcbLiveRepository` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (failedLogoIds; e.g. `failedLogoIds` in `getChannelLogoUrl` at line 299).
  • Stateful singleton: EpgStationRecordRepository app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:28 — `EpgStationRecordRepository` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (seriesFeatureDisabled, seriesCache, seriesCacheAt, streamId, qualities; e.g. `seriesFeatureDisabled` in `getSeriesList` at line 103).
  • Stateful singleton: LiveJikkyoManager app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveJikkyoManager.kt:35 — `LiveJikkyoManager` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (jikkyoClient, processedCommentIds; e.g. `jikkyoClient` in `startJikkyo` at line 51).
D3 · God Classes · TooManyMethods · ×4
  • TooManyMethods: EdcbByteUtils app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:10 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RecordViewModel app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:83 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SettingsViewModel app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:67 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LivePlayerViewModel app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:77 — 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 · 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/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:51 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:51-145 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:155-244 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:405-487 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:499-567 — 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/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:257 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:257-395 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:64-218 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:233-372 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:383-479 — 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:696 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:696-825 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:838-917 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:977-1068 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1205-1384 — 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/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:188 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:188-206 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:495-517 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:338-356 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:286-304 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×4
  • Duplicated block (19 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:107 — app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:107-125 | app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:172-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:65 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:65-83 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1168-1186 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:65` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:727 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:727-745 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:791-809 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:727` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1201 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1201-1219 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1281-1299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1201` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:619 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:619-632 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveJikkyoManager.kt:148-161 — 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 (14 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:296 — app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:296-309 | app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:341-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:296` it does not close everything it opens, so those exact lines 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:134 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:134-147 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:104-117 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:131` calls `mutableStateOf` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:101` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:106 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:106-119 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:291-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:106` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:326 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:326-341 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:308-319 — 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/com/beeregg2001/komorebi/ui/home/components/HomeCards.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. 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/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:162 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:162-173 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:176-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:148 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:148-159 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:186-197 — 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/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:148` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:747 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:747-758 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:863-874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:747` 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–9 lines × 2) · ×4
  • Duplicated block (8–9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:466 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:466-474 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:515-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:466` 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–9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:161 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:161-168 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:370-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/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:340 — app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:340-347 | app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:360-368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:340` it does not close everything it opens, so those 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–9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:475 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:475-482 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:496-504 — 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/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:496` 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 · Edited copy of a member (10 corresponding lines) · ×3
  • Edited copy of a member (10 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:1068 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:1068-1077 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:446-456 — 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/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:154 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:154-163 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:455-464 — 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/com/beeregg2001/komorebi/data/api/edcb/EdcbTcpClient.kt:87 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbTcpClient.kt:87-103 | app/src/main/java/com/beeregg2001/komorebi/util/TsReadExDataSource.kt:293-302 — 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 (27–29 lines × 2) · ×3
  • Duplicated block (27–29 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:171 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:171-199 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:379-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:171` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27–29 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:845 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:845-873 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:983-1009 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:845` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27–29 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:353 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:353-381 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:386-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/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:353` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×3
  • Duplicated block (27 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:261 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:261-287 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:336-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:261` 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 (27 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:105 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:105-131 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:99-125 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:105` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:290 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:290-316 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:896-922 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:290` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:121 — app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:121-144 | app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt:137-160 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:523 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:523-546 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:619-642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:523` 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 (24 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:293 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:293-316 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:191-214 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×3
  • Duplicated block (23 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:65 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:65-87 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:167-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:126 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:126-148 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:428-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:126` 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 (23 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:865 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:865-887 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1002-1024 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.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.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:359 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:359-380 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:403-424 — both copies are in the same file, so extract the 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/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:358` calls `readVector` and `app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:401` 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 (22 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:103 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:103-124 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:203-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:197` calls `newBuilder`, `connectTimeout`, `readTimeout` and `app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:98` 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 (22 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:470 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:470-491 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:348-369 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:93 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:93-110 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:265-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:93` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:217 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:217-234 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:287-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:290 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:290-307 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.kt:153-170 — 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/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:290` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×3
  • Duplicated block (17 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:353 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:353-369 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:445-461 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListOverlay.kt:121 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListOverlay.kt:121-137 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListOverlay.kt:264-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/video/components/RecordListOverlay.kt:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:211 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:211-227 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt:260-276 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:211` 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 (13–15 lines × 2) · ×3
  • Duplicated block (13–15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/di/NetworkModule.kt:127 — app/src/main/java/com/beeregg2001/komorebi/di/NetworkModule.kt:127-141 | app/src/main/java/com/beeregg2001/komorebi/di/NetworkModule.kt:210-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:519 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:519-531 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:342-356 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:519` 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–15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:201 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:201-213 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:346-360 — 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/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.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.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×3
  • Duplicated block (11–12 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:201 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:201-211 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:222-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:222` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:198` calls `safeGet`, `safeString` and `app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:220` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11–12 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:57 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:57-68 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:58-68 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:57` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:105 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:105-116 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:95-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:105` it does not close everything it opens, so those 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 × 3) · ×3
  • Duplicated block (6–7 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:684 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:684-689 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:705-710 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:618-624 — 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/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:618` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6–7 lines × 3) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:748 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:748-753 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:771-777 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:871-877 — 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/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:748` it does not close everything it opens, so those 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 × 3) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:325 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:325-330 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:197-203 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:671-677 — 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/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:197` it does not close everything it opens, so those 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×3
  • Low cohesion: HomeViewModel (LCOM4 6) app/src/main/java/com/beeregg2001/komorebi/viewmodel/HomeViewModel.kt:45 — HomeViewModel's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RecordViewModel (LCOM4 5) app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:83 — RecordViewModel's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SmbViewModel (LCOM4 4) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:36 — SmbViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:476 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:476-490 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:493-506 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:510-527 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:531-548 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:551-568 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:571-588 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:799 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:799-904 | app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:922-1013 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:96-435 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:451-556 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:800-886 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:919-1006 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:416 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:416-424 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:494-502 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:515-523 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:538-546 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:621-629 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:98 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:98-180 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:195-271 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:286-371 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:388-468 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:487-573 — 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 (14 corresponding lines) · ×2
  • Edited copy of a member (14 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:66 — app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:66-88 | app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:90-103 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:249 — app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:249-262 | app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:278-291 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×2
  • Duplicated block (45 lines × 2) REDACTED:309 — REDACTED:309-353 | REDACTED:619-663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:309` 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 (45 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:477 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:477-521 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:542-586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:477` 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) · ×2
  • Duplicated block (28 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:69 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:69-96 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:198-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:226` calls `height` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:97` 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 (28 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:820 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:820-847 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:905-932 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:820` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×2
  • Duplicated block (25 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:926 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:926-950 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1077-1101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:926` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:641 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:641-665 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:568-592 — 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:641` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:348 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:348-368 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:372-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:348` 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/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:344` calls `onIsPlayingChanged` and `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:371` 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 (20–21 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:331 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:331-350 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:209-229 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:331` 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–20 lines × 2) · ×2
  • Duplicated block (19–20 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:88 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:88-107 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:191-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:88` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19–20 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:677 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:677-695 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:697-716 — 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:697` 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 (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:668 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:668-687 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:306-325 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:123 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:123-142 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:127-146 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:123` 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 (17 lines × 3) · ×2
  • Duplicated block (17 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1059 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1059-1075 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:701-717 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:763-779 — 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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1059` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:700` calls `padding` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1058` 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 (17 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:455 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:455-471 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:166-182 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:165-181 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:455` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×2
  • Duplicated block (15–16 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:417 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:417-431 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:505-520 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:655-670 — 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:417` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15–16 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:715 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:715-730 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:991-1006 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1237-1251 — 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:715` it does not close everything it opens, so those 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:713` calls `rememberQrBitmap` and `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:989` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:35 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:35-49 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:96-110 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:144-158 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:291-305 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:59 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:59-73 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:168-182 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:315-329 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1162-1176 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:59` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×2
  • Duplicated block (14 lines × 3) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:74 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:74-87 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:117-130 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:217-230 — 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/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:461 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:461-474 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:527-540 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:592-605 — 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/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:461` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×2
  • Duplicated block (12–13 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:723 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:723-735 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:862-874 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:999-1011 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1245-1256 — 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:723` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:861` calls `focusRequester` and `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:722` 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–13 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:826 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:826-838 | app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:936-948 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:478-490 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:943-954 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:826` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×2
  • Duplicated block (8–10 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:1061 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:1061-1068 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:812-821 — 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:1061` 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–10 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:251 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:251-260 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:308-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.
D1 · Cyclomatic Complexity · LivePlayerScreenKt.LivePlayerScreen (cyclomatic 147) · ×1
  • LivePlayerScreenKt.LivePlayerScreen (cyclomatic 147) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:63 — LivePlayerScreenKt.LivePlayerScreen has cyclomatic complexity 147 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainRootScreenKt.MainRootScreen (cyclomatic 138) · ×1
  • MainRootScreenKt.MainRootScreen (cyclomatic 138) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.kt:47 — MainRootScreenKt.MainRootScreen has cyclomatic complexity 138 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoPlayerScreenKt.VideoPlayerScreen (cyclomatic 130) · ×1
  • VideoPlayerScreenKt.VideoPlayerScreen (cyclomatic 130) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:120 — VideoPlayerScreenKt.VideoPlayerScreen has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SmbVlcPlayerScreenKt.SmbVlcPlayerScreen (cyclomatic 121) · ×1
  • SmbVlcPlayerScreenKt.SmbVlcPlayerScreen (cyclomatic 121) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:65 — SmbVlcPlayerScreenKt.SmbVlcPlayerScreen has cyclomatic complexity 121 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeLauncherScreenKt.HomeLauncherScreen (cyclomatic 120) · ×1
  • HomeLauncherScreenKt.HomeLauncherScreen (cyclomatic 120) app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt:131 — HomeLauncherScreenKt.HomeLauncherScreen has cyclomatic complexity 120 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingScreenKt.SettingsScreen (cyclomatic 106) · ×1
  • SettingScreenKt.SettingsScreen (cyclomatic 106) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:53 — SettingScreenKt.SettingsScreen has cyclomatic complexity 106 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoPlayerState.handleKeyEvent (cyclomatic 94) · ×1
  • VideoPlayerState.handleKeyEvent (cyclomatic 94) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerState.kt:74 — VideoPlayerState.handleKeyEvent has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EpgDrawer.draw (cyclomatic 90) · ×1
  • EpgDrawer.draw (cyclomatic 90) app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:94 — EpgDrawer.draw has cyclomatic complexity 90 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecordListScreenKt.RecordListScreen (cyclomatic 83) · ×1
  • RecordListScreenKt.RecordListScreen (cyclomatic 83) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:89 — RecordListScreenKt.RecordListScreen has cyclomatic complexity 83 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModernEpgCanvasEngine_NoAnimeKt.ModernEpgCanvasEngine_NoAnime (cyclomatic 74) · ×1
  • ModernEpgCanvasEngine_NoAnimeKt.ModernEpgCanvasEngine_NoAnime (cyclomatic 74) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine_NoAnime.kt:48 — ModernEpgCanvasEngine_NoAnimeKt.ModernEpgCanvasEngine_NoAnime has cyclomatic complexity 74 (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 · ConditionEditDialogKt.ConditionEditDialog (cyclomatic 68) · ×1
  • ConditionEditDialogKt.ConditionEditDialog (cyclomatic 68) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:53 — ConditionEditDialogKt.ConditionEditDialog has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReserveListScreenKt.ReserveListScreen (cyclomatic 67) · ×1
  • ReserveListScreenKt.ReserveListScreen (cyclomatic 67) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:93 — ReserveListScreenKt.ReserveListScreen has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LivePlayerState.handleKeyEvent (cyclomatic 66) · ×1
  • LivePlayerState.handleKeyEvent (cyclomatic 66) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerState.kt:118 — LivePlayerState.handleKeyEvent has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LivePlayerSubMenuKt.LiveTopSubMenuUI (cyclomatic 66) · ×1
  • LivePlayerSubMenuKt.LiveTopSubMenuUI (cyclomatic 66) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:43 — LivePlayerSubMenuKt.LiveTopSubMenuUI 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 · SeasonalDecorKt.SeasonalDecor (cyclomatic 60) · ×1
  • SeasonalDecorKt.SeasonalDecor (cyclomatic 60) app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:33 — SeasonalDecorKt.SeasonalDecor 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 · AiConciergePanelKt.AiConciergePanel (cyclomatic 54) · ×1
  • AiConciergePanelKt.AiConciergePanel (cyclomatic 54) app/src/main/java/com/beeregg2001/komorebi/ui/components/AiConciergePanel.kt:54 — AiConciergePanelKt.AiConciergePanel 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 · MainRootDialogsKt.MainRootDialogs (cyclomatic 53) · ×1
  • MainRootDialogsKt.MainRootDialogs (cyclomatic 53) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootDialogs.kt:51 — MainRootDialogsKt.MainRootDialogs 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 · SettingContentsKt.ConnectionSettingsContent (cyclomatic 53) · ×1
  • SettingContentsKt.ConnectionSettingsContent (cyclomatic 53) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:251 — SettingContentsKt.ConnectionSettingsContent has cyclomatic complexity 53 (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 · ModernEpgCanvasEngineKt.ModernEpgCanvasEngine_Smooth (cyclomatic 51) · ×1
  • ModernEpgCanvasEngineKt.ModernEpgCanvasEngine_Smooth (cyclomatic 51) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:53 — ModernEpgCanvasEngineKt.ModernEpgCanvasEngine_Smooth 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 · RecordSyncEngine.syncAllRecords (cyclomatic 48) · ×1
  • RecordSyncEngine.syncAllRecords (cyclomatic 48) app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt:195 — RecordSyncEngine.syncAllRecords has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoTabContentKt.VideoTabContent (cyclomatic 46) · ×1
  • VideoTabContentKt.VideoTabContent (cyclomatic 46) app/src/main/java/com/beeregg2001/komorebi/ui/home/VideoTabContent.kt:53 — VideoTabContentKt.VideoTabContent 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 · PlayerControlsKt.PlayerControls (cyclomatic 46) · ×1
  • PlayerControlsKt.PlayerControls (cyclomatic 46) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/PlayerControls.kt:63 — PlayerControlsKt.PlayerControls has cyclomatic complexity 46 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RecordListContentKt.RecordListContent (cyclomatic 44) · ×1
  • RecordListContentKt.RecordListContent (cyclomatic 44) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:63 — RecordListContentKt.RecordListContent has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeContentsKt.HomeContents (cyclomatic 43) · ×1
  • HomeContentsKt.HomeContents (cyclomatic 43) app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.kt:39 — HomeContentsKt.HomeContents has cyclomatic complexity 43 (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 · RecordSeriesContentKt.RecordSeriesContent (cyclomatic 42) · ×1
  • RecordSeriesContentKt.RecordSeriesContent (cyclomatic 42) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:53 — RecordSeriesContentKt.RecordSeriesContent has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ModernEpgCanvasEngineKt.EpgHeaderSection (cyclomatic 41) · ×1
  • ModernEpgCanvasEngineKt.EpgHeaderSection (cyclomatic 41) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:469 — ModernEpgCanvasEngineKt.EpgHeaderSection has cyclomatic complexity 41 (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 · ProgramDetailScreenKt.ProgramDetailScreen (cyclomatic 41) · ×1
  • ProgramDetailScreenKt.ProgramDetailScreen (cyclomatic 41) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:52 — ProgramDetailScreenKt.ProgramDetailScreen has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EpgReserveDialogKt.EpgReserveDialog (cyclomatic 40) · ×1
  • EpgReserveDialogKt.EpgReserveDialog (cyclomatic 40) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:40 — EpgReserveDialogKt.EpgReserveDialog has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SmbLibraryScreenKt.SmbLibraryScreen (cyclomatic 36) · ×1
  • SmbLibraryScreenKt.SmbLibraryScreen (cyclomatic 36) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:67 — SmbLibraryScreenKt.SmbLibraryScreen 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 · EdcbRecordRepository.mapToRecordedProgram (cyclomatic 35) · ×1
  • EdcbRecordRepository.mapToRecordedProgram (cyclomatic 35) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:396 — EdcbRecordRepository.mapToRecordedProgram 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 · EpgNavigationContainerKt.EpgNavigationContainer (cyclomatic 32) · ×1
  • EpgNavigationContainerKt.EpgNavigationContainer (cyclomatic 32) app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:65 — EpgNavigationContainerKt.EpgNavigationContainer 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 · ThemeKt.KomorebiTheme (cyclomatic 32) · ×1
  • ThemeKt.KomorebiTheme (cyclomatic 32) app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:356 — ThemeKt.KomorebiTheme has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EpgJumpMenuKt.EpgJumpMenu (cyclomatic 31) · ×1
  • EpgJumpMenuKt.EpgJumpMenu (cyclomatic 31) app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgJumpMenu.kt:51 — EpgJumpMenuKt.EpgJumpMenu 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 · SmbListContentKt.SmbListContent (cyclomatic 31) · ×1
  • SmbListContentKt.SmbListContent (cyclomatic 31) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:46 — SmbListContentKt.SmbListContent 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 · KeywordConditionCardKt.KeywordConditionCard (cyclomatic 30) · ×1
  • KeywordConditionCardKt.KeywordConditionCard (cyclomatic 30) app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:38 — KeywordConditionCardKt.KeywordConditionCard has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RecordListItemKt.RecordListItem (cyclomatic 30) · ×1
  • RecordListItemKt.RecordListItem (cyclomatic 30) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt:44 — RecordListItemKt.RecordListItem has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VideoPlayerManagerKt.rememberManagedExoPlayer (cyclomatic 30) · ×1
  • VideoPlayerManagerKt.rememberManagedExoPlayer (cyclomatic 30) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt:88 — VideoPlayerManagerKt.rememberManagedExoPlayer has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EdcbDataMapper.encodeReserveRecordSettings (cyclomatic 29) · ×1
  • EdcbDataMapper.encodeReserveRecordSettings (cyclomatic 29) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:163 — EdcbDataMapper.encodeReserveRecordSettings 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 · LiveContentsKt.LiveContent (cyclomatic 29) · ×1
  • LiveContentsKt.LiveContent (cyclomatic 29) app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:68 — LiveContentsKt.LiveContent has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SmbListContentKt.SmbGridContent (cyclomatic 29) · ×1
  • SmbListContentKt.SmbGridContent (cyclomatic 29) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:234 — SmbListContentKt.SmbGridContent 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 · MainRootBackgroundKt.MainRootBackground (cyclomatic 28) · ×1
  • MainRootBackgroundKt.MainRootBackground (cyclomatic 28) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt:37 — MainRootBackgroundKt.MainRootBackground 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 · ReserveCardKt.ReserveCard (cyclomatic 27) · ×1
  • ReserveCardKt.ReserveCard (cyclomatic 27) app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt:42 — ReserveCardKt.ReserveCard 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 · AiConciergeViewModel.handleAiResponse (cyclomatic 27) · ×1
  • AiConciergeViewModel.handleAiResponse (cyclomatic 27) REDACTED:275 — AiConciergeViewModel.handleAiResponse 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 · SettingContentsKt.HomeDisplaySettingsContent (cyclomatic 26) · ×1
  • SettingContentsKt.HomeDisplaySettingsContent (cyclomatic 26) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:820 — SettingContentsKt.HomeDisplaySettingsContent has cyclomatic complexity 26 (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 · RecordSeriesGridContentKt.RecordSeriesGridContent (cyclomatic 26) · ×1
  • RecordSeriesGridContentKt.RecordSeriesGridContent (cyclomatic 26) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:52 — RecordSeriesGridContentKt.RecordSeriesGridContent 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 · VideoPlayerSubMenuKt.VideoTopSubMenuUI (cyclomatic 26) · ×1
  • VideoPlayerSubMenuKt.VideoTopSubMenuUI (cyclomatic 26) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:82 — VideoPlayerSubMenuKt.VideoTopSubMenuUI 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 · ThemeKt.getSeasonalBackgroundBrush (cyclomatic 25) · ×1
  • ThemeKt.getSeasonalBackgroundBrush (cyclomatic 25) app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:231 — ThemeKt.getSeasonalBackgroundBrush has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EdcbApi.getEventInfos (cyclomatic 24) · ×1
  • EdcbApi.getEventInfos (cyclomatic 24) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:183 — EdcbApi.getEventInfos 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 · EpgRepository.searchFuturePrograms (cyclomatic 24) · ×1
  • EpgRepository.searchFuturePrograms (cyclomatic 24) app/src/main/java/com/beeregg2001/komorebi/data/repository/EpgRepository.kt:124 — EpgRepository.searchFuturePrograms has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecordedCardKt.RecordedCard (cyclomatic 24) · ×1
  • RecordedCardKt.RecordedCard (cyclomatic 24) app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:41 — RecordedCardKt.RecordedCard 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 · SmbViewModel.parseLuaFormat (cyclomatic 23) · ×1
  • SmbViewModel.parseLuaFormat (cyclomatic 23) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:444 — SmbViewModel.parseLuaFormat 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 · LivePlayerViewModel.playMainChannel (cyclomatic 22) · ×1
  • LivePlayerViewModel.playMainChannel (cyclomatic 22) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:652 — LivePlayerViewModel.playMainChannel 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. This shape REPEATS in the file: one other method here (LivePlayerViewModel.playDualChannel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · LivePlayerViewModel.playDualChannel (cyclomatic 22) · ×1
  • LivePlayerViewModel.playDualChannel (cyclomatic 22) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:773 — LivePlayerViewModel.playDualChannel 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. This shape REPEATS in the file: one other method here (LivePlayerViewModel.playMainChannel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · VideoPlayerSubMenuKt.ModernVideoSettingsOverlay (cyclomatic 21) · ×1
  • VideoPlayerSubMenuKt.ModernVideoSettingsOverlay (cyclomatic 21) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:384 — VideoPlayerSubMenuKt.ModernVideoSettingsOverlay 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 · EdcbByteUtils.readAutoAddData (cyclomatic 20) · ×1
  • EdcbByteUtils.readAutoAddData (cyclomatic 20) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:271 — EdcbByteUtils.readAutoAddData 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 · LiveDualPlayerKt.DualDisplayPlayer (cyclomatic 20) · ×1
  • LiveDualPlayerKt.DualDisplayPlayer (cyclomatic 20) app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:71 — LiveDualPlayerKt.DualDisplayPlayer 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 · RecordScreenTopBarKt.RecordScreenTopBar (cyclomatic 20) · ×1
  • RecordScreenTopBarKt.RecordScreenTopBar (cyclomatic 20) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:41 — RecordScreenTopBarKt.RecordScreenTopBar 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 · SettingsViewModel.forceSyncStreamQualities (cyclomatic 20) · ×1
  • SettingsViewModel.forceSyncStreamQualities (cyclomatic 20) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:506 — SettingsViewModel.forceSyncStreamQualities 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 · LibraryCardsKt.VideoRecentRecordCard (cyclomatic 19) · ×1
  • LibraryCardsKt.VideoRecentRecordCard (cyclomatic 19) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:51 — LibraryCardsKt.VideoRecentRecordCard 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 · LivePlayerOverlaysKt.LCropOverlay (cyclomatic 19) · ×1
  • LivePlayerOverlaysKt.LCropOverlay (cyclomatic 19) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:433 — LivePlayerOverlaysKt.LCropOverlay has cyclomatic complexity 19 (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 · SettingComponentsKt.GeminiSetupDialog (cyclomatic 19) · ×1
  • SettingComponentsKt.GeminiSetupDialog (cyclomatic 19) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1195 — SettingComponentsKt.GeminiSetupDialog 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 · EdcbDataMapper.encodeSearchKeyInfo (cyclomatic 18) · ×1
  • EdcbDataMapper.encodeSearchKeyInfo (cyclomatic 18) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:213 — EdcbDataMapper.encodeSearchKeyInfo 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 · RecordListOverlayKt.RecordListOverlay (cyclomatic 18) · ×1
  • RecordListOverlayKt.RecordListOverlay (cyclomatic 18) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListOverlay.kt:39 — RecordListOverlayKt.RecordListOverlay has cyclomatic complexity 18 (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 · TsDurationCalculator.calculateDurationMs (cyclomatic 18) · ×1
  • TsDurationCalculator.calculateDurationMs (cyclomatic 18) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:861 — TsDurationCalculator.calculateDurationMs 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 · LivePlayerViewModel.handleMainError (cyclomatic 18) · ×1
  • LivePlayerViewModel.handleMainError (cyclomatic 18) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:490 — LivePlayerViewModel.handleMainError 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 · EdcbNwPlayDataSource.open (cyclomatic 17) · ×1
  • EdcbNwPlayDataSource.open (cyclomatic 17) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbNwPlayDataSource.kt:44 — EdcbNwPlayDataSource.open 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 · HomeHeroDashboardKt.HomeHeroDashboard (cyclomatic 17) · ×1
  • HomeHeroDashboardKt.HomeHeroDashboard (cyclomatic 17) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeHeroDashboard.kt:42 — HomeHeroDashboardKt.HomeHeroDashboard 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 · AdvancedSettingsDialogKt.AdvancedSettingsDialog (cyclomatic 17) · ×1
  • AdvancedSettingsDialogKt.AdvancedSettingsDialog (cyclomatic 17) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:55 — AdvancedSettingsDialogKt.AdvancedSettingsDialog 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 · RecordGridContentKt.RecordGridContent (cyclomatic 17) · ×1
  • RecordGridContentKt.RecordGridContent (cyclomatic 17) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:41 — RecordGridContentKt.RecordGridContent 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 · ArchivedCommentOverlayKt.ArchivedCommentOverlay (cyclomatic 17) · ×1
  • ArchivedCommentOverlayKt.ArchivedCommentOverlay (cyclomatic 17) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/ArchivedCommentOverlay.kt:22 — ArchivedCommentOverlayKt.ArchivedCommentOverlay 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 · SmbTopBarKt.SmbTopBar (cyclomatic 17) · ×1
  • SmbTopBarKt.SmbTopBar (cyclomatic 17) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:42 — SmbTopBarKt.SmbTopBar 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 · LivePlayerViewModel.buildStreamUrl (cyclomatic 17) · ×1
  • LivePlayerViewModel.buildStreamUrl (cyclomatic 17) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:960 — LivePlayerViewModel.buildStreamUrl 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 · LivePlayerViewModel.startMainSse (cyclomatic 17) · ×1
  • LivePlayerViewModel.startMainSse (cyclomatic 17) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1170 — LivePlayerViewModel.startMainSse has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · EdcbEpgCacheManager.fetchEpgDataIfNeeded (cyclomatic 16) · ×1
  • EdcbEpgCacheManager.fetchEpgDataIfNeeded (cyclomatic 16) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt:69 — EdcbEpgCacheManager.fetchEpgDataIfNeeded 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 · EdcbLiveRepository.getChannels (cyclomatic 16) · ×1
  • EdcbLiveRepository.getChannels (cyclomatic 16) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:105 — EdcbLiveRepository.getChannels 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 · EpgState.updatePositionsInternal (cyclomatic 16) · ×1
  • EpgState.updatePositionsInternal (cyclomatic 16) app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgState.kt:220 — EpgState.updatePositionsInternal 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 · ChannelListOverlayKt.ChannelListOverlay (cyclomatic 16) · ×1
  • ChannelListOverlayKt.ChannelListOverlay (cyclomatic 16) app/src/main/java/com/beeregg2001/komorebi/ui/live/ChannelListOverlay.kt:45 — ChannelListOverlayKt.ChannelListOverlay 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 · LivePlayerViewModel.fetchAvailableQualities (cyclomatic 16) · ×1
  • LivePlayerViewModel.fetchAvailableQualities (cyclomatic 16) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:238 — LivePlayerViewModel.fetchAvailableQualities 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 · SmbViewModel.performRecursiveSearch (cyclomatic 16) · ×1
  • SmbViewModel.performRecursiveSearch (cyclomatic 16) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:300 — SmbViewModel.performRecursiveSearch 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.
D2 · Cognitive Complexity · SmbVlcPlayerScreenKt.SmbVlcPlayerScreen (cognitive 320) · ×1
  • SmbVlcPlayerScreenKt.SmbVlcPlayerScreen (cognitive 320) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:65 — SmbVlcPlayerScreenKt.SmbVlcPlayerScreen has cognitive complexity 320 (threshold 15). Drivers by points: if/else 116 (284 pts), boolean chains 23, loops 2 (6 pts), match/switch 2 (5 pts), error handling 1 (2 pts) (nesting depth added 176). 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 · EpgDrawer.draw (cognitive 264) · ×1
  • EpgDrawer.draw (cognitive 264) app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:94 — EpgDrawer.draw has cognitive complexity 264 (threshold 15). Drivers by points: if/else 90 (226 pts), boolean chains 19, loops 5 (10 pts), match/switch 4 (9 pts) (nesting depth added 146). 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 · VideoPlayerScreenKt.VideoPlayerScreen (cognitive 236) · ×1
  • VideoPlayerScreenKt.VideoPlayerScreen (cognitive 236) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:120 — VideoPlayerScreenKt.VideoPlayerScreen has cognitive complexity 236 (threshold 15). Drivers by points: if/else 124 (192 pts), boolean chains 38, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LivePlayerScreenKt.LivePlayerScreen (cognitive 211) · ×1
  • LivePlayerScreenKt.LivePlayerScreen (cognitive 211) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:63 — LivePlayerScreenKt.LivePlayerScreen has cognitive complexity 211 (threshold 15). Drivers by points: if/else 110 (149 pts), boolean chains 56, match/switch 3 (5 pts), error handling 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeLauncherScreenKt.HomeLauncherScreen (cognitive 184) · ×1
  • HomeLauncherScreenKt.HomeLauncherScreen (cognitive 184) app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt:131 — HomeLauncherScreenKt.HomeLauncherScreen has cognitive complexity 184 (threshold 15). Drivers by points: if/else 91 (140 pts), boolean chains 37, match/switch 5 (6 pts), loops 1 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainRootScreenKt.MainRootScreen (cognitive 167) · ×1
  • MainRootScreenKt.MainRootScreen (cognitive 167) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.kt:47 — MainRootScreenKt.MainRootScreen has cognitive complexity 167 (threshold 15). Drivers by points: if/else 75 (125 pts), boolean chains 34, match/switch 4, error handling 1 (3 pts), loops 1 (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 · VideoPlayerState.handleKeyEvent (cognitive 166) · ×1
  • VideoPlayerState.handleKeyEvent (cognitive 166) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerState.kt:74 — VideoPlayerState.handleKeyEvent has cognitive complexity 166 (threshold 15). Drivers by points: if/else 75 (146 pts), boolean chains 13, match/switch 2 (7 pts) (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReserveListScreenKt.ReserveListScreen (cognitive 137) · ×1
  • ReserveListScreenKt.ReserveListScreen (cognitive 137) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:93 — ReserveListScreenKt.ReserveListScreen has cognitive complexity 137 (threshold 15). Drivers by points: if/else 58 (116 pts), match/switch 5 (11 pts), boolean chains 10 (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LivePlayerState.handleKeyEvent (cognitive 126) · ×1
  • LivePlayerState.handleKeyEvent (cognitive 126) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerState.kt:118 — LivePlayerState.handleKeyEvent has cognitive complexity 126 (threshold 15). Drivers by points: if/else 46 (102 pts), match/switch 4 (13 pts), boolean chains 11 (nesting depth added 65). 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 · ConditionEditDialogKt.ConditionEditDialog (cognitive 125) · ×1
  • ConditionEditDialogKt.ConditionEditDialog (cognitive 125) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:53 — ConditionEditDialogKt.ConditionEditDialog has cognitive complexity 125 (threshold 15). Drivers by points: if/else 72 (108 pts), match/switch 6 (11 pts), boolean chains 6 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AiConciergePanelKt.AiConciergePanel (cognitive 124) · ×1
  • AiConciergePanelKt.AiConciergePanel (cognitive 124) app/src/main/java/com/beeregg2001/komorebi/ui/components/AiConciergePanel.kt:54 — AiConciergePanelKt.AiConciergePanel has cognitive complexity 124 (threshold 15). Drivers by points: if/else 54 (104 pts), boolean chains 11, match/switch 3 (9 pts) (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordListScreenKt.RecordListScreen (cognitive 121) · ×1
  • RecordListScreenKt.RecordListScreen (cognitive 121) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:89 — RecordListScreenKt.RecordListScreen has cognitive complexity 121 (threshold 15). Drivers by points: if/else 71 (96 pts), boolean chains 14, match/switch 7 (11 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SeasonalDecorKt.SeasonalDecor (cognitive 117) · ×1
  • SeasonalDecorKt.SeasonalDecor (cognitive 117) app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:33 — SeasonalDecorKt.SeasonalDecor has cognitive complexity 117 (threshold 15). Drivers by points: if/else 46 (80 pts), loops 17 (34 pts), match/switch 2, boolean chains 1 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProgramDetailScreenKt.ProgramDetailScreen (cognitive 113) · ×1
  • ProgramDetailScreenKt.ProgramDetailScreen (cognitive 113) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:52 — ProgramDetailScreenKt.ProgramDetailScreen has cognitive complexity 113 (threshold 15). Drivers by points: if/else 44 (105 pts), boolean chains 4, error handling 2, match/switch 1 (2 pts) (nesting depth added 62). 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 · SettingScreenKt.SettingsScreen (cognitive 112) · ×1
  • SettingScreenKt.SettingsScreen (cognitive 112) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingScreen.kt:53 — SettingScreenKt.SettingsScreen has cognitive complexity 112 (threshold 15). Drivers by points: if/else 61 (83 pts), match/switch 8 (14 pts), boolean chains 10, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LivePlayerSubMenuKt.LiveTopSubMenuUI (cognitive 110) · ×1
  • LivePlayerSubMenuKt.LiveTopSubMenuUI (cognitive 110) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:43 — LivePlayerSubMenuKt.LiveTopSubMenuUI has cognitive complexity 110 (threshold 15). Drivers by points: if/else 62 (81 pts), boolean chains 16, error handling 5 (8 pts), match/switch 3 (5 pts) (nesting depth added 24). 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 · ModernEpgCanvasEngine_NoAnimeKt.ModernEpgCanvasEngine_NoAnime (cognitive 102) · ×1
  • ModernEpgCanvasEngine_NoAnimeKt.ModernEpgCanvasEngine_NoAnime (cognitive 102) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine_NoAnime.kt:48 — ModernEpgCanvasEngine_NoAnimeKt.ModernEpgCanvasEngine_NoAnime has cognitive complexity 102 (threshold 15). Drivers by points: if/else 63 (80 pts), boolean chains 12, match/switch 5 (9 pts), loops 1 (nesting depth added 21). 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 · ModernEpgCanvasEngineKt.ModernEpgCanvasEngine_Smooth (cognitive 93) · ×1
  • ModernEpgCanvasEngineKt.ModernEpgCanvasEngine_Smooth (cognitive 93) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:53 — ModernEpgCanvasEngineKt.ModernEpgCanvasEngine_Smooth has cognitive complexity 93 (threshold 15). Drivers by points: if/else 46 (79 pts), boolean chains 10, match/switch 2 (4 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordSyncEngine.syncAllRecords (cognitive 90) · ×1
  • RecordSyncEngine.syncAllRecords (cognitive 90) app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt:195 — RecordSyncEngine.syncAllRecords has cognitive complexity 90 (threshold 15). Drivers by points: if/else 40 (71 pts), boolean chains 14, loops 2 (3 pts), error handling 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoTabContentKt.VideoTabContent (cognitive 87) · ×1
  • VideoTabContentKt.VideoTabContent (cognitive 87) app/src/main/java/com/beeregg2001/komorebi/ui/home/VideoTabContent.kt:53 — VideoTabContentKt.VideoTabContent has cognitive complexity 87 (threshold 15). Drivers by points: if/else 49 (77 pts), boolean chains 6, error handling 2 (4 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainRootDialogsKt.MainRootDialogs (cognitive 81) · ×1
  • MainRootDialogsKt.MainRootDialogs (cognitive 81) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootDialogs.kt:51 — MainRootDialogsKt.MainRootDialogs has cognitive complexity 81 (threshold 15). Drivers by points: if/else 38 (65 pts), boolean chains 16 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordListContentKt.RecordListContent (cognitive 81) · ×1
  • RecordListContentKt.RecordListContent (cognitive 81) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:63 — RecordListContentKt.RecordListContent has cognitive complexity 81 (threshold 15). Drivers by points: if/else 42 (69 pts), boolean chains 11, match/switch 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerControlsKt.PlayerControls (cognitive 77) · ×1
  • PlayerControlsKt.PlayerControls (cognitive 77) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/PlayerControls.kt:63 — PlayerControlsKt.PlayerControls has cognitive complexity 77 (threshold 15). Drivers by points: if/else 49 (64 pts), boolean chains 8, error handling 1 (2 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). 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 · RecordSeriesContentKt.RecordSeriesContent (cognitive 73) · ×1
  • RecordSeriesContentKt.RecordSeriesContent (cognitive 73) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:53 — RecordSeriesContentKt.RecordSeriesContent has cognitive complexity 73 (threshold 15). Drivers by points: if/else 51 (67 pts), boolean chains 5, match/switch 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 · SettingContentsKt.ConnectionSettingsContent (cognitive 72) · ×1
  • SettingContentsKt.ConnectionSettingsContent (cognitive 72) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:251 — SettingContentsKt.ConnectionSettingsContent has cognitive complexity 72 (threshold 15). Drivers by points: if/else 42 (53 pts), boolean chains 8, match/switch 6 (7 pts), error handling 2 (4 pts) (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 · EdcbRecordRepository.mapToRecordedProgram (cognitive 71) · ×1
  • EdcbRecordRepository.mapToRecordedProgram (cognitive 71) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:396 — EdcbRecordRepository.mapToRecordedProgram has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (48 pts), error handling 6 (13 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeContentsKt.HomeContents (cognitive 66) · ×1
  • HomeContentsKt.HomeContents (cognitive 66) app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.kt:39 — HomeContentsKt.HomeContents has cognitive complexity 66 (threshold 15). Drivers by points: if/else 47 (61 pts), boolean chains 4, match/switch 1 (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 · LiveContentsKt.LiveContent (cognitive 64) · ×1
  • LiveContentsKt.LiveContent (cognitive 64) app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:68 — LiveContentsKt.LiveContent has cognitive complexity 64 (threshold 15). Drivers by points: if/else 29 (53 pts), loops 2 (6 pts), boolean chains 5 (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 · ModernEpgCanvasEngineKt.EpgHeaderSection (cognitive 60) · ×1
  • ModernEpgCanvasEngineKt.EpgHeaderSection (cognitive 60) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:469 — ModernEpgCanvasEngineKt.EpgHeaderSection has cognitive complexity 60 (threshold 15). Drivers by points: if/else 41 (50 pts), match/switch 3 (6 pts), boolean chains 4 (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 · KeywordConditionCardKt.KeywordConditionCard (cognitive 59) · ×1
  • KeywordConditionCardKt.KeywordConditionCard (cognitive 59) app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:38 — KeywordConditionCardKt.KeywordConditionCard has cognitive complexity 59 (threshold 15). Drivers by points: if/else 47 (55 pts), boolean chains 4 (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 · EpgReserveDialogKt.EpgReserveDialog (cognitive 58) · ×1
  • EpgReserveDialogKt.EpgReserveDialog (cognitive 58) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:40 — EpgReserveDialogKt.EpgReserveDialog has cognitive complexity 58 (threshold 15). Drivers by points: if/else 42 (50 pts), match/switch 3 (5 pts), boolean chains 3 (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 · SmbLibraryScreenKt.SmbLibraryScreen (cognitive 56) · ×1
  • SmbLibraryScreenKt.SmbLibraryScreen (cognitive 56) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:67 — SmbLibraryScreenKt.SmbLibraryScreen has cognitive complexity 56 (threshold 15). Drivers by points: if/else 39 (52 pts), boolean chains 3, 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 · EpgNavigationContainerKt.EpgNavigationContainer (cognitive 54) · ×1
  • EpgNavigationContainerKt.EpgNavigationContainer (cognitive 54) app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:65 — EpgNavigationContainerKt.EpgNavigationContainer has cognitive complexity 54 (threshold 15). Drivers by points: if/else 34 (48 pts), boolean chains 6 (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 · SmbListContentKt.SmbListContent (cognitive 51) · ×1
  • SmbListContentKt.SmbListContent (cognitive 51) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:46 — SmbListContentKt.SmbListContent has cognitive complexity 51 (threshold 15). Drivers by points: if/else 36 (47 pts), boolean chains 4 (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 · VideoPlayerManagerKt.rememberManagedExoPlayer (cognitive 47) · ×1
  • VideoPlayerManagerKt.rememberManagedExoPlayer (cognitive 47) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt:88 — VideoPlayerManagerKt.rememberManagedExoPlayer has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 9, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReserveCardKt.ReserveCard (cognitive 45) · ×1
  • ReserveCardKt.ReserveCard (cognitive 45) app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt:42 — ReserveCardKt.ReserveCard has cognitive complexity 45 (threshold 15). Drivers by points: if/else 35 (41 pts), boolean chains 2, error handling 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 · SmbListContentKt.SmbGridContent (cognitive 45) · ×1
  • SmbListContentKt.SmbGridContent (cognitive 45) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:234 — SmbListContentKt.SmbGridContent has cognitive complexity 45 (threshold 15). Drivers by points: if/else 32 (40 pts), boolean chains 5 (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 · RecordListItemKt.RecordListItem (cognitive 44) · ×1
  • RecordListItemKt.RecordListItem (cognitive 44) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.kt:44 — RecordListItemKt.RecordListItem has cognitive complexity 44 (threshold 15). Drivers by points: if/else 34 (37 pts), boolean chains 5, error handling 1, 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 · EdcbDataMapper.encodeSearchKeyInfo (cognitive 43) · ×1
  • EdcbDataMapper.encodeSearchKeyInfo (cognitive 43) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:213 — EdcbDataMapper.encodeSearchKeyInfo has cognitive complexity 43 (threshold 15). Drivers by points: if/else 23 (34 pts), loops 3 (9 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 · ArchivedCommentOverlayKt.ArchivedCommentOverlay (cognitive 43) · ×1
  • ArchivedCommentOverlayKt.ArchivedCommentOverlay (cognitive 43) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/ArchivedCommentOverlay.kt:22 — ArchivedCommentOverlayKt.ArchivedCommentOverlay has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (35 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VideoPlayerSubMenuKt.VideoTopSubMenuUI (cognitive 43) · ×1
  • VideoPlayerSubMenuKt.VideoTopSubMenuUI (cognitive 43) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:82 — VideoPlayerSubMenuKt.VideoTopSubMenuUI has cognitive complexity 43 (threshold 15). Drivers by points: if/else 29 (31 pts), error handling 4 (7 pts), boolean chains 5 (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 · EpgRepository.searchFuturePrograms (cognitive 42) · ×1
  • EpgRepository.searchFuturePrograms (cognitive 42) app/src/main/java/com/beeregg2001/komorebi/data/repository/EpgRepository.kt:124 — EpgRepository.searchFuturePrograms has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 6, error handling 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 · EdcbEpgCacheManager.fetchEpgDataIfNeeded (cognitive 42) · ×1
  • EdcbEpgCacheManager.fetchEpgDataIfNeeded (cognitive 42) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt:69 — EdcbEpgCacheManager.fetchEpgDataIfNeeded has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (34 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 27). 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 · EpgJumpMenuKt.EpgJumpMenu (cognitive 42) · ×1
  • EpgJumpMenuKt.EpgJumpMenu (cognitive 42) app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgJumpMenu.kt:51 — EpgJumpMenuKt.EpgJumpMenu has cognitive complexity 42 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 8, loops 2 (3 pts) (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 · LiveDualPlayerKt.DualDisplayPlayer (cognitive 42) · ×1
  • LiveDualPlayerKt.DualDisplayPlayer (cognitive 42) app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:71 — LiveDualPlayerKt.DualDisplayPlayer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 26 (37 pts), boolean chains 5 (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 · RecordScreenTopBarKt.RecordScreenTopBar (cognitive 42) · ×1
  • RecordScreenTopBarKt.RecordScreenTopBar (cognitive 42) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:41 — RecordScreenTopBarKt.RecordScreenTopBar has cognitive complexity 42 (threshold 15). Drivers by points: if/else 25 (38 pts), boolean chains 4 (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 · VideoPlayerSubMenuKt.ModernVideoSettingsOverlay (cognitive 42) · ×1
  • VideoPlayerSubMenuKt.ModernVideoSettingsOverlay (cognitive 42) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:384 — VideoPlayerSubMenuKt.ModernVideoSettingsOverlay has cognitive complexity 42 (threshold 15). Drivers by points: if/else 27 (37 pts), boolean chains 4, 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 · LivePlayerViewModel.fetchAvailableQualities (cognitive 42) · ×1
  • LivePlayerViewModel.fetchAvailableQualities (cognitive 42) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:238 — LivePlayerViewModel.fetchAvailableQualities has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (24 pts), error handling 6 (18 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainRootBackgroundKt.MainRootBackground (cognitive 38) · ×1
  • MainRootBackgroundKt.MainRootBackground (cognitive 38) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt:37 — MainRootBackgroundKt.MainRootBackground has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 11, 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 · RecordSeriesGridContentKt.RecordSeriesGridContent (cognitive 37) · ×1
  • RecordSeriesGridContentKt.RecordSeriesGridContent (cognitive 37) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:52 — RecordSeriesGridContentKt.RecordSeriesGridContent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 6 (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 · TsDurationCalculator.calculateDurationMs (cognitive 37) · ×1
  • TsDurationCalculator.calculateDurationMs (cognitive 37) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:861 — TsDurationCalculator.calculateDurationMs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (30 pts), boolean chains 3, error handling 2, loops 2 (nesting depth added 20). 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 · SettingsViewModel.forceSyncStreamQualities (cognitive 36) · ×1
  • SettingsViewModel.forceSyncStreamQualities (cognitive 36) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:506 — SettingsViewModel.forceSyncStreamQualities has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 6, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SmbTopBarKt.SmbTopBar (cognitive 35) · ×1
  • SmbTopBarKt.SmbTopBar (cognitive 35) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:42 — SmbTopBarKt.SmbTopBar has cognitive complexity 35 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoPlayerViewModel.fetchAvailableQualities (cognitive 33) · ×1
  • VideoPlayerViewModel.fetchAvailableQualities (cognitive 33) app/src/main/java/com/beeregg2001/komorebi/viewmodel/VideoPlayerViewModel.kt:104 — VideoPlayerViewModel.fetchAvailableQualities has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (23 pts), error handling 3 (9 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordedCardKt.RecordedCard (cognitive 32) · ×1
  • RecordedCardKt.RecordedCard (cognitive 32) app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:41 — RecordedCardKt.RecordedCard has cognitive complexity 32 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 4, 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 · SmbViewModel.parseLuaFormat (cognitive 32) · ×1
  • SmbViewModel.parseLuaFormat (cognitive 32) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:444 — SmbViewModel.parseLuaFormat has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 4, loops 2, 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 · EdcbApi.getEventInfos (cognitive 31) · ×1
  • EdcbApi.getEventInfos (cognitive 31) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:183 — EdcbApi.getEventInfos has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24 (27 pts), loops 2 (3 pts), error handling 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 · EdcbDataMapper.encodeReserveRecordSettings (cognitive 31) · ×1
  • EdcbDataMapper.encodeReserveRecordSettings (cognitive 31) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:163 — EdcbDataMapper.encodeReserveRecordSettings has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22 (24 pts), match/switch 3 (5 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 · LivePlayerViewModel.buildStreamUrl (cognitive 31) · ×1
  • LivePlayerViewModel.buildStreamUrl (cognitive 31) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:960 — LivePlayerViewModel.buildStreamUrl has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 2, match/switch 1 (nesting depth added 10). 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 · EdcbApi.parseProgramExtendedText (cognitive 30) · ×1
  • EdcbApi.parseProgramExtendedText (cognitive 30) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:105 — EdcbApi.parseProgramExtendedText has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (11 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReserveSettingsDialogKt.ReserveSettingsDialog (cognitive 30) · ×1
  • ReserveSettingsDialogKt.ReserveSettingsDialog (cognitive 30) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:45 — ReserveSettingsDialogKt.ReserveSettingsDialog has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 1, 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 · RecordGridContentKt.RecordGridContent (cognitive 30) · ×1
  • RecordGridContentKt.RecordGridContent (cognitive 30) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:41 — RecordGridContentKt.RecordGridContent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 3 (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 · SmbLibraryScreenKt.SmbNavigationPaneContent (cognitive 29) · ×1
  • SmbLibraryScreenKt.SmbNavigationPaneContent (cognitive 29) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:560 — SmbLibraryScreenKt.SmbNavigationPaneContent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 3 (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 · AiConciergeViewModel.handleAiResponse (cognitive 29) · ×1
  • AiConciergeViewModel.handleAiResponse (cognitive 29) REDACTED:275 — AiConciergeViewModel.handleAiResponse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 7, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LivePlayerViewModel.startSignalPolling (cognitive 29) · ×1
  • LivePlayerViewModel.startSignalPolling (cognitive 29) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1333 — LivePlayerViewModel.startSignalPolling has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (24 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 · LivePlayerViewModel.playMainChannel (cognitive 27) · ×1
  • LivePlayerViewModel.playMainChannel (cognitive 27) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:652 — LivePlayerViewModel.playMainChannel has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, error handling 3 (5 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LivePlayerViewModel.playDualChannel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LivePlayerViewModel.playDualChannel (cognitive 27) · ×1
  • LivePlayerViewModel.playDualChannel (cognitive 27) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:773 — LivePlayerViewModel.playDualChannel has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, error handling 3 (5 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LivePlayerViewModel.playMainChannel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · EdcbByteUtils.readAutoAddData (cognitive 26) · ×1
  • EdcbByteUtils.readAutoAddData (cognitive 26) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:271 — EdcbByteUtils.readAutoAddData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20 (21 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 · HomeHeroDashboardKt.HomeHeroDashboard (cognitive 26) · ×1
  • HomeHeroDashboardKt.HomeHeroDashboard (cognitive 26) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeHeroDashboard.kt:42 — HomeHeroDashboardKt.HomeHeroDashboard has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (22 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 · LibraryCardsKt.VideoRecentRecordCard (cognitive 26) · ×1
  • LibraryCardsKt.VideoRecentRecordCard (cognitive 26) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:51 — LibraryCardsKt.VideoRecentRecordCard has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 5, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EdcbNwPlayDataSource.open (cognitive 25) · ×1
  • EdcbNwPlayDataSource.open (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbNwPlayDataSource.kt:44 — EdcbNwPlayDataSource.open has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (19 pts), error handling 2 (3 pts), boolean chains 2, 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 · EpgSearchListItemKt.EpgSearchListItem (cognitive 25) · ×1
  • EpgSearchListItemKt.EpgSearchListItem (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:38 — EpgSearchListItemKt.EpgSearchListItem has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21 (23 pts), 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 · LibraryCardsKt.RecordListBannerButton (cognitive 25) · ×1
  • LibraryCardsKt.RecordListBannerButton (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:482 — LibraryCardsKt.RecordListBannerButton has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21 (24 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. This shape REPEATS in the file: one other method here (LibraryCardsKt.SmbLibraryBannerButton) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LibraryCardsKt.SmbLibraryBannerButton (cognitive 25) · ×1
  • LibraryCardsKt.SmbLibraryBannerButton (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:578 — LibraryCardsKt.SmbLibraryBannerButton has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21 (24 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. This shape REPEATS in the file: one other method here (LibraryCardsKt.RecordListBannerButton) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SettingComponentsKt.SettingItem (cognitive 25) · ×1
  • SettingComponentsKt.SettingItem (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:199 — SettingComponentsKt.SettingItem has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 3 (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 · SettingContentsKt.HomeDisplaySettingsContent (cognitive 25) · ×1
  • SettingContentsKt.HomeDisplaySettingsContent (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:820 — SettingContentsKt.HomeDisplaySettingsContent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12, match/switch 5 (11 pts), boolean chains 1, loops 1 (nesting depth added 6). 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 · RecordChannelPaneKt.RecordChannelPane (cognitive 25) · ×1
  • RecordChannelPaneKt.RecordChannelPane (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:28 — RecordChannelPaneKt.RecordChannelPane has cognitive complexity 25 (threshold 15). Drivers by points: if/else 21 (23 pts), 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 · PlayerControlsKt.OsdIconButton (cognitive 25) · ×1
  • PlayerControlsKt.OsdIconButton (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/PlayerControls.kt:581 — PlayerControlsKt.OsdIconButton has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SmbViewModel.performRecursiveSearch (cognitive 25) · ×1
  • SmbViewModel.performRecursiveSearch (cognitive 25) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:300 — SmbViewModel.performRecursiveSearch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 4 (8 pts), boolean chains 2, 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 · AiNormalizationRepository.normalizeTitles (cognitive 24) · ×1
  • AiNormalizationRepository.normalizeTitles (cognitive 24) app/src/main/java/com/beeregg2001/komorebi/data/repository/AiNormalizationRepository.kt:24 — AiNormalizationRepository.normalizeTitles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordSyncEngine.startDictionaryResolutionLoop (cognitive 24) · ×1
  • RecordSyncEngine.startDictionaryResolutionLoop (cognitive 24) app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt:594 — RecordSyncEngine.startDictionaryResolutionLoop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TsReadExDataSource.openEdcbStream (cognitive 24) · ×1
  • TsReadExDataSource.openEdcbStream (cognitive 24) app/src/main/java/com/beeregg2001/komorebi/util/TsReadExDataSource.kt:185 — TsReadExDataSource.openEdcbStream has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 2 (4 pts), boolean chains 2, loops 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 · DirectSubtitlePayloadReader.parseAndSendBuffer (cognitive 23) · ×1
  • DirectSubtitlePayloadReader.parseAndSendBuffer (cognitive 23) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubtitleLogic.kt:50 — DirectSubtitlePayloadReader.parseAndSendBuffer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), boolean chains 3, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoPlayerSubMenuKt.ModernSettingRow (cognitive 23) · ×1
  • VideoPlayerSubMenuKt.ModernSettingRow (cognitive 23) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:590 — VideoPlayerSubMenuKt.ModernSettingRow has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20 (21 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 · JikkyoChannelResolver.fetchForceMap (cognitive 22) · ×1
  • JikkyoChannelResolver.fetchForceMap (cognitive 22) app/src/main/java/com/beeregg2001/komorebi/data/jikkyo/JikkyoChannelResolver.kt:125 — JikkyoChannelResolver.fetchForceMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (7 pts), boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeCardsKt.GenrePickupCard (cognitive 22) · ×1
  • HomeCardsKt.GenrePickupCard (cognitive 22) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:491 — HomeCardsKt.GenrePickupCard has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (20 pts), 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 · AdvancedSettingsDialogKt.AdvancedSettingsDialog (cognitive 22) · ×1
  • AdvancedSettingsDialogKt.AdvancedSettingsDialog (cognitive 22) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:55 — AdvancedSettingsDialogKt.AdvancedSettingsDialog has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (16 pts), match/switch 4, 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 · LivePlayerViewModel.handleMainError (cognitive 21) · ×1
  • LivePlayerViewModel.handleMainError (cognitive 21) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:490 — LivePlayerViewModel.handleMainError has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10 (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 · JikkyoChannelResolver.getJikkyoId (cognitive 20) · ×1
  • JikkyoChannelResolver.getJikkyoId (cognitive 20) app/src/main/java/com/beeregg2001/komorebi/data/jikkyo/JikkyoChannelResolver.kt:86 — JikkyoChannelResolver.getJikkyoId has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, 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 · EpgStationRecordRepository.getSeriesList (cognitive 20) · ×1
  • EpgStationRecordRepository.getSeriesList (cognitive 20) app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:103 — EpgStationRecordRepository.getSeriesList has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2, error handling 1, 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 · EpgState.updatePositionsInternal (cognitive 20) · ×1
  • EpgState.updatePositionsInternal (cognitive 20) app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgState.kt:220 — EpgState.updatePositionsInternal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (17 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 · BaseballDashboardKt.BaseballDashboardScreen (cognitive 20) · ×1
  • BaseballDashboardKt.BaseballDashboardScreen (cognitive 20) app/src/main/java/com/beeregg2001/komorebi/ui/home/BaseballDashboard.kt:46 — BaseballDashboardKt.BaseballDashboardScreen has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 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 · ChannelListOverlayKt.ChannelCardItem (cognitive 20) · ×1
  • ChannelListOverlayKt.ChannelCardItem (cognitive 20) app/src/main/java/com/beeregg2001/komorebi/ui/live/ChannelListOverlay.kt:217 — ChannelListOverlayKt.ChannelCardItem has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19 (20 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 · SettingComponentsKt.getThemeFromModeAndSeason (cognitive 20) · ×1
  • SettingComponentsKt.getThemeFromModeAndSeason (cognitive 20) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:107 — SettingComponentsKt.getThemeFromModeAndSeason has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 1 (nesting depth added 6). 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 · LivePlayerOverlaysKt.LCropOverlay (cognitive 19) · ×1
  • LivePlayerOverlaysKt.LCropOverlay (cognitive 19) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:433 — LivePlayerOverlaysKt.LCropOverlay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SettingComponentsKt.CategoryItem (cognitive 19) · ×1
  • SettingComponentsKt.CategoryItem (cognitive 19) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:133 — SettingComponentsKt.CategoryItem 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 · SettingComponentsKt.GeminiSetupDialog (cognitive 19) · ×1
  • SettingComponentsKt.GeminiSetupDialog (cognitive 19) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1195 — SettingComponentsKt.GeminiSetupDialog has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 3, 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 · EdcbRecordRepository.getArchivedJikkyo (cognitive 18) · ×1
  • EdcbRecordRepository.getArchivedJikkyo (cognitive 18) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:645 — EdcbRecordRepository.getArchivedJikkyo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 2, 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 · LiveContentsKt.HeroDashboard (cognitive 18) · ×1
  • LiveContentsKt.HeroDashboard (cognitive 18) app/src/main/java/com/beeregg2001/komorebi/ui/home/LiveContents.kt:325 — LiveContentsKt.HeroDashboard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 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 · SafeFocusKt.safeRequestFocusWithRetry (cognitive 17) · ×1
  • SafeFocusKt.safeRequestFocusWithRetry (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/common/SafeFocus.kt:34 — SafeFocusKt.safeRequestFocusWithRetry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordSyncEngine.smartSync (cognitive 17) · ×1
  • RecordSyncEngine.smartSync (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/data/sync/RecordSyncEngine.kt:501 — RecordSyncEngine.smartSync has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, error handling 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 · BaseballDashboardKt.BaseballGameCard (cognitive 17) · ×1
  • BaseballDashboardKt.BaseballGameCard (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/ui/home/BaseballDashboard.kt:251 — BaseballDashboardKt.BaseballGameCard has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, 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 · LivePlayerOverlaysKt.LiveOverlayUI (cognitive 17) · ×1
  • LivePlayerOverlaysKt.LiveOverlayUI (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:164 — LivePlayerOverlaysKt.LiveOverlayUI has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 1 (3 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 · SettingComponentsKt.DialogTextField (cognitive 17) · ×1
  • SettingComponentsKt.DialogTextField (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:263 — SettingComponentsKt.DialogTextField has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), 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 · ThemeKt.KomorebiTheme (cognitive 17) · ×1
  • ThemeKt.KomorebiTheme (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:356 — ThemeKt.KomorebiTheme has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 4 (6 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 · RecordListScreenKt.RecordSortMenuOverlay (cognitive 17) · ×1
  • RecordListScreenKt.RecordSortMenuOverlay (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:793 — RecordListScreenKt.RecordSortMenuOverlay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 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 · SceneSearchOverlayKt.ChapterListOverlay (cognitive 17) · ×1
  • SceneSearchOverlayKt.ChapterListOverlay (cognitive 17) REDACTED:457 — SceneSearchOverlayKt.ChapterListOverlay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, 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 · VideoPlayerOverlaysKt.VideoLCropOverlay (cognitive 17) · ×1
  • VideoPlayerOverlaysKt.VideoLCropOverlay (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:68 — VideoPlayerOverlaysKt.VideoLCropOverlay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SmbLibraryScreenKt.SmbSortMenuOverlay (cognitive 17) · ×1
  • SmbLibraryScreenKt.SmbSortMenuOverlay (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:445 — SmbLibraryScreenKt.SmbSortMenuOverlay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 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 · TsReadExDataSource.read (cognitive 17) · ×1
  • TsReadExDataSource.read (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/util/TsReadExDataSource.kt:304 — TsReadExDataSource.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeViewModel.filterGenrePickup (cognitive 17) · ×1
  • HomeViewModel.filterGenrePickup (cognitive 17) app/src/main/java/com/beeregg2001/komorebi/viewmodel/HomeViewModel.kt:315 — HomeViewModel.filterGenrePickup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, 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 · EdcbLiveRepository.getChannels (cognitive 16) · ×1
  • EdcbLiveRepository.getChannels (cognitive 16) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbLiveRepository.kt:105 — EdcbLiveRepository.getChannels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 2, error handling 2, loops 1, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EpgSyncEngine.syncEpgData (cognitive 16) · ×1
  • EpgSyncEngine.syncEpgData (cognitive 16) app/src/main/java/com/beeregg2001/komorebi/data/sync/EpgSyncEngine.kt:36 — EpgSyncEngine.syncEpgData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), error handling 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelListOverlayKt.ChannelListOverlay (cognitive 16) · ×1
  • ChannelListOverlayKt.ChannelListOverlay (cognitive 16) app/src/main/java/com/beeregg2001/komorebi/ui/live/ChannelListOverlay.kt:45 — ChannelListOverlayKt.ChannelListOverlay has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, 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 · ReserveSharedComponentsKt.DayOfWeekSelectionDialog (cognitive 16) · ×1
  • ReserveSharedComponentsKt.DayOfWeekSelectionDialog (cognitive 16) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:58 — ReserveSharedComponentsKt.DayOfWeekSelectionDialog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 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 · ReserveSharedComponentsKt.NumberSelectionDialog (cognitive 16) · ×1
  • ReserveSharedComponentsKt.NumberSelectionDialog (cognitive 16) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:186 — ReserveSharedComponentsKt.NumberSelectionDialog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 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 · SmbViewModel.parseIniFormat (cognitive 16) · ×1
  • SmbViewModel.parseIniFormat (cognitive 16) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:573 — SmbViewModel.parseIniFormat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (232 shared lines) · ×1
  • Near-duplicate member pair (232 shared lines) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:68 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:68-336 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:69-332 — These two members are variants of one another: 232 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 (224 shared lines) · ×1
  • Near-duplicate member pair (224 shared lines) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:67 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:67-876 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:52-492 — These two members are variants of one another: 224 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 (204 shared lines) · ×1
  • Near-duplicate member pair (204 shared lines) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:436 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:436-657 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:71-295 — These two members are variants of one another: 204 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 (86 shared lines) · ×1
  • Near-duplicate member pair (86 shared lines) REDACTED:196 — REDACTED:196-353 | REDACTED:465-663 — These two members are variants of one another: 86 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (77 shared lines) · ×1
  • Near-duplicate member pair (77 shared lines) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:486 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:486-574 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:582-670 — These two members are variants of one another: 77 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (73 shared lines) · ×1
  • Near-duplicate member pair (73 shared lines) app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:47 — app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:47-291 | app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt:50-307 — These two members are variants of one another: 73 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 (49 shared lines) · ×1
  • Near-duplicate member pair (49 shared lines) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:35 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:35-131 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:35-125 — These two members are variants of one another: 49 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 (33 shared lines) · ×1
  • Near-duplicate member pair (33 shared lines) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1176 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1176-1253 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:1261-1331 — These two members are variants of one another: 33 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 (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:31 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:31-89 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:92-137 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:140-198 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:201-247 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:47-126 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:286-345 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:374-439 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:442-533 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:540-685 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1127-1192 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Edited copy of a member (171 corresponding lines) · ×1
  • Edited copy of a member (171 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:59 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:59-229 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:247-444 — These two members are one piece of code written twice and then edited apart: 171 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (112 corresponding lines) · ×1
  • Edited copy of a member (112 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:655 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:655-771 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.kt:776-887 — These two members are one piece of code written twice and then edited apart: 112 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:341 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:341-390 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:392-429 — 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 (77 corresponding lines) · ×1
  • Edited copy of a member (77 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:984 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:984-1060 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt:1078-1169 — These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×1
  • Edited copy of a member (58 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:95 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:95-164 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:193-250 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×1
  • Edited copy of a member (50 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGenrePane.kt:115 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGenrePane.kt:115-164 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordNavigationPane.kt:90-140 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:510 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:510-544 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:333-376 — 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 (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:925 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:925-968 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1076-1118 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) REDACTED:141 — REDACTED:141-166 | REDACTED:175-203 — 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 (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:431 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:431-450 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:453-473 — 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) · ×1
  • Edited copy of a member (17 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbReserveRepository.kt:284 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbReserveRepository.kt:284-300 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbReserveRepository.kt:303-319 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 17+ corresponding lines) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:710 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:710-726 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:728-744 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:746-767 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:769-785 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:122 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:122-135 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:424-437 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:136-147 — 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 (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:93 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:93-103 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:105-116 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/worker/EpgSyncWorker.kt:36 — app/src/main/java/com/beeregg2001/komorebi/data/worker/EpgSyncWorker.kt:36-54 | app/src/main/java/com/beeregg2001/komorebi/data/worker/RecordSyncWorker.kt:64-81 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) KomorebiConfigurator/Views/MainWindow.axaml.cs:18 — KomorebiConfigurator/Views/MainWindow.axaml.cs:18-45 | KomorebiConfigurator/Views/MainWindow.axaml.cs:49-67 — 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, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:186 — app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:186-199 | app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:201-214 | app/src/main/java/com/beeregg2001/komorebi/data/repository/KonomiRepository.kt:216-236 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:219 — app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:219-233 | app/src/main/java/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:236-250 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:686 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:686-694 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SettingsViewModel.kt:696-704 — 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 copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) app/src/main/java/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt:130 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt:130-143 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt:153-165 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt:175-188 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/ReserveViewModel.kt:197-208 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×1
  • Edited copy of a member (7 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:137 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:137-144 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:439-445 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×1
  • Edited copy of a member (6 corresponding lines) app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:31 — app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:31-36 | REDACTED:447-452 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (158–166 lines × 2) · ×1
  • Duplicated block (158–166 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:437 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:437-594 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:72-237 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:437` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `state` to `LivePlayerState` in one and `VideoPlayerState` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (63 lines × 2) · ×1
  • Duplicated block (63 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:268 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:268-330 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:264-326 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (91 lines × 2) · ×1
  • Duplicated block (91 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:78 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:78-168 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:77-167 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:76` calls `FocusRequester` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:75` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (51–52 lines × 2) · ×1
  • Duplicated block (51–52 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1041 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1041-1091 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:744-795 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (45–51 lines × 2) · ×1
  • Duplicated block (45–51 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:152 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:152-202 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:281-325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:152` 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 (51 lines × 2) · ×1
  • Duplicated block (51 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:212 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:212-262 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:335-385 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/live/LiveDualPlayer.kt:212` 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 (41–45 lines × 2) · ×1
  • Duplicated block (41–45 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:61 — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:61-105 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.kt:249-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.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.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:877 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:877-919 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:1013-1055 — both copies are in the same file, so extract the 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 (36–38 lines × 2) · ×1
  • Duplicated block (36–38 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:355 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:355-390 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:237-274 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:355` 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 (36–37 lines × 2) · ×1
  • Duplicated block (36–37 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:607 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:607-642 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:250-286 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:607` 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 (61 lines × 2) · ×1
  • Duplicated block (61 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:171 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:171-231 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:170-230 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:171` 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 (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:487 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:487-520 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:583-616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:487` it does not close everything it opens, so those 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–33 lines × 4) · ×1
  • Duplicated block (29–33 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:800 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:800-832 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:452-484 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:801-829 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:920-948 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:800` it does not close everything it opens, so those 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 (68–70 lines × 2) · ×1
  • Duplicated block (68–70 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:807 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:807-876 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:425-492 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:807` 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:779 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:779-810 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1316-1347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:779` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (26–29 lines × 2) · ×1
  • Duplicated block (26–29 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:246 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:246-274 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/engine/EpgDrawer.kt:461-486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25–27 lines × 3) · ×1
  • Duplicated block (25–27 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:378 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:378-402 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:447-471 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:550-576 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:378` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:848 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:848-873 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:500-525 — 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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:848` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:171 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:171-195 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:293-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. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–24 lines × 2) · ×1
  • Duplicated block (22–24 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:192 — app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:192-215 | app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt:193-214 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.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.
D4 · Code Duplication · Duplicated block (19–24 lines × 2) · ×1
  • Duplicated block (19–24 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:513 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:513-531 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:376-399 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:513` it does not close everything it opens, so those 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 (22–23 lines × 3) · ×1
  • Duplicated block (22–23 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:180 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:180-202 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:229-250 | app/src/main/java/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:302-323 — 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/com/beeregg2001/komorebi/ui/epg/ProgramDetailScreen.kt:180` 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 (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:503 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:503-522 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:650-672 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:503` 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–22 lines × 2) · ×1
  • Duplicated block (16–22 lines × 2) KomorebiConfigurator/Views/MainWindow.axaml.cs:18 — KomorebiConfigurator/Views/MainWindow.axaml.cs:18-39 | KomorebiConfigurator/Views/MainWindow.axaml.cs:49-64 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `KomorebiConfigurator/Views/MainWindow.axaml.cs:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `KomorebiConfigurator/Views/MainWindow.axaml.cs:42` calls `Execute` and `KomorebiConfigurator/Views/MainWindow.axaml.cs:65` 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 (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:138 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:138-158 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:309-329 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:440-460 — 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/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:138` 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 (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:791 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:791-809 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:671-691 — 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:791` 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–20 lines × 5) · ×1
  • Duplicated block (18–20 lines × 5) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:807 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:807-826 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:459-478 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:807-824 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:926-943 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:1022-1039 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:807` 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 (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:357 — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:357-376 | app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:414-433 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:264-283 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt:357` 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 (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:287 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:287-304 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:398-417 — 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/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:287` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (36–41 lines × 3) · ×1
  • Duplicated block (36–41 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:413 — app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:413-453 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt:128-163 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt:127-162 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 288 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:413` 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 (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:116 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:116-133 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:287-304 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:418-435 — 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/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:115` calls `focusRequester` and `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:417` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–18 lines × 2) · ×1
  • Duplicated block (11–18 lines × 2) app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:189 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:189-206 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:238-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 5) · ×1
  • Duplicated block (17 lines × 5) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:156 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:156-172 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:247-263 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:347-363 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:439-455 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:544-560 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–16 lines × 4) · ×1
  • Duplicated block (14–16 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:369 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:369-384 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:474-487 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:252-267 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:352-365 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:369` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 4) · ×1
  • Duplicated block (15–16 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:842 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:842-856 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:299-314 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:494-508 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:958-972 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:842` 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 × 3) · ×1
  • Duplicated block (16 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:287 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:287-302 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:270-285 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:402-417 — 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/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:287` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:286` calls `focusRequester` and `app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:418` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:375 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:375-390 | app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerSubMenu.kt:455-468 — 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.kt:375` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–23 lines × 4) · ×1
  • Duplicated block (19–23 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:188 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:188-206 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:495-517 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt:338-356 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:286-304 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesContent.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.kt:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–15 lines × 2) · ×1
  • Duplicated block (8–15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:430 — app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:430-444 | app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:456-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:430` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:404 — app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:404-417 | app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:420-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/theme/Theme.kt:404` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–14 lines × 3) · ×1
  • Duplicated block (6–14 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt:196 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt:196-209 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootDialogs.kt:182-187 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootDialogs.kt:292-305 — 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/com/beeregg2001/komorebi/ui/main/MainRootBackground.kt:196` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:431 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:431-443 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:453-466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:431` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1065 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1065-1077 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.kt:459-471 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:769-781 — 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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:1065` 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) · ×1
  • Duplicated block (12–13 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:536 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:536-547 | app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:610-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:536` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:39 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:39-50 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:100-111 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:148-159 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:209-220 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:295-306 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:39` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11–12 lines × 5) · ×1
  • Duplicated block (11–12 lines × 5) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:35 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:35-46 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:96-107 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:144-155 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:61-71 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:291-302 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) · ×1
  • Duplicated block (10–12 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:52 — app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt:52-61 | app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt:55-66 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/components/KeywordConditionCard.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/components/ReserveCard.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–12 lines × 2) · ×1
  • Duplicated block (8–12 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:926 — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:926-937 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.kt:748-755 — 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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:926` 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 (10–11 lines × 6) · ×1
  • Duplicated block (10–11 lines × 6) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:480 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:480-490 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:497-506 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:518-527 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:539-548 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:559-568 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:579-588 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:480` 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 (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:39 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:39-50 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:100-111 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:148-159 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:209-220 | app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:295-306 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1143-1153 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/main/MainDialogs.kt:39` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8–11 lines × 3) · ×1
  • Duplicated block (8–11 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:516 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:516-526 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:770-777 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:380-390 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:516` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:393 — app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:393-403 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:462-472 | app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:1140-1150 — 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/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt:393` 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–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:56 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:56-65 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:57-67 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGenrePane.kt:57-67 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:56` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:77 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:77-86 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:179-188 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:432-441 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:533-542 — 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/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:77` 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 (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:45 — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:45-54 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt:46-55 | app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGenrePane.kt:46-55 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDayPane.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordChannelPane.kt:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:318 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:318-324 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt:297-306 — 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/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:318` 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 (9 lines × 10) · ×1
  • Duplicated block (9 lines × 10) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:290 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:290-298 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:373-381 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:415-423 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:478-486 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:638-646 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:726-734 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:256-264 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:293-301 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:356-364 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:38-46 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:290` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:217 — app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:217-225 | app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:281-287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:127 — app/src/main/java/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:127-134 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/RecordViewModel.kt:429-436 | app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.kt:140-147 — 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/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:127` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt:102 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt:102-108 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt:157-164 — both copies are in the same file, so extract the 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 (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:418 — app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:418-424 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:496-502 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:517-523 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:540-546 | app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:623-629 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbByteUtils.kt:418` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (6–7 lines × 5) · ×1
  • Duplicated block (6–7 lines × 5) app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:841 — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:841-846 | app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:952-958 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:493-498 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:840-845 | app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:957-962 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:841` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:209 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:209-215 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:515-521 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:769-775 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:379-385 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:208` calls `weight` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:514` 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 × 3) · ×1
  • Duplicated block (7 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:222 — app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootComponents.kt:222-228 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:536-542 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:402-408 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:535` calls `focusRequester` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:401` 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 (6 lines × 11) · ×1
  • Duplicated block (6 lines × 11) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:400 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:400-405 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:291-297 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:374-380 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:416-422 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:479-485 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:639-645 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt:727-733 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:257-263 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:294-300 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt:357-363 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSharedComponents.kt:39-45 — before extracting anything, compare `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt` and `app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:400` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (3–5 lines × 4) · ×1
  • Duplicated block (3–5 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:108 — app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:108-110 | app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:142-146 | app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:160-164 | app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:177-181 — 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/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:113` calls `nextFloat` and `app/src/main/java/com/beeregg2001/komorebi/ui/main/SeasonalDecor.kt:184` 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 (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt:61 — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbEpgCacheManager.kt:61-66 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:79-84 | app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbReserveRepository.kt:34-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:113 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:113-121 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:210-218 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:404-412 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:505-515 — 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/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:113` 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 (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:139 — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:139-147 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:156-164 | app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:173-181 — 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/com/beeregg2001/komorebi/ui/reserve/ReserveListScreen.kt:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:218 — app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:218-222 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:310-316 | app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:412-416 — 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/com/beeregg2001/komorebi/ui/home/components/HomeSections.kt:218` 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.
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.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 199 Python, JVM production file(s) this check read across 3 module(s). Each was searched for its ecosystem's logging libraries (JVM: SLF4J, Log4j2, java.util.logging, Logback, kotlin-logging, scala-logging; Python: logging, structlog, loguru) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked KomorebiConfigurator/KomorebiConfigurator.csproj:16 — KomorebiConfigurator/KomorebiConfigurator.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Minor — 61 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×32
  • Duplicated predicate app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:717 — `!isPiPMode && !isSubOverlayOpen && vs.lCropMode == LCropMode.HIDDEN` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:632 — `!showControls && vs.lCropMode == LCropMode.HIDDEN` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.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/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:356 — `!trimmed.startsWith("c-") || !trimmed.endsWith("c")` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt, app/src/main/java/com/beeregg2001/komorebi/viewmodel/SmbViewModel.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/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:488 — `(isSearchInputFocused || isHistoryFocused) && searchHistory.isNotEmpty()` appears character-identically in 3 files — app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordScreenTopBar.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbTopBar.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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt:162 — `backendType == "EDCB" && edcbPlayMethod == "DIRECT"` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt:438 — `cause is HttpDataSource.InvalidResponseCodeException && cause.responseCode == 404` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerManager.kt, app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.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/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt:707 — `content.startsWith("/") && content.matches(Regex("^/[a-z][a-z0-9_-]*(?:\\s|$).*"))` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/data/repository/edcb/EdcbRecordRepository.kt, app/src/main/java/com/beeregg2001/komorebi/ui/live/LiveJikkyoManager.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/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:140 — `currentThumbnailUrl == primaryUrl && primaryUrl != fallbackUrl` appears character-identically in 7 files — app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt, app/src/main/java/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt, app/src/main/java/com/beeregg2001/komorebi/ui/home/components/LibraryCards.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordDetailPanel.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/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt:551 — `currentType == apiValue && !isTabFocused` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.kt, app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine_NoAnime.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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:884 — `currentType == type && currentOrder == order` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.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/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt:1073 — `digit >= 1024 && unitIndex < units.size - 1` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.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/com/beeregg2001/komorebi/ui/components/AiConciergePanel.kt:129 — `event.key == Key.Back || event.key == Key.Escape` appears character-identically in 6 files — app/src/main/java/com/beeregg2001/komorebi/ui/components/AiConciergePanel.kt, app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgJumpMenu.kt, app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine_NoAnime.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListContent.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/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt:267 — `event.key == Key.Back || event.nativeKeyEvent.keyCode == NativeKeyEvent.KEYCODE_BACK` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgNavigationContainer.kt, app/src/main/java/com/beeregg2001/komorebi/ui/epg/ModernEpgCanvasEngine.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/com/beeregg2001/komorebi/ui/components/AiConciergePanel.kt:401 — `event.key == Key.DirectionCenter || event.key == Key.Enter || event.key == Key.NumPadEnter` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/components/AiConciergePanel.kt, app/src/main/java/com/beeregg2001/komorebi/ui/main/MainRootScreen.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/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt:140 — `event.key == Key.DirectionLeft && index % 4 == 0` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordSeriesGridContent.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.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/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt:679 — `event.type == KeyEventType.KeyDown && (event.key == Key.Back || event.key == Key.Escape)` appears character-identically in 3 files — app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeLauncherScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/setting/OpenSourceLicensesScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbListContent.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/com/beeregg2001/komorebi/ui/video/components/RecordGenrePane.kt:126 — `event.type == KeyEventType.KeyDown && event.key == Key.DirectionLeft` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGenrePane.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordGridContent.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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:886 — `it.first == currentType && it.second == currentOrder` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.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/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt:477 — `it.isCm && currentPos >= it.startTimeMs && currentPos < (it.endTimeMs - 1500)` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/player/SmbVlcPlayerScreen.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/com/beeregg2001/komorebi/ui/components/RecordedCard.kt:75 — `it.isNotBlank() && !program.title.contains(it)` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/components/RecordedCard.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/components/RecordListItem.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/com/beeregg2001/komorebi/ui/home/HomeContents.kt:183 — `it.nativeKeyEvent.action == android.view.KeyEvent.ACTION_DOWN && it.nativeKeyEvent.keyCode == android.view.KeyEvent.KEYCODE_DPAD_UP` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/home/HomeContents.kt, app/src/main/java/com/beeregg2001/komorebi/ui/home/VideoTabContent.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/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt:839 — `it.type == KeyEventType.KeyDown && (it.key == Key.DirectionLeft || it.key == Key.Back || it.key == Key.Escape)` appears character-identically in 2 files — app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/smb/SmbLibraryScreen.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/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt:111 — `it.type == KeyEventType.KeyDown && it.nativeKeyEvent.keyCode == android.view.KeyEvent.KEYCODE_BACK` appears character-identically in 5 files — app/src/main/java/com/beeregg2001/komorebi/ui/reserve/AdvancedSettingsDialog.kt, app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ConditionEditDialog.kt, app/src/main/java/com/beeregg2001/komorebi/ui/reserve/EpgReserveDialog.kt, app/src/main/java/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.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/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt:308 — `it.value.contains("720") || it.label.contains("720")` appears character-identically in 3 files — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerScreen.kt, app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt, app/src/main/java/com/beeregg2001/komorebi/viewmodel/LivePlayerViewModel.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/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt:500 — `keyEvent.type == KeyEventType.KeyDown && (keyEvent.nativeKeyEvent.keyCode == android.view.KeyEvent.KEYCODE_BACK || keyEvent.nativeKeyEvent.k…` appears character-identically in 3 files — app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerOverlays.kt, app/src/main/java/com/beeregg2001/komorebi/ui/live/LivePlayerSubMenu.kt, app/src/main/java/com/beeregg2001/komorebi/ui/video/player/VideoPlayerOverlays.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.
  • + 7 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×10
  • Silent fallback default in catch app/src/main/java/com/beeregg2001/komorebi/data/repository/EpgRepository.kt:224 — `searchFuturePrograms` 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/com/beeregg2001/komorebi/data/repository/edcb/EdcbDataMapper.kt:68 — `formatToIso` 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/com/beeregg2001/komorebi/data/repository/epgstation/EpgStationRecordRepository.kt:151 — `getSeriesList` 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/com/beeregg2001/komorebi/data/util/EpgUtils.kt:69 — `formatTime` 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/com/beeregg2001/komorebi/data/util/EpgUtils.kt:82 — `formatEndTime` 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/com/beeregg2001/komorebi/ui/epg/components/EpgSearchListItem.kt:82 — `EpgSearchListItem` 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/com/beeregg2001/komorebi/ui/home/components/HomeCards.kt:279 — `WatchHistoryCard` swallows every exception into `0f` — 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/com/beeregg2001/komorebi/ui/reserve/ReserveSettingsDialog.kt:71 — `ReserveSettingsDialog` 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/com/beeregg2001/komorebi/ui/setting/SettingState.kt:73 — `rememberSettingPreferences` 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/com/beeregg2001/komorebi/viewmodel/EpgViewModel.kt:261 — `searchSilently` 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.
AX6 · Interface segregation · Fat interface · ×3
  • Fat interface: EpgStationApi (32 abstract methods) app/src/main/java/com/beeregg2001/komorebi/data/api/EpgStationApi.kt:15 — `EpgStationApi` declares 32 abstract methods: `getChannels`, `getSchedules`, `getBroadcasting`, `getScheduleDetail`, `getRecordedList`, `getRecordedDetail`, `getNextUp`, `getSeries`, `getDictionaryWorks`, `getSeriesDetail`, `getSeriesImage`, `getSeriesMapping`, `getDuration`, `getVideoFileMetadata`, `getChapters`, `getPlaybackPosition`, `updatePlaybackPosition`, `getAudioTracks`, `getConfig`, `getReserves`, `getReserve`, `addReserve`, `updateReserve`, `deleteReserve`, `getRules`, `getRule`, `addRule`, `updateRule`, `deleteRule`, `startLiveHls`, `startRecordedHls`, `keepStream`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: KonomiApi (21 abstract methods) app/src/main/java/com/beeregg2001/komorebi/data/api/KonomiApi.kt:8 — `KonomiApi` declares 21 abstract methods: `getCurrentUser`, `getChannels`, `getRecordedPrograms`, `searchVideos`, `getRecordedProgram`, `keepAlive`, `getBookmarks`, `getWatchHistory`, `updateWatchHistory`, `getJikkyoInfo`, `getArchivedJikkyo`, `getReserves`, `addReserve`, `updateReserve`, `deleteReservation`, `getReservationConditions`, `addReservationCondition`, `getReservationCondition`, `updateReservationCondition`, `deleteReservationCondition`, `getEpgPrograms`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: RecordedProgramDao (41 abstract methods) app/src/main/java/com/beeregg2001/komorebi/data/local/dao/RecordedProgramDao.kt:9 — `RecordedProgramDao` declares 41 abstract methods: `upsertAll`, `getById`, `getByIds`, `getAllIds`, `deleteOrphans`, `deleteByIds`, `getAll_DateDesc`, `getAll_DateAsc`, `getAll_TitleDesc`, `getAll_TitleAsc`, `getAll_DurationDesc`, `getAll_DurationAsc`, `getUnwatched_DateDesc`, `getUnwatched_DateAsc`, `getUnwatched_TitleDesc`, `getUnwatched_TitleAsc`, `getUnwatched_DurationDesc`, `getUnwatched_DurationAsc`, `getAllPagingSource`, `getPagingSourceByChannel`, `searchPagingSource`, `searchSeriesPagingSource`, `searchSeriesPagingSourceById`, `getSeriesFocusProgramId`, `getSeriesFocusProgramIdById`, `getPagingSourceByGenre`, `getPagingSourceByDayOfWeek`, `getRecordingProgramIds`, `getPagingSourceUnwatched`, `getRecentRecordingsFlow`, `getAllPrograms`, `getTotalCountFlow`, `getDistinctChannels`, `getGroupedSeries`, `getAllTitlesAndSeries`, `getTitlesNotInDictionary`, `updateSeriesName`, `updateSeriesNameByOriginalTitle`, `clearAll`, `getUnknownTitles`, and 1 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found KomorebiConfigurator/KomorebiConfigurator.csproj:3 — 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 `KomorebiConfigurator/KomorebiConfigurator.csproj` makes this repository a deployable product (line 3).
D21 · Naming Consistency · `originalNetworkID` spells `ID` where 323 names in the project spell it `Id` · ×1
  • `originalNetworkID` spells `ID` where 323 names in the project spell it `Id` app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:52 — 323 of 330 names in project app spell the token `Id` (323 of 330; unit: names in project app containing `Id`). Peers: NativeLib.switchCaptionLanguage(languageId) (app/src/main/java/com/beeregg2001/komorebi/NativeLib.kt:38); UrlBuilder.buildMirakurunStreamId (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(serviceId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.getMirakurunLogoUrl(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:75). Rename to `originalNetworkId`. [rule N6]
D21 · Naming Consistency · `transportStreamID` spells `ID` where 323 names in the project spell it `Id` · ×1
  • `transportStreamID` spells `ID` where 323 names in the project spell it `Id` app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:52 — 323 of 330 names in project app spell the token `Id` (323 of 330; unit: names in project app containing `Id`). Peers: NativeLib.switchCaptionLanguage(languageId) (app/src/main/java/com/beeregg2001/komorebi/NativeLib.kt:38); UrlBuilder.buildMirakurunStreamId (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(serviceId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.getMirakurunLogoUrl(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:75). Rename to `transportStreamId`. [rule N6]
D21 · Naming Consistency · `eventID` spells `ID` where 323 names in the project spell it `Id` · ×1
  • `eventID` spells `ID` where 323 names in the project spell it `Id` app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:53 — 323 of 330 names in project app spell the token `Id` (323 of 330; unit: names in project app containing `Id`). Peers: NativeLib.switchCaptionLanguage(languageId) (app/src/main/java/com/beeregg2001/komorebi/NativeLib.kt:38); UrlBuilder.buildMirakurunStreamId (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(serviceId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.getMirakurunLogoUrl(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:75). Rename to `eventId`. [rule N6]
D21 · Naming Consistency · `reserveID` spells `ID` where 323 names in the project spell it `Id` · ×1
  • `reserveID` spells `ID` where 323 names in the project spell it `Id` app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:53 — 323 of 330 names in project app spell the token `Id` (323 of 330; unit: names in project app containing `Id`). Peers: NativeLib.switchCaptionLanguage(languageId) (app/src/main/java/com/beeregg2001/komorebi/NativeLib.kt:38); UrlBuilder.buildMirakurunStreamId (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(serviceId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.getMirakurunLogoUrl(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:75). Rename to `reserveId`. [rule N6]
D21 · Naming Consistency · `serviceID` spells `ID` where 323 names in the project spell it `Id` · ×1
  • `serviceID` spells `ID` where 323 names in the project spell it `Id` app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:53 — 323 of 330 names in project app spell the token `Id` (323 of 330; unit: names in project app containing `Id`). Peers: NativeLib.switchCaptionLanguage(languageId) (app/src/main/java/com/beeregg2001/komorebi/NativeLib.kt:38); UrlBuilder.buildMirakurunStreamId (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(serviceId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.getMirakurunLogoUrl(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:75). Rename to `serviceId`. [rule N6]
D21 · Naming Consistency · `dataID` spells `ID` where 323 names in the project spell it `Id` · ×1
  • `dataID` spells `ID` where 323 names in the project spell it `Id` app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:60 — 323 of 330 names in project app spell the token `Id` (323 of 330; unit: names in project app containing `Id`). Peers: NativeLib.switchCaptionLanguage(languageId) (app/src/main/java/com/beeregg2001/komorebi/NativeLib.kt:38); UrlBuilder.buildMirakurunStreamId (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(serviceId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.getMirakurunLogoUrl(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:75). Rename to `dataId`. [rule N6]
D21 · Naming Consistency · `tunerID` spells `ID` where 323 names in the project spell it `Id` · ×1
  • `tunerID` spells `ID` where 323 names in the project spell it `Id` app/src/main/java/com/beeregg2001/komorebi/data/api/edcb/EdcbApi.kt:84 — 323 of 330 names in project app spell the token `Id` (323 of 330; unit: names in project app containing `Id`). Peers: NativeLib.switchCaptionLanguage(languageId) (app/src/main/java/com/beeregg2001/komorebi/NativeLib.kt:38); UrlBuilder.buildMirakurunStreamId (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.buildMirakurunStreamId(serviceId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:68); UrlBuilder.getMirakurunLogoUrl(networkId) (app/src/main/java/com/beeregg2001/komorebi/common/UrlBuilder.kt:75). Rename to `tunerId`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 1 of 155 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 155 of the 210 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: app/src/main/java/com/beeregg2001/komorebi/data/util/EpgUtils.kt. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D34 · Knowledge Freshness · Orphaned file · ×1
  • Orphaned file app/src/main/java/com/beeregg2001/komorebi/data/util/EpgUtils.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
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.
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 KomorebiConfigurator/KomorebiConfigurator.csproj:16 — `KomorebiConfigurator/KomorebiConfigurator.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X5 · Nullable reference types · Null-forgiving operator (`!`) suppressions override nullable warnings · ×1
  • Null-forgiving operator (`!`) suppressions override nullable warnings — ~1.3 `!` suppressions per 1k syntax nodes — 2 suppression(s) across the 1569 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-17db8d0081604231aa6897f5b1467d15/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=315" --report-format json --report-path /tmp/watchdog-gitleaks-17db8d0081604231aa6897f5b1467d15/history-1.json --exit-code 0 --source .3artifacts/raw/gitleaks-history-1.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-17db8d0081604231aa6897f5b1467d15/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude KomorebiConfigurator/obj/Debug .4artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesdotnet—dotnet list KomorebiConfigurator/KomorebiConfigurator.sln package --vulnerable --include-transitive --format json0artifacts/raw/dotnet-vulnerable.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 6 file(s) — `REDACTED`, `app/src/main/java/com/beeregg2001/komorebi/ui/epg/EpgJumpMenu.kt`, `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingComponents.kt`, `app/src/main/java/com/beeregg2001/komorebi/ui/setting/SettingContents.kt`, `app/src/main/java/com/beeregg2001/komorebi/ui/video/RecordListScreen.kt`, … (+1 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—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-e9d7c4d4318241ff8250d394ca6a84cf0artifacts/raw/osv-scanner.json

Run 01a1e7c9-0e87-77c9-a558-84a07b817915 · 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