Public report of marlboro-advance/mpvEx, 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, 19:26 UTC · Survey ID cd_0e524bf2b95340c8af97cd23c59daca9

marlboro-advance/mpvEx

Measured 17 November 2026, 19:22 UTC, at code version f4ea63e

First survey, so nothing to compare with yet
CAI score 38.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: 55,693 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Production Readiness, 23.4

Findings by how serious they are

26 critical 510 serious 40 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 19:22 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

62of 62 dimensions measured by tools.
563of 576 findings point to an exact file and line, so you can open each one in the code. The other 13 concern the repository as a whole, such as missing documentation.
62dimensions across 8 lenses, read from 55,693 lines of product code in 3 projects.
Chapters

Executive summary

marlboro-advance/mpvEx falls short of our standard for production because the project has no automated tests and we found no logging, tracing or health checks in the code. It scores 38.0 out of 100 and is rated Weak, and 24 of its 26 critical findings are security problems in the build pipeline.

Production Readiness, at 23.4, is the weakest lens and counts most in the score. The best first step is adding automated tests, worth about 12.5 points. Encrypting the sensitive stored data and keeping its keys in a vault comes next, worth about 6.0 points. Raising Production Readiness to 70 would lift the score to about 50.0.

Nineteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Five secrets can leak from the build pipeline, and the project has no automated tests, so a change can break it without warning. Adding automated tests, pinning each tool to an exact version and limiting each secret to its own step would close these risks. The button or link with no name needs a name, even when it only shows an icon.

The product code is 55,693 lines, about €55,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 23.4 · counts for 45%Security and Compliance 36.6 · counts for 25%Maturity 57.3 · counts for 14%Code Health 59.2 · counts for 8%Domain Modelling 62.7 · counts for 4%Accessibility 68.2 · counts for 2%Architecture 87.3 · counts for 1%Performance 100.0 · counts for 1%

If Production Readiness rose from 23.4 to 70, the lowest score rated Strong, the score would rise from 38.0 to about 50.0.

Code composition: what the lines of code are
Product code 100%
Rebuild cost: about €55,000 · Estimate
Cost to rebuild€18,000 to €91,000, for 302 to 958 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 38. 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: 55,693 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 12.5 points · High effort · Code Coverage
2
Encrypt sensitive data at rest (open the store encrypted — SQLCipher's SupportFactory for Room, a Realm encryptionKey — or encrypt the fields with Tink's AEAD or an AES/GCM Cipher, or use Jetpack Security's EncryptedSharedPreferences on Android) keeping its key in the Android Keystore or a vault, and manage server-side keys in a vault (AWS KMS / Secrets Manager, GCP KMS / Secret Manager, Azure Key Vault, HashiCorp Vault).
Skip if delegated to infra (Postgres TDE, KMS, etc.).
Raises the score by about 6.0 points · Medium effort · Data Protection
3
Adopt SLF4J (with a Logback or Log4j2 JSON encoder) and log at meaningful points in the modules you run.
Raises the score by about 5.9 points · Medium effort · Observability

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 €55,000 to build again, about 0.4 person-years of work. Its weakest lens is Production Readiness, at 23.4 (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 12.5 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.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 8% to 18% on every change. The history of the code shows how much it changes: about 13,141 lines over the last 90 days, which is about 53,294 lines a year. At that pace, the extra work comes to an estimated 10.7 to 64.5 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.

142 modules, with 189 dependencies between them. 4 loops run through 11 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 102 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 database.entities2 domain.anime4k.Anime4KManager3 domain.browser4 domain.media.model5 domain.network6 preferences.preference7 presentation8 ui.browser.selection9 ui.theme10 utils.media.CopyPasteOps11 utils.media.MediaInfoOps12 database.dao13 domain.browser.FileSystemItem14 domain.playbackstate.repository15 domain.recentlyplayed.repository16 repository.VideoStatCache17 ui.browser.cards18 ui.browser.networkstreaming.clients19 ui.browser.recentlyplayed.RecentlyPlayedItem20 ui.player.controls.components.panels21 ui.player.controls.components.sheets22 database23 repository24 ui.browser.networkstreaming.proxy.NetworkStreamingProxy25 database.repository26 ui.browser.networkstreaming27 ui.browser.networkstreaming.proxy28 ui.browser.base29 ui.browser.dialogs30 ui.browser.recentlyplayed31 ui.player32 preferences33 ui.browser.playlist34 ui.browser.filesystem35 ui.browser.folderlist36 ui.browser.videolist37 ui.preferences38 utils.history39 utils.media40 utils.sort
1 database.entities
2 domain.anime4k.Anime4KManager
3 domain.browser
4 domain.media.model
5 domain.network
6 preferences.preference
7 presentation
8 ui.browser.selection
9 ui.theme
10 utils.media.CopyPasteOps
11 utils.media.MediaInfoOps
12 database.dao51
13 domain.browser.FileSystemItem21
14 domain.playbackstate.repository1
15 domain.recentlyplayed.repository1
16 repository.VideoStatCache1
17 ui.browser.cards124
18 ui.browser.networkstreaming.clients8
19 ui.browser.recentlyplayed.RecentlyPlayedItem112
20 ui.player.controls.components.panels13
21 ui.player.controls.components.sheets41
22 database5
23 repository2331111
24 ui.browser.networkstreaming.proxy.NetworkStreamingProxy111
25 database.repository413111
26 ui.browser.networkstreaming422
27 ui.browser.networkstreaming.proxy11
28 ui.browser.base11
29 ui.browser.dialogs11221
30 ui.browser.recentlyplayed121111
31 ui.player121111121
32 preferences1192115
33 ui.browser.playlist422221
34 ui.browser.filesystem52212112
35 ui.browser.folderlist1411116
36 ui.browser.videolist31111114
37 ui.preferences1161
38 utils.history111
39 utils.media5171131
40 utils.sort123
Uses a module listed above itPart of a loopThe module itself
1 database.entities2 domain.anime4k.Anime4KManager3 domain.browser4 domain.media.model5 domain.network6 preferences.preference7 presentation8 ui.browser.selection9 ui.theme10 utils.media.CopyPasteOps11 utils.media.MediaInfoOps12 database.dao13 domain.browser.FileSystemItem14 domain.playbackstate.repository15 domain.recentlyplayed.repository16 repository.VideoStatCache17 ui.browser.cards18 ui.browser.networkstreaming.clients19 ui.browser.recentlyplayed.RecentlyPlayedItem20 ui.player.controls.components.panels21 ui.player.controls.components.sheets22 database23 repository24 ui.browser.networkstreaming.proxy.NetworkStreamingProxy25 database.repository26 ui.browser.networkstreaming27 ui.browser.networkstreaming.proxy28 ui.browser.base29 ui.browser.dialogs30 ui.browser.recentlyplayed31 ui.player32 preferences33 ui.browser.playlist34 ui.browser.filesystem35 ui.browser.folderlist36 ui.browser.videolist37 ui.preferences38 utils.history39 utils.media40 utils.sortdatabase.entities1domain.anime4k.Anime4KManager2domain.browser3domain.media.model4domain.network5preferences.preference6presentation7ui.browser.selection8ui.theme9utils.media.CopyPasteOps10utils.media.MediaInfoOps11database.dao12domain.browser.FileSystemItem13domain.playbackstate.repository14domain.recentlyplayed.repository15repository.VideoStatCache16ui.browser.cards17ui.browser.networkstreaming.clients18ui.browser.recentlyplayed.RecentlyPlayedItem19ui.player.controls.components.panels20ui.player.controls.components.sheets21database22repository23ui.browser.networkstreaming.proxy.NetworkStreamingProxy24database.repository25ui.browser.networkstreaming26ui.browser.networkstreaming.proxy27ui.browser.base28ui.browser.dialogs29ui.browser.recentlyplayed30ui.player31preferences32ui.browser.playlist33ui.browser.filesystem34ui.browser.folderlist35ui.browser.videolist36ui.preferences37utils.history38utils.media39utils.sort405121111124811213415233111111141311142211111122112111112111112111921154222215221211214111163111111411611115171131123+102 more modules (most-connected shown)

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

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

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

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

At a glance — Security · 36.6 · Weak · gated by D29, D36, C1 ·

At a glance — Domain Modelling · 62.7 · Adequate · gated by DM4, DM11 ·

At a glance — Accessibility · 68.2 · Adequate · gated by AC6 ·

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 — Injection30High / Critical
A03:2025 — Software Supply Chain Failures7Medium

Roadmap

Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; Encrypt sensitive data at rest (open the store encrypted — SQLCipher's SupportFactory for Room, a Realm encryptionKey — or encrypt the fields with Tink's AEAD or an AES/GCM Cipher, or use Jetpack Security's EncryptedSharedPreferences on Android) keeping its key in the Android Keystore or a vault, and manage server-side keys in a vault (AWS KMS / Secrets Manager, GCP KMS / Secret Manager, Azure Key Vault, HashiCorp Vault). Skip if delegated to infra (Postgres TDE, KMS, etc.); Adopt SLF4J (with a Logback or Log4j2 JSON encoder) and log at meaningful points in the modules you run.

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.+12.5 ptsHighCode Coverage
Encrypt sensitive data at rest (open the store encrypted — SQLCipher's SupportFactory for Room, a Realm encryptionKey — or encrypt the fields with Tink's AEAD or an AES/GCM Cipher, or use Jetpack Security's EncryptedSharedPreferences on Android) keeping its key in the Android Keystore or a vault, and manage server-side keys in a vault (AWS KMS / Secrets Manager, GCP KMS / Secret Manager, Azure Key Vault, HashiCorp Vault). Skip if delegated to infra (Postgres TDE, KMS, etc.).+6.0 ptsMediumData Protection
Adopt SLF4J (with a Logback or Log4j2 JSON encoder) and log at meaningful points in the modules you run.+5.9 ptsMediumObservability
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+5.9 ptsMediumSecurity & performance tooling
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts.+1.2 ptsLowADR Quality
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+2.2 ptsMediumRelease Hygiene
Resolve the 1 `isURLValid` spells `URL` where 17 names in the project spell it `Url` finding(s) in Naming Consistency — start with MediaUtils.kt.+0.9 ptsLowNaming Consistency
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED.+0.8 ptsLowStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED5.4MixedStatic Analysis (SAST): Medium: REDACTED
app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt5.5MixedCyclomatic Complexity: PlayerControlsKt.PlayerControls (cyclomatic 129)
app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt5.5MixedCyclomatic Complexity: VideoListScreen.Content (cyclomatic 34)
app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt5.5MixedCyclomatic Complexity: PlayerViewModel.getVideoMetadataFromMediaStore (cyclomatic 23)
app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt5.5MixedCyclomatic Complexity: PlayerActivity.handleFileLoaded (cyclomatic 19)
app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt5.5MixedCyclomatic Complexity: PlayerControlsSharedKt.RenderPlayerButton (cyclomatic 105)
app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerControlsPreferencesScreen.kt6.7MixedExplicit Debt: TodoComment
app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt7.0MixedCyclomatic Complexity: FileSystemBrowserScreenKt.FileSystemBrowserScreen (cyclomatic 84)
app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt7.0MixedCyclomatic Complexity: RecentlyPlayedScreenKt.RecentItemsContent (cyclomatic 33)
app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt7.0MixedCyclomatic Complexity: SeekbarKt.SquigglySeekbar (cyclomatic 28)
app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt7.0MixedCyclomatic Complexity: FolderListScreen.MediaStoreFolderListContent (cyclomatic 26)
app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt7.0MixedCyclomatic Complexity: RecentlyPlayedViewModel.createVideoFromFilePath (cyclomatic 26)
app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt7.0MixedCyclomatic Complexity: NetworkStreamingProxy.getStreamWithOffsetSMB (cyclomatic 22)
app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt7.0MixedCyclomatic Complexity: PlaylistSheetKt.PlaylistSheet (cyclomatic 18)
app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt7.0MixedCyclomatic Complexity: FilePickerDialogKt.FilePickerDialog (cyclomatic 20)
app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt7.0MixedCyclomatic Complexity: FtpClient.getFileStream (cyclomatic 20)

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

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

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

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

Could not be resolved — 15

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 62 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 62 dimensions across the health lenses
D1D2D3D4D5D6D8D13D14D15D17D19D20D21D26D28D29D30D34D35D36D43D44AC2AC3AC4AC5AC6AX10AX3AX4AX6C1C4DM11DM12DM4DM5DM6DM7DM9M1M2M3M4P1P2P3P4P6PF3X1X12X16X18X2X21X25X27X28X3X5

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, 563 of 576 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 01a1eaf6-335d-7175-8a56-46e1e1ba2f01.

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. Not scored — a Gradle build resolved 346 artifact(s) across its subprojects (132 behind a shipped release, reported), but the currency signal was not established over the whole graph, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • 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 package.json, but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its npm 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 (16 contributor(s) across 260 commit(s) sampled, automation and bot accounts excluded). One of them holds 80% of the history; the other 15 hold 1.3% 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.
  • 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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. `app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaylistItemEntity.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt` 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.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is Koin, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB2 Runtime readiness — 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. The dev server could not reach the network from our sandbox (a registry or API request was refused). This is a limit of our sandbox, not of your repository. (rule: network). The renderer reported: the dev server (`npm run dev` in website/) kept running but served no page within 2 minutes. Likely cause (our sandbox): the dev server could not reach the network from our sandbox (a registry or API request was refused). This is a limit of our sandbox, not of your repository. Last output: "30 | / > 31 | const response = await fetch(url, { / | ^ / 32 | next: { revalidate: 86400 }, // Cache for 24 hours / 33 | headers: { / 34 | Accept: "application/vnd.github.v3+json", { / [cause]: Error: connect ECONNREFUSED 140.82.121.5:443 / at <unknown> (Error: connect ECONNREFUSED 140.82.121.5:443) { / errno: -111, / code: 'ECONNREFUSED', / syscall: 'connect', / address: '140.82.121.5', / port: 443 / } / } / GET / 200 in 72ms (compile: 5ms, render: 67ms)" No runtime evidence was gathered.
  • 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: r:2.2.0. > Could not get resource 'https://www.jitpack.io/com/github/nanihadesuka/LazyColumnScrollbar/2.2.0/LazyColumnScrollbar-2.2.0.pom'. > Could not GET 'https://www.jitpack.io…; runtime evidence skipped (launch chosen because app/build.gradle.kts applies the Android application plugin and gradlew builds it).
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • DM8 Value-object opportunities — 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 finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
  • DM9 Scattered domain decisions — 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. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
  • DM9 Scattered domain decisions — 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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Kotlin is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Kotlin is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 2 further occurrence(s) are not listed individually; the score already reflects all 42.

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 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • 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.
  • C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • 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 Complexity3.1 / 10Weak✓ Tool-verified

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

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

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

53 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was GestureHandlerKt.GestureHandler at 150. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being PlayerButtonKt.getPlayerButtonLabel at 24 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: app/src/main/java/app/marlboroadvance/mpvex/preferences/PlayerButton.kt (PlayerButtonKt.getPlayerButtonLabel at 24). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

GestureHandlerKt.GestureHandler (cyclomatic 150)app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:78
PlayerControlsKt.PlayerControls (cyclomatic 129)app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:153
PlayerControlsSharedKt.RenderPlayerButton (cyclomatic 105)app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:92
FileSystemBrowserScreenKt.FileSystemBrowserScreen (cyclomatic 84)app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:155
VideoCardKt.VideoCard (cyclomatic 59)app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:59

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

What to do

  1. Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with GestureHandlerKt.GestureHandler (cyclomatic 150), PlayerControlsKt.PlayerControls (cyclomatic 129), PlayerControlsSharedKt.RenderPlayerButton (cyclomatic 105). — 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 4 together lifts Cyclomatic Complexity from 3.1 to about 5.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

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

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

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

82 method(s) exceeded the cognitive complexity threshold of 15; the worst was GestureHandlerKt.GestureHandler at 414.

GestureHandlerKt.GestureHandler (cognitive 414)app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:78
PlayerControlsKt.PlayerControls (cognitive 270)app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:153
PlayerControlsSharedKt.RenderPlayerButton (cognitive 267)app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:92
FileSystemBrowserScreenKt.FileSystemBrowserScreen (cognitive 147)app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:155
VideoCardKt.VideoCard (cognitive 135)app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:59

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

What to do

  1. Bring the 10 bodies over 60 down to 60 or less in Cognitive Complexity — start with GestureHandlerKt.GestureHandler (cognitive 414), PlayerControlsKt.PlayerControls (cognitive 270), PlayerControlsSharedKt.RenderPlayerButton (cognitive 267). — 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 10 together lifts Cognitive Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

77 god class(es) detected.

MethodTooLong: GestureHandlerKt.GestureHandler · ×53app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:78
FileTooLong: player/PlayerActivity.kt · ×15app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt
ClassTooLong: PlayerActivity · ×5app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:82
TooManyMethods: PlayerActivity · ×2app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:82
FunctionTooLong: header.Header · ×2website/components/sections/header.tsx:19

What to do

  1. Resolve the 53 MethodTooLong finding(s) in God Classes — start with FileSystemBrowserScreen.kt (4), Seekbar.kt (3), PlaylistSheet.kt (3). — One of this dimension's main actionable groups (53 warning-level).
  2. Resolve the 15 FileTooLong finding(s) in God Classes — start with PlayerActivity.kt, PlayerViewModel.kt, FileSystemBrowserScreen.kt. — One of this dimension's main actionable groups (15 warning-level).
  3. Resolve the 5 ClassTooLong finding(s) in God Classes — start with PlayerActivity.kt, PlayerViewModel.kt, NetworkStreamingProxy.kt. — One of this dimension's main actionable groups (5 warning-level).

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

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

175 duplicated block group(s) detected. 14.0 % of the production lines (7,806 of 55,693) are in a reported copy. A further 45 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (13 lines × 2) · ×10app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:44
Duplicated block (11 lines × 2) · ×8app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:61
Duplicated block (9 lines × 2) · ×8app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:68
Duplicated block (10 lines × 2) · ×7app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:315
Duplicated block (17 lines × 2) · ×6app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:69

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

What to do

  1. Resolve the 10 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with FileSystemBrowserScreen.kt (2), OutlinedNumericChooser.kt, FolderListScreen.kt. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 8 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with SliderItem.kt, SortDialog.kt, PlayerViewModel.kt. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 8 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with FileSystemBrowserScreen.kt (2), NetworkStreamingProxy.kt (2), OutlinedNumericChooser.kt. — One of this dimension's main actionable groups (8 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

3 production modules (Gradle+npm), 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 3 (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.6 / 10Stronggated by 1 serious finding✓ 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.6 / 10 · rule-coverage 100% · ceiling Verified

1 of 31 classes have LCOM4 above 3.

Low cohesion: PlayerViewModel (LCOM4 5)app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:80

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with PlayerViewModel.kt. — One of this dimension's main actionable groups (1 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 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 14 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 3 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 10 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. A further 20 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares package.json, 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 Hotspots9.3 / 10Stronggated by 4 serious findings✓ Tool-verified

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

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

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

Top hotspots: app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt (9×40=360); app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt (6×34=204); app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt (2×59=118)

Hotspot: app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt · ×4app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:163

What to do

  1. Resolve the 4 Hotspot finding(s) in Churn × Complexity Hotspots — start with VideoListViewModel.kt, VideoListScreen.kt, VideoCard.kt. — One of this dimension's main actionable groups (4 warning-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

TodoComment · ×3app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerControlsPreferencesScreen.kt:381

What to do

  1. Resolve the 3 TodoComment finding(s) in Explicit Debt — start with PlayerButtonChip.kt (2), PlayerControlsPreferencesScreen.kt. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.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. 2 document(s) read across 3 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 foundapp/build.gradle.kts:5

What to do

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

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

D21 · Naming Consistency4.4 / 10Weak✓ 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 4.4 / 10 · rule-coverage 100% · ceiling Verified

1 naming inconsistencies among 18 declarations measured against a convention their peers follow.

`isURLValid` spells `URL` where 17 names in the project spell it `Url`app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaUtils.kt:145

What to do

  1. Resolve the 1 `isURLValid` spells `URL` where 17 names in the project spell it `Url` finding(s) in Naming Consistency — start with MediaUtils.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.

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

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

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

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

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

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

What to do

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

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)3.1 / 10Weak✓ 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 3.1 / 10 · rule-coverage 100% · ceiling Documented

30 finding(s): 0 critical, 24 high, 6 medium, 0 low. 19 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  3. No action in Static Analysis (SAST) — all 19 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (19 issue-level, 0 of them charged here).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness9.8 / 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 9.8 / 10 · rule-coverage 100% · ceiling Documented

2 of 162 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/app/marlboroadvance/mpvex/domain/anime4k/Anime4KManager.kt. Counted over 162 of the 221 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×2app/src/main/java/app/marlboroadvance/mpvex/domain/anime4k/Anime4KManager.kt:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.3 / 10Stronggated by 5 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.3 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: VideoCard.kt↔VideoListScreen.kt 64%; MediaFileRepository.kt↔PlayerActivity.kt 60%; FileSystemBrowserScreen.kt↔VideoListScreen.kt 58%

Change coupling: PlayerControls.kt ↔ Seekbar.kt · ×3app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1
Change-coupling hub: VideoListScreen.kt → DatabaseModule.kt, VideoCard.kt, FileSystemBrowserScreen.kt, FolderListScreen.kt · ×2app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with PlayerControls.kt, PlayerControlsShared.kt, PlayerPreferences.kt. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with VideoListScreen.kt, PlayerActivity.kt. — One of this dimension's main actionable groups (2 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

AC2 · Forms & labels5.7 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. — website/components/sections/header.tsx:191

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC4 · Keyboard semantics10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety3.5 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • <span> moves — its `animate-ping` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — website/components/sections/hero.tsx:79

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.5 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

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

  • `PlaylistDao` declares 29 abstract methods: `insertPlaylist`, `updatePlaylist`, `deletePlaylist`, `observeAllPlaylists`, `getAllPlaylists`, `getPlaylistById`, `observePlaylistById`, `insertPlaylistItem`, `insertPlaylistItems`, `updatePlaylistItem`, `deletePlaylistItem`, `deletePlaylistItems`, `deletePlaylistItemById`, `deletePlaylistItemsByIds`, `observePlaylistItems`, `getPlaylistItems`, `getPlaylistItemCount`, `observePlaylistItemCount`, `deleteAllItemsFromPlaylist`, `deleteItemsByFilePath`, `deleteItemsByFilePaths`, `updateItemPosition`, `getMaxPosition`, `updatePlayHistory`, `getRecentlyPlayedInPlaylist`, `observeRecentlyPlayedInPlaylist`, `getPlaylistItemByPath`, `getPlaylistItemsWindow`, `getPlaylistItemsInRange`. 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/app/marlboroadvance/mpvex/database/dao/PlaylistDao.kt:15
  • `RecentlyPlayedDao` declares 21 abstract methods: `insert`, `deleteExistingEntriesForFile`, `getByFilePath`, `getLastPlayed`, `observeLastPlayed`, `getLastPlayedForHighlight`, `observeLastPlayedForHighlight`, `getRecentlyPlayed`, `observeRecentlyPlayed`, `getRecentlyPlayedBySource`, `clearAll`, `deleteOlderThan`, `deleteByFilePath`, `deleteByPlaylistId`, `updateFilePath`, `updateVideoTitle`, `updateVideoMetadata`, `getRecentlyPlayedPlaylists`, `observeRecentlyPlayedPlaylists`, `getAllRecentlyPlayed`, `insertAll`. 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/app/marlboroadvance/mpvex/database/dao/RecentlyPlayedDao.kt:11

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
C1 · Data Protection0.0 / 10Critical✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

  • No encryption usage (javax.crypto's Cipher in ENCRYPT_MODE, Tink, Jasypt, Spring Security's Encryptors, Jetpack Security's EncryptedSharedPreferences or EncryptedFile, the Android Keystore, SQLCipher, pgcrypto) was found, and this repository persists personal data in the model cited here — sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore. — app/src/main/java/app/marlboroadvance/mpvex/domain/network/NetworkConnection.kt:18

What to do

  • Encrypt sensitive data at rest (open the store encrypted — SQLCipher's SupportFactory for Room, a Realm encryptionKey — or encrypt the fields with Tink's AEAD or an AES/GCM Cipher, or use Jetpack Security's EncryptedSharedPreferences on Android) keeping its key in the Android Keystore or a vault, and manage server-side keys in a vault (AWS KMS / Secrets Manager, GCP KMS / Secret Manager, Azure Key Vault, HashiCorp Vault). Skip if delegated to infra (Postgres TDE, KMS, etc.).
  • Enforce HTTPS on the server that receives this data: terminate TLS in it (Ktor's sslConnector, Spring's server.ssl and requiresSecure, Netty's SslContextBuilder.forServer) and send Strict-Transport-Security (Ktor's HttpsRedirect), or run it behind a TLS-terminating proxy, so data in transit is always encrypted.
C4 · Data Retention6.5 / 10Adequate✓ Tool-verified

Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

  • A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.

What to do

  • Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
DM11 · Constructible invalid state3.0 / 10Weak✓ Tool-verified

Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.

Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule / an XException.ThrowIf* helper). C#: a static factory beside a public constructor does not exempt it, and a public parameterless constructor followed by public raw-primitive setters that refuse nothing is charged when the type also declares a validating way in (a guarded constructor or a guarding static method returning the type); TypeScript: a static Create/Of/From/New factory exempts the type. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.

  • `PlaybackStateEntity`'s public constructor takes `mediaTitle`, `playbackSpeed`, `subSpeed`, `externalSubtitles` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PlaybackStateEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaybackStateEntity.kt:7
  • `PlaylistEntity`'s public constructor takes `name`, `m3uSourceUrl` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PlaylistEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaylistEntity.kt:7
  • `PlaylistItemEntity`'s public constructor takes `filePath`, `fileName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PlaylistItemEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaylistItemEntity.kt:19
  • `RecentlyPlayedEntity`'s public constructor takes `filePath`, `fileName`, `videoTitle`, `launchSource` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `RecentlyPlayedEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/app/marlboroadvance/mpvex/database/entities/RecentlyPlayedEntity.kt:7
  • `VideoMetadataEntity`'s public constructor takes `path`, `subtitleCodec` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `VideoMetadataEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/app/marlboroadvance/mpvex/database/entities/VideoMetadataEntity.kt:11
  • `NetworkConnection`'s public constructor takes `name`, `host`, `username`, `password`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NetworkConnection` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/app/marlboroadvance/mpvex/domain/network/NetworkConnection.kt:10

What to do

  • Give each aggregate one way in that can refuse — a guarded constructor, value-object parameters that validate themselves, or a private constructor behind a factory that returns a failure.
DM12 · Ambient inputs in the domain10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.

Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.

DM4 · Rich vs anemic model3.0 / 10Weak✓ Tool-verified

Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

  • `NetworkConnection` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/app/marlboroadvance/mpvex/domain/network/NetworkConnection.kt:10

What to do

  • Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — the clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

DM7 · Repository granularity10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether repositories are per aggregate root (not per child entity) and keep the persistence query handle behind the contract, so the root's invariants can't be bypassed.

Method: Roslyn (DDD-gated): repository abstraction detection; repositories over non-aggregate-root entities flagged, and (C#/VB) repository INTERFACES whose members return a live persistence query handle (IQueryable/DbSet/IMongoQueryable) — implementations and specification evaluators are out of population by design, since composing a query internally is what an implementation is for. Deterministic, DDD-native.

Coverage: Population: repositories + aggregate roots by NAME convention; per-root repository rule checked within the set.

DM9 · Scattered domain decisions10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.

Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.

M1 · Documentation (README)7.7 / 10Strong✓ Tool-verified

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

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

What to do

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

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

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

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

What to do

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

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

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

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

P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

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

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

What to do

  • Run the test suite in CI via an explicit runner step (`./gradlew test` for the toolchain this pipeline already uses) and gate merges on it.
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 242 JVM, JavaScript/TypeScript production file(s) this check read across 2 module(s). Each was searched for its ecosystem's logging libraries (JVM: SLF4J, Log4j2, java.util.logging, Logback, kotlin-logging, scala-logging; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) 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) as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4
  • `website/package.json` 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`. — website/package.json:49

What to do

  • Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — 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.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

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.

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

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

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

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

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

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

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

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

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

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether functions that make a cancellable request accept or pass on an AbortSignal or the coroutine's cancellation (adoption curve).

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

  • Only 0/5 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; Ktor, OkHttp newCall, URL streams) accept an AbortSignal or the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` () and hand it to the request; in a Kotlin suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `getRepositoryContributors` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — website/lib/github.ts:25
  • `getContributorDetails` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — website/lib/github.ts:50
  • `getRepositoryStats` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — website/lib/github.ts:75
  • `getLatestRelease` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — website/lib/github.ts:106
  • `getLatestRelease` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — app/src/main/java/app/marlboroadvance/mpvex/utils/update/UpdateFeature.kt:119

What to do

  • Thread an AbortSignal or the coroutine's cancellation through functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

X3 · Exception handling5.2 / 10Adequate✓ Tool-verified

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

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

  • `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×9) — app/src/main/java/app/marlboroadvance/mpvex/utils/update/UpdateFeature.kt:526, app/src/main/java/app/marlboroadvance/mpvex/utils/media/HttpUtils.kt:77, app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1321, …
  • `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×9) — app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:196, app/src/main/java/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:292, app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/ControlLayoutEditorScreen.kt:117, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×9) — app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaInfoOps.kt:51, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkStreamingProvider.kt:70, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkStreamingProvider.kt:141, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. (×13) — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:597, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:606, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:676, …

What to do

  • Swallowed exception (caught, then discarded)
X5 · Nullable reference types10.0 / 10Exemplary✓ Tool-verified

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

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

WCAG coverage — what static analysis assessed

Statically assessed 12 of 55 WCAG 2.2 Level A/AA success criteria (22%; ≈24% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 43 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 43 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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 Health59.2Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture87.3Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity57.3Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness23.4Critical — gated by D8, P2, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security36.6Weak — gated by D29, D36, C1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling62.7Adequate — gated by DM4, DM11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility68.2Adequate — gated by AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100.0ExemplaryStrongest area.
Unscored — 2 check(s) recorded observations but carry no score

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

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

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

  • C3 Audit Trail — Repo shows no audit-logging mechanism (an audit-log table or model — an Exposed table, a data class, a Room entity or a SQL migration's table named for it — Hibernate Envers' @Audited, a JPA entity listener, Hibernate event listener or jOOQ RecordListener that records each change) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 61 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 image/media element found in the parsed markup — AC1 not applicable here.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • 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: r:2.2.0. > Could not get resource 'https://www.jitpack.io/com/github/nanihadesuka/LazyColumnScrollbar/2.2.0/LazyColumnScrollbar-2.2.0.pom'. > Could not GET 'https://www.jitpack.io…; 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.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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 — Not scored — a Gradle build resolved 346 artifact(s) across its subprojects (132 behind a shipped release, reported), but the currency signal was not established over the whole graph, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .kt source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
  • DM10 One transaction, one aggregate — no repository writes detected — no operation to judge against the one-aggregate rule
  • DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM8 Value-object opportunities — not scored — the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show one)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Kotlin was read, and it logs through none that an assembled message defeats: Android's `Log` and Timber, java.util.logging and log4j-api-kotlin take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J, log4j 2 or kotlin-logging (`LoggerFactory.getLogger`, `KotlinLogging.logger {}`) would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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 — 26 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Link with no accessible name · ×1
  • Link with no accessible name website/components/sections/header.tsx:191 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
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 — 510 finding(s)
D3 · God Classes · MethodTooLong · ×53
  • MethodTooLong: GestureHandlerKt.GestureHandler app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:78 — MethodTooLong — GestureHandler runs 580 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 480 over it, 5.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlayerControlsSharedKt.RenderPlayerButton app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:92 — MethodTooLong — RenderPlayerButton runs 550 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 450 over it, 5.50× 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: FileSystemBrowserScreenKt.FileSystemBrowserScreen app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:155 — MethodTooLong — FileSystemBrowserScreen runs 535 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 435 over it, 5.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: AdvancedPreferencesScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:76 — MethodTooLong — Content runs 392 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 292 over it, 3.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: FolderListScreen.MediaStoreFolderListContent app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:144 — MethodTooLong — MediaStoreFolderListContent 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: PlaylistDetailScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:103 — MethodTooLong — Content runs 295 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 195 over it, 2.95× 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: VideoListScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:126 — MethodTooLong — Content runs 291 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 191 over it, 2.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AboutScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AboutScreen.kt:78 — MethodTooLong — Content runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlayerPreferencesScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerPreferencesScreen.kt:41 — MethodTooLong — Content runs 254 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 154 over it, 2.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GesturePreferencesScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:54 — MethodTooLong — Content runs 239 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 139 over it, 2.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlaylistActionSheetKt.PlaylistActionSheet app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:50 — MethodTooLong — PlaylistActionSheet runs 236 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RecentlyPlayedScreenKt.RecentItemsContent app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:419 — MethodTooLong — RecentItemsContent runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RecentlyPlayedScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:91 — MethodTooLong — Content runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ControlLayoutEditorScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/ControlLayoutEditorScreen.kt:65 — MethodTooLong — Content runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PermissionDeniedStateKt.PermissionDeniedState app/src/main/java/app/marlboroadvance/mpvex/ui/browser/states/PermissionDeniedState.kt:66 — MethodTooLong — PermissionDeniedState runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VideoListScreenKt.VideoListContent app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:563 — MethodTooLong — VideoListContent runs 207 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 107 over it, 2.07× 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: PlaylistScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:88 — MethodTooLong — Content runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× 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: PreferencesScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PreferencesScreen.kt:50 — MethodTooLong — Content 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: PlayerSheetsKt.PlayerSheets app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerSheets.kt:35 — MethodTooLong — PlayerSheets runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SubtitlesPreferencesScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/SubtitlesPreferencesScreen.kt:73 — MethodTooLong — Content runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.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: SeekbarKt.SquigglySeekbar app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:269 — MethodTooLong — SquigglySeekbar runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FilePickerDialogKt.FilePickerDialog app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:57 — MethodTooLong — FilePickerDialog 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: FolderPickerDialogKt.FolderPickerDialog app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:50 — MethodTooLong — FolderPickerDialog 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: DecoderPreferencesScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/DecoderPreferencesScreen.kt:57 — MethodTooLong — Content 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: PlayerControlsPreferencesScreen.Content app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerControlsPreferencesScreen.kt:74 — MethodTooLong — Content runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 28 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×22
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaInfoOps.kt:51 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkStreamingProvider.kt:70 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkStreamingProvider.kt:141 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:451 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:597 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:606 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:617 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:676 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:681 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:832 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:836 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:840 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:844 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:848 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:304 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:166 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:170 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:174 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:389 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:393 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:397 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt:165 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×18
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/utils/update/UpdateFeature.kt:526 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:196 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/utils/media/HttpUtils.kt:77 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:292 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/ControlLayoutEditorScreen.kt:117 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/ControlLayoutEditorScreen.kt:134 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/ControlLayoutEditorScreen.kt:172 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1321 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:224 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:88 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:827 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:267 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:495 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:689 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:822 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:142 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/presentation/crash/CrashActivity.kt:128 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/app/marlboroadvance/mpvex/preferences/preference/AndroidPreference.kt:207 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D3 · God Classes · FileTooLong · ×15
  • FileTooLong: player/PlayerActivity.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt — FileTooLong — 1887 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: PlayerActivity (82-3652). The bar is 500 significant lines; this is 1387 over it, 3.77× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: player/PlayerViewModel.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt — FileTooLong — 1087 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: PlayerViewModel (80-1794). The bar is 500 significant lines; this is 587 over it, 2.17× 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: filesystem/FileSystemBrowserScreen.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt — FileTooLong — 1074 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 574 over it, 2.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: controls/PlayerControls.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt — FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: LocalPlayerButtonsClickEvent (131-1253). The bar is 500 significant lines; this is 482 over it, 1.96× 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: folderlist/FolderListScreen.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt — FileTooLong — 882 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 382 over it, 1.76× 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: controls/GestureHandler.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt — FileTooLong — 780 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 280 over it, 1.56× 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: videolist/VideoListScreen.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt — FileTooLong — 757 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 257 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: media/CopyPasteOps.kt app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt — FileTooLong — 703 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 203 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: controls/PlayerControlsShared.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt — FileTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 139 over it, 1.28× 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: sheets/PlaylistSheet.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt — FileTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 92 over it, 1.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: playlist/PlaylistDetailScreen.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt — FileTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 75 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: components/Seekbar.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt — FileTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 52 over it, 1.10× 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: recentlyplayed/RecentlyPlayedScreen.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt — FileTooLong — 529 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 29 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: proxy/NetworkStreamingProxy.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt — FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: NetworkStreamingProxy (27-889). The bar is 500 significant lines; this is 28 over it, 1.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: sheets/FrameNavigationSheet.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.kt — FileTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 14 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×10
  • Duplicated block (13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:44 — app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:44-56 | app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:106-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:44` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:321 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:321-333 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:160-172 — 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 (13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1154 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1154-1166 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1336-1348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1154` it begins part-way through the construct above it, so those exact lines 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:222 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:222-234 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:160-172 — 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:218` calls `mutableStateOf` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:157` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:417 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:417-429 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:559-571 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:693 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:693-705 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:791-803 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:693` 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:214 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:214-226 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:463-475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:214` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/player/MediaPlaybackService.kt:448 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/MediaPlaybackService.kt:448-460 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/MediaPlaybackService.kt:498-510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/MediaPlaybackService.kt:448` it begins part-way through the construct above it, so those exact lines 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/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:174 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:174-186 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:273-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:174` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:287` calls `Column`, `spacedBy` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:187` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:200 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:200-212 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:506-518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×8
  • Duplicated block (11 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:61 — app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:61-71 | app/src/main/java/app/marlboroadvance/mpvex/presentation/components/TintedSliderItem.kt:60-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:529 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:529-539 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:555-565 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:529` 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/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:737 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:737-747 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:752-762 — both copies are in the same file, so extract the 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:748 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:748-758 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:796-806 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:748` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `null` to `color = if (loopA !=` in one and `color = if (loopB !=` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:614 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:614-624 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaFormatUtils.kt:40-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:614` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:107 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:107-117 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:144-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:107` 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/app/marlboroadvance/mpvex/ui/browser/cards/NetworkFolderCard.kt:80 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkFolderCard.kt:80-90 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkVideoCard.kt:98-108 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkFolderCard.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkVideoCard.kt` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkFolderCard.kt:80` 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:255 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:255-265 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:277-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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:255` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×8
  • Duplicated block (9 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:68 — app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:68-76 | app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:132-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:68` 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:197 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:197-205 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:188-196 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:527 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:527-535 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:294-302 — 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/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:294` it begins part-way through the construct above it, so those exact lines 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:592 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:592-600 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:671-679 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:592` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:482 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:482-490 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:492-500 — both copies are in the same file, so extract the 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/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:479` calls `Color`, `toPx` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:490` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt:52 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt:52-60 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsPanel.kt:52-60 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsPanel.kt` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt:52` 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/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsDebandCard.kt:125 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsDebandCard.kt:125-133 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsFiltersCard.kt:67-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsDebandCard.kt:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:277 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:277-285 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:698-706 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:277` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×7
  • Duplicated block (10 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:315 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:315-324 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:179-188 — 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:315` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:402 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:402-411 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:819-828 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AboutScreen.kt:109 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AboutScreen.kt:109-118 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AboutScreen.kt:501-510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/preferences/AboutScreen.kt:109` 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/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:262 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:262-271 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/M3UParser.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/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:262` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/utils/permission/PermissionUtils.kt:82 — app/src/main/java/app/marlboroadvance/mpvex/utils/permission/PermissionUtils.kt:82-91 | app/src/main/java/app/marlboroadvance/mpvex/utils/permission/PermissionUtils.kt:103-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/utils/permission/PermissionUtils.kt:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:229 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:229-238 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:410-419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:229` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AspectRatioSheet.kt:180 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AspectRatioSheet.kt:180-189 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AspectRatioSheet.kt:206-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AspectRatioSheet.kt:180` it does not close everything it opens, so those 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) · ×6
  • Duplicated block (17 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:69 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:69-85 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/EditConnectionDialog.kt:70-86 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/EditConnectionDialog.kt` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:69` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/DeleteConfirmationDialog.kt:129 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/DeleteConfirmationDialog.kt:129-145 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/RenameDialog.kt:135-151 — 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/app/marlboroadvance/mpvex/ui/browser/dialogs/DeleteConfirmationDialog.kt:129` 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1515 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1515-1531 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:988-1004 — 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1515` it begins part-way through the construct above it, so those 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/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:1005` calls `onRefresh` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1532` 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 × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:89 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:89-105 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:126-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:89` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/preferences/AudioPreferencesScreen.kt:88 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AudioPreferencesScreen.kt:88-104 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/SubtitlesPreferencesScreen.kt:168-184 — 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/app/marlboroadvance/mpvex/ui/preferences/AudioPreferencesScreen.kt:88` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:312 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:312-328 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:341-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×6
  • Duplicated block (15 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:196 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:196-210 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:281-295 — 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/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:540 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:540-554 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:578-592 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:540` it begins part-way through the construct above it, so those exact lines 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1209 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1209-1223 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:857-871 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1209` it begins part-way through the construct above it, so those exact lines 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/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:395 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:395-409 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:418-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/components/FloatingBottomBar.kt:80 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/components/FloatingBottomBar.kt:80-94 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/components/FloatingBottomBar.kt:96-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/components/FloatingBottomBar.kt:80` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:313 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:313-327 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:734-748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:313` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:750` calls `withReadTimeout` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:329` 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.
DM11 · Constructible invalid state · Constructible in an invalid state · ×6
  • Constructible in an invalid state: PlaybackStateEntity app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaybackStateEntity.kt:7 — `PlaybackStateEntity`'s public constructor takes `mediaTitle`, `playbackSpeed`, `subSpeed`, `externalSubtitles` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PlaybackStateEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: PlaylistEntity app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaylistEntity.kt:7 — `PlaylistEntity`'s public constructor takes `name`, `m3uSourceUrl` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PlaylistEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: PlaylistItemEntity app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaylistItemEntity.kt:19 — `PlaylistItemEntity`'s public constructor takes `filePath`, `fileName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PlaylistItemEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: RecentlyPlayedEntity app/src/main/java/app/marlboroadvance/mpvex/database/entities/RecentlyPlayedEntity.kt:7 — `RecentlyPlayedEntity`'s public constructor takes `filePath`, `fileName`, `videoTitle`, `launchSource` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `RecentlyPlayedEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: VideoMetadataEntity app/src/main/java/app/marlboroadvance/mpvex/database/entities/VideoMetadataEntity.kt:11 — `VideoMetadataEntity`'s public constructor takes `path`, `subtitleCodec` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `VideoMetadataEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: NetworkConnection app/src/main/java/app/marlboroadvance/mpvex/domain/network/NetworkConnection.kt:10 — `NetworkConnection`'s public constructor takes `name`, `host`, `username`, `password`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NetworkConnection` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
D3 · God Classes · ClassTooLong · ×5
  • ClassTooLong: PlayerActivity app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:82 — ClassTooLong — 1825 significant lines (blank, comment-only and punctuation-only lines excluded), 103 methods. The bar is 400 significant lines; this is 1425 over it, 4.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlayerViewModel app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:80 — ClassTooLong — 1000 significant lines (blank, comment-only and punctuation-only lines excluded), 88 methods. The bar is 400 significant lines; this is 600 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NetworkStreamingProxy app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:27 — ClassTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 108 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.
  • ClassTooLong: SearchablePreference app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/SearchablePreference.kt:11 — ClassTooLong — 477 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 77 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RecentlyPlayedViewModel app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:32 — ClassTooLong — 447 significant lines (blank, comment-only and punctuation-only lines excluded), 13 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×5
  • Duplicated block (12 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:295 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:295-306 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:311-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:295` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:906 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:906-917 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:884-895 — 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:906` 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/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:650 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:650-661 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:663-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.
  • Duplicated block (12 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:233 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:233-244 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:486-497 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt:37 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt:37-48 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsPanel.kt:37-48 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsPanel.kt` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D15 · Churn × Complexity Hotspots · Hotspot · ×4
  • Hotspot: app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:163 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in VideoListViewModel.loadVideos at line 163. 4 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 19:44:08 +05:30' --until='2026-10-24 19:44:08 +05:30' --full-history --no-merges -- app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.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/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:126 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in VideoListScreen.Content at line 126. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 19:44:08 +05:30' --until='2026-10-24 19:44:08 +05:30' --full-history --no-merges -- app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.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/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:59 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in VideoCardKt.VideoCard at line 59. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 19:44:08 +05:30' --until='2026-10-24 19:44:08 +05:30' --full-history --no-merges -- app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:144 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in FolderListScreen.MediaStoreFolderListContent at line 144. 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-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 19:44:08 +05:30' --until='2026-10-24 19:44:08 +05:30' --full-history --no-merges -- app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.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 (22 lines × 2) · ×4
  • Duplicated block (22 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:894 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:894-915 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:441-462 — 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:894` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1063 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1063-1084 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:162-183 — 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1063` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:283 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:283-304 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:371-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/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:283` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:739 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:739-760 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:801-822 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:739` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×4
  • Duplicated block (18 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:327 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:327-344 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkVideoCard.kt:134-151 — 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/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:327` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1197 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1197-1214 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1371-1388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1197` 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/app/marlboroadvance/mpvex/ui/browser/sheets/PlayLinkSheet.kt:85 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlayLinkSheet.kt:85-102 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:62-79 — 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/app/marlboroadvance/mpvex/ui/browser/sheets/PlayLinkSheet.kt:85` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:936 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:936-953 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1143-1160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:936` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1496 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1496-1511 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:991-1006 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1496` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:345 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:345-360 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:722-737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:345` it begins part-way through the construct above it, so those exact lines 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/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:575 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:575-590 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:796-811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:575` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/utils/history/RecentlyPlayedOps.kt:76 — app/src/main/java/app/marlboroadvance/mpvex/utils/history/RecentlyPlayedOps.kt:76-91 | app/src/main/java/app/marlboroadvance/mpvex/utils/history/RecentlyPlayedOps.kt:94-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:209 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:209-222 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:334-347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:207 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:207-220 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:371-384 — 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:207` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:148 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:148-161 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:193-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:148` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:145 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:145-158 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerControlsPreferencesScreen.kt:296-309 — 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/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×4
  • Duplicated block (8 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkVideoCard.kt:111 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkVideoCard.kt:111-118 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:557-564 — 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/app/marlboroadvance/mpvex/ui/browser/cards/NetworkVideoCard.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 (8 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1046 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1046-1053 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1056-1063 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1046` it begins part-way through the construct above it, so those exact lines 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/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AspectRatioSheet.kt:92 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AspectRatioSheet.kt:92-99 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AspectRatioSheet.kt:118-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AspectRatioSheet.kt:92` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:991 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:991-998 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:403-410 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:991` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X2 · Cancellation propagation · Async function without AbortSignal · ×4
  • Async function without AbortSignal: getRepositoryContributors website/lib/github.ts:25 — `getRepositoryContributors` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getContributorDetails website/lib/github.ts:50 — `getContributorDetails` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getRepositoryStats website/lib/github.ts:75 — `getRepositoryStats` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getLatestRelease website/lib/github.ts:106 — `getLatestRelease` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
D17 · Explicit Debt · TodoComment · ×3
  • TodoComment app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerControlsPreferencesScreen.kt:381 — // TODO: strings — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/components/PlayerButtonChip.kt:80 — // TODO: strings — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/components/PlayerButtonChip.kt:97 — // TODO: strings — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: PlayerControls.kt ↔ Seekbar.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1 — `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `abebda15` Seekbar Bugfixes (#558); `8fba7526` fix: bugfixes (#538); `c3cb7ed4` bugfix: telegram/issues given bugs (#511) — run `git show` on any of them.
  • Change coupling: PlayerControlsShared.kt ↔ MoreSheet.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:1 — `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/MoreSheet.kt` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `88d4eee8` revert: remove ambient mode completely; `004e9601` feat(player): add YouTube-like Ambient Mode with smooth dynamic glow; `79f76481` chore: remove Ambient Mode and Lua scripting functionality — run `git show` on any of them.
  • Change coupling: PlayerPreferences.kt ↔ MoreSheet.kt app/src/main/java/app/marlboroadvance/mpvex/preferences/PlayerPreferences.kt:1 — `app/src/main/java/app/marlboroadvance/mpvex/preferences/PlayerPreferences.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/MoreSheet.kt` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `88d4eee8` revert: remove ambient mode completely; `004e9601` feat(player): add YouTube-like Ambient Mode with smooth dynamic glow; `79f76481` chore: remove Ambient Mode and Lua scripting functionality — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×3
  • Edited copy of a member (15 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:613 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:613-628 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaFormatUtils.kt:39-53 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:162 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:162-176 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt:116-133 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:261 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:261-275 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:280-295 — 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 (17 corresponding lines) · ×3
  • Edited copy of a member (17 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/utils/permission/PermissionUtils.kt:81 — app/src/main/java/app/marlboroadvance/mpvex/utils/permission/PermissionUtils.kt:81-97 | app/src/main/java/app/marlboroadvance/mpvex/utils/permission/PermissionUtils.kt:102-118 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:983 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:983-999 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/selection/SelectionManager.kt:145-168 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/App.kt:63 — app/src/main/java/app/marlboroadvance/mpvex/App.kt:63-81 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListViewModel.kt:279-295 — 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 · Duplicated block (21 lines × 2) · ×3
  • Duplicated block (21 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:386 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:386-406 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:359-379 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:386` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:759 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:759-779 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:828-848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:759` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1474 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1474-1494 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1526-1546 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1474` 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 (17–18 lines × 2) · ×3
  • Duplicated block (17–18 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:97 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:97-113 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkStreamingScreen.kt:125-142 — 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:97` 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:96` calls `removeLastOrNull` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkStreamingScreen.kt:124` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17–18 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:264 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:264-280 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:488-505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:264` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (17–18 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:252 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:252-269 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:360-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:252` 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/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:188 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:188-199 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:226-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.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. 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:1068 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:1068-1078 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:1103-1114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:1068` it begins part-way through the construct above it, so those 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:1066` calls `spacedBy` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:1103` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11–12 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:213 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:213-224 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:346-356 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:213` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:563 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:563-572 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:582-591 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:803-812 — 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/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:563` 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 × 3) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:88 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:88-97 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:153-162 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:205-214 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:204` calls `emit` and `app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:87` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:479 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:479-490 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:531-540 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:557-566 — 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/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:479` it begins part-way through the construct above it, so those 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 × 2) · ×3
  • Duplicated block (7 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:337 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:337-343 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:714-720 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:337` it does not close everything it opens, so those exact lines 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/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:636 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:636-642 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:645-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.
  • Duplicated block (7 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:640 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:640-646 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:749-755 — both copies are in the same file, so extract the 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: PlayerActivity app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:82 — TooManyMethods — 103 methods. The bar is 30 methods; this is 73 over it, 3.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlayerViewModel app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:80 — TooManyMethods — 88 methods. The bar is 30 methods; this is 58 over it, 2.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · FunctionTooLong · ×2
  • FunctionTooLong: header.Header website/components/sections/header.tsx:19 — FunctionTooLong — Header runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: hero.HeroSection website/components/sections/hero.tsx:16 — FunctionTooLong — HeroSection 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.
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: VideoListScreen.kt → DatabaseModule.kt, VideoCard.kt, FileSystemBrowserScreen.kt, FolderListScreen.kt app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt — `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt` changes together with 4 other files — `app/src/main/java/app/marlboroadvance/mpvex/di/DatabaseModule.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: PlayerActivity.kt → MediaFileRepository.kt, PlayerSheets.kt, MoreSheet.kt app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt — `app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt` changes together with 3 other files — `app/src/main/java/app/marlboroadvance/mpvex/repository/MediaFileRepository.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerSheets.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/MoreSheet.kt` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:179 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:179-312 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:337-410 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt:136-175 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:504-621 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:626-692 — 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/app/marlboroadvance/mpvex/ui/preferences/AppearancePreferencesScreen.kt:48 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AppearancePreferencesScreen.kt:48-270 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerControlsPreferencesScreen.kt:74-331 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerPreferencesScreen.kt:41-419 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PreferencesScreen.kt:50-360 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/SettingsSearchScreen.kt:65-229 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:62 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:62-210 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:304-351 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:56-295 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:390-478 — 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/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:76 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:76-672 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AudioPreferencesScreen.kt:43-192 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/DecoderPreferencesScreen.kt:57-295 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:54-398 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×2
  • Edited copy of a member (20 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:493 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:493-521 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:531-550 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1442 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1442-1461 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1591-1612 — 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 (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/AudioDelayPanel.kt:88 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/AudioDelayPanel.kt:88-106 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleDelayPanel.kt:243-261 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/CopyPasteDialog.kt:296 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/CopyPasteDialog.kt:296-314 | app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt:461-484 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 7+ corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/database/repository/VideoMetadataCacheRepository.kt:365 — app/src/main/java/app/marlboroadvance/mpvex/database/repository/VideoMetadataCacheRepository.kt:365-371 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:360-366 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:601-611 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1558 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1558-1571 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1748-1754 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:1022-1032 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×2
  • Duplicated block (43 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:564 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:564-606 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:673-715 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:564` 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 (43 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:485 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:485-527 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:675-717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:485` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/database/repository/PlaylistRepository.kt:219 — app/src/main/java/app/marlboroadvance/mpvex/database/repository/PlaylistRepository.kt:219-245 | app/src/main/java/app/marlboroadvance/mpvex/database/repository/PlaylistRepository.kt:260-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/database/repository/PlaylistRepository.kt:219` 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:662 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:662-688 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:760-786 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:662` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:189 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:189-211 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkFolderCard.kt:56-78 — 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/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.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.
  • Duplicated block (23 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:120 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:120-142 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:162-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:120` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/fab/FabScrollHelper.kt:58 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/fab/FabScrollHelper.kt:58-78 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/fab/FabScrollHelper.kt:90-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20–21 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:313 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:313-333 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:563-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:313` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1201 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1201-1220 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.kt:609-628 — 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/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1001 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1001-1020 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1061-1080 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1001` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×2
  • Duplicated block (16 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:234 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:234-249 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:479-494 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:619-634 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:794-809 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:234` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:186 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:186-201 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AudioPreferencesScreen.kt:54-69 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/DecoderPreferencesScreen.kt:69-84 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:69-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:186` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:265 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:265-276 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:546-558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:265` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:518 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:518-530 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:751-762 — 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/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:518` 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 × 4) · ×2
  • Duplicated block (9 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:647 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:647-655 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:407-418 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:481-490 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:709-718 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt` as WHOLE FILES: this scan already matched 7 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. 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:647` 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 × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:655 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:655-663 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:219-227 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:418-426 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:718-726 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt` as WHOLE FILES: this scan already matched 7 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. 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:655` it does not close everything it opens, so those 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) · ×2
  • Duplicated block (6 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:81 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:81-86 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:870-875 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:38 — app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:38-43 | app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:62-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×1
  • Animation without a prefers-reduced-motion guard website/components/sections/hero.tsx:79 — <span> moves — its `animate-ping` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
C1 · Data Protection · No data-protection/encryption · ×1
  • No data-protection/encryption app/src/main/java/app/marlboroadvance/mpvex/domain/network/NetworkConnection.kt:18 — No encryption usage (javax.crypto's Cipher in ENCRYPT_MODE, Tink, Jasypt, Spring Security's Encryptors, Jetpack Security's EncryptedSharedPreferences or EncryptedFile, the Android Keystore, SQLCipher, pgcrypto) was found, and this repository persists personal data in the model cited here — sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore.
D1 · Cyclomatic Complexity · GestureHandlerKt.GestureHandler (cyclomatic 150) · ×1
  • GestureHandlerKt.GestureHandler (cyclomatic 150) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:78 — GestureHandlerKt.GestureHandler has cyclomatic complexity 150 (threshold 15). To reduce it, separate the cases: extract each independent 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 129) · ×1
  • PlayerControlsKt.PlayerControls (cyclomatic 129) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:153 — PlayerControlsKt.PlayerControls has cyclomatic complexity 129 (threshold 15). To reduce it, separate the cases: extract each independent 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 · PlayerControlsSharedKt.RenderPlayerButton (cyclomatic 105) · ×1
  • PlayerControlsSharedKt.RenderPlayerButton (cyclomatic 105) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:92 — PlayerControlsSharedKt.RenderPlayerButton has cyclomatic complexity 105 (threshold 15). To reduce it, separate the cases: extract each independent 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 · FileSystemBrowserScreenKt.FileSystemBrowserScreen (cyclomatic 84) · ×1
  • FileSystemBrowserScreenKt.FileSystemBrowserScreen (cyclomatic 84) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:155 — FileSystemBrowserScreenKt.FileSystemBrowserScreen has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent 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 · VideoCardKt.VideoCard (cyclomatic 59) · ×1
  • VideoCardKt.VideoCard (cyclomatic 59) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:59 — VideoCardKt.VideoCard has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent 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 · VideoStatCache.readVideo (cyclomatic 43) · ×1
  • VideoStatCache.readVideo (cyclomatic 43) app/src/main/java/app/marlboroadvance/mpvex/repository/VideoStatCache.kt:173 — VideoStatCache.readVideo has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent 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 · VideoListViewModel.loadVideos (cyclomatic 40) · ×1
  • VideoListViewModel.loadVideos (cyclomatic 40) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:163 — VideoListViewModel.loadVideos has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackSelector.ensureSubtitleTrackSelected (cyclomatic 39) · ×1
  • TrackSelector.ensureSubtitleTrackSelected (cyclomatic 39) app/src/main/java/app/marlboroadvance/mpvex/ui/player/TrackSelector.kt:218 — TrackSelector.ensureSubtitleTrackSelected has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlaylistDetailScreen.Content (cyclomatic 36) · ×1
  • PlaylistDetailScreen.Content (cyclomatic 36) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:103 — PlaylistDetailScreen.Content 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 · VideoListScreen.Content (cyclomatic 34) · ×1
  • VideoListScreen.Content (cyclomatic 34) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:126 — VideoListScreen.Content has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RecentlyPlayedScreenKt.RecentItemsContent (cyclomatic 33) · ×1
  • RecentlyPlayedScreenKt.RecentItemsContent (cyclomatic 33) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:419 — RecentlyPlayedScreenKt.RecentItemsContent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoListScreenKt.VideoListContent (cyclomatic 33) · ×1
  • VideoListScreenKt.VideoListContent (cyclomatic 33) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:563 — VideoListScreenKt.VideoListContent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaInfoParser.parse (cyclomatic 32) · ×1
  • MediaInfoParser.parse (cyclomatic 32) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaInfoParser.kt:162 — MediaInfoParser.parse 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 · AdvancedPreferencesScreen.Content (cyclomatic 29) · ×1
  • AdvancedPreferencesScreen.Content (cyclomatic 29) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:76 — AdvancedPreferencesScreen.Content 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 · FolderCardKt.FolderCard (cyclomatic 28) · ×1
  • FolderCardKt.FolderCard (cyclomatic 28) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:43 — FolderCardKt.FolderCard 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 · SeekbarKt.SquigglySeekbar (cyclomatic 28) · ×1
  • SeekbarKt.SquigglySeekbar (cyclomatic 28) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:269 — SeekbarKt.SquigglySeekbar has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FolderListScreen.MediaStoreFolderListContent (cyclomatic 26) · ×1
  • FolderListScreen.MediaStoreFolderListContent (cyclomatic 26) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:144 — FolderListScreen.MediaStoreFolderListContent has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecentlyPlayedViewModel.createVideoFromFilePath (cyclomatic 26) · ×1
  • RecentlyPlayedViewModel.createVideoFromFilePath (cyclomatic 26) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:172 — RecentlyPlayedViewModel.createVideoFromFilePath has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SeekbarKt.StandardSeekbar (cyclomatic 26) · ×1
  • SeekbarKt.StandardSeekbar (cyclomatic 26) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:540 — SeekbarKt.StandardSeekbar 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 · ControlLayoutEditorScreen.Content (cyclomatic 24) · ×1
  • ControlLayoutEditorScreen.Content (cyclomatic 24) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/ControlLayoutEditorScreen.kt:65 — ControlLayoutEditorScreen.Content 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 · SmbClient.listFiles (cyclomatic 23) · ×1
  • SmbClient.listFiles (cyclomatic 23) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:187 — SmbClient.listFiles has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RecentlyPlayedScreen.Content (cyclomatic 23) · ×1
  • RecentlyPlayedScreen.Content (cyclomatic 23) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:91 — RecentlyPlayedScreen.Content has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlayerViewModel.getVideoMetadataFromMediaStore (cyclomatic 23) · ×1
  • PlayerViewModel.getVideoMetadataFromMediaStore (cyclomatic 23) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1440 — PlayerViewModel.getVideoMetadataFromMediaStore 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 · NetworkStreamingProxy.getStreamWithOffsetSMB (cyclomatic 22) · ×1
  • NetworkStreamingProxy.getStreamWithOffsetSMB (cyclomatic 22) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:697 — NetworkStreamingProxy.getStreamWithOffsetSMB has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlaylistScreen.Content (cyclomatic 22) · ×1
  • PlaylistScreen.Content (cyclomatic 22) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:88 — PlaylistScreen.Content has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlayerSheetsKt.PlayerSheets (cyclomatic 22) · ×1
  • PlayerSheetsKt.PlayerSheets (cyclomatic 22) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerSheets.kt:35 — PlayerSheetsKt.PlayerSheets has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecentlyPlayedViewModel.formatResolution (cyclomatic 21) · ×1
  • RecentlyPlayedViewModel.formatResolution (cyclomatic 21) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:613 — RecentlyPlayedViewModel.formatResolution has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FilePickerDialogKt.FilePickerDialog (cyclomatic 20) · ×1
  • FilePickerDialogKt.FilePickerDialog (cyclomatic 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:57 — FilePickerDialogKt.FilePickerDialog 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 · FolderListScreenKt.FolderSortDialog (cyclomatic 20) · ×1
  • FolderListScreenKt.FolderSortDialog (cyclomatic 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:874 — FolderListScreenKt.FolderSortDialog 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 · FtpClient.getFileStream (cyclomatic 20) · ×1
  • FtpClient.getFileStream (cyclomatic 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:178 — FtpClient.getFileStream 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 · NetworkStreamingProxy.getStreamWithOffsetFTP (cyclomatic 20) · ×1
  • NetworkStreamingProxy.getStreamWithOffsetFTP (cyclomatic 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:504 — NetworkStreamingProxy.getStreamWithOffsetFTP 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 · VideoListScreenKt.VideoSortDialog (cyclomatic 20) · ×1
  • VideoListScreenKt.VideoSortDialog (cyclomatic 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:849 — VideoListScreenKt.VideoSortDialog 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 · PlayerActivity.handleFileLoaded (cyclomatic 19) · ×1
  • PlayerActivity.handleFileLoaded (cyclomatic 19) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1669 — PlayerActivity.handleFileLoaded has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlayerActivity.onKeyDown (cyclomatic 19) · ×1
  • PlayerActivity.onKeyDown (cyclomatic 19) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2514 — PlayerActivity.onKeyDown has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MediaFormatUtils.formatResolution (cyclomatic 19) · ×1
  • MediaFormatUtils.formatResolution (cyclomatic 19) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaFormatUtils.kt:36 — MediaFormatUtils.formatResolution has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MediaFileRepository.scanDirectory (cyclomatic 18) · ×1
  • MediaFileRepository.scanDirectory (cyclomatic 18) app/src/main/java/app/marlboroadvance/mpvex/repository/MediaFileRepository.kt:408 — MediaFileRepository.scanDirectory 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 · SmbClient.connect (cyclomatic 18) · ×1
  • SmbClient.connect (cyclomatic 18) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:32 — SmbClient.connect 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 · RecentlyPlayedViewModel.loadRecentVideosFromEntities (cyclomatic 18) · ×1
  • RecentlyPlayedViewModel.loadRecentVideosFromEntities (cyclomatic 18) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:64 — RecentlyPlayedViewModel.loadRecentVideosFromEntities 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 · MoreSheetKt.MoreSheet (cyclomatic 18) · ×1
  • MoreSheetKt.MoreSheet (cyclomatic 18) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/MoreSheet.kt:61 — MoreSheetKt.MoreSheet 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 · PlaylistSheetKt.PlaylistSheet (cyclomatic 18) · ×1
  • PlaylistSheetKt.PlaylistSheet (cyclomatic 18) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:230 — PlaylistSheetKt.PlaylistSheet 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 · NetworkStreamingProxy.getFileSizeFTP (cyclomatic 17) · ×1
  • NetworkStreamingProxy.getFileSizeFTP (cyclomatic 17) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:373 — NetworkStreamingProxy.getFileSizeFTP 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 · PlayerActivity.fetchNetworkStreamTitle (cyclomatic 17) · ×1
  • PlayerActivity.fetchNetworkStreamTitle (cyclomatic 17) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1808 — PlayerActivity.fetchNetworkStreamTitle 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 · PlayerUtilsKt.sanitizeJsonString (cyclomatic 17) · ×1
  • PlayerUtilsKt.sanitizeJsonString (cyclomatic 17) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerUtils.kt:200 — PlayerUtilsKt.sanitizeJsonString has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NaturalOrderComparator.compare (cyclomatic 17) · ×1
  • NaturalOrderComparator.compare (cyclomatic 17) app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:131 — NaturalOrderComparator.compare 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 · BrowserTopBarKt.NormalTopBar (cyclomatic 16) · ×1
  • BrowserTopBarKt.NormalTopBar (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/components/BrowserTopBar.kt:136 — BrowserTopBarKt.NormalTopBar 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 · FileSystemBrowserScreenKt.FileSystemBrowserContent (cyclomatic 16) · ×1
  • FileSystemBrowserScreenKt.FileSystemBrowserContent (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1002 — FileSystemBrowserScreenKt.FileSystemBrowserContent 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 · FolderListScreenKt.FolderListContent (cyclomatic 16) · ×1
  • FolderListScreenKt.FolderListContent (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:619 — FolderListScreenKt.FolderListContent 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 · FolderListViewModel.loadVideoFolders (cyclomatic 16) · ×1
  • FolderListViewModel.loadVideoFolders (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListViewModel.kt:312 — FolderListViewModel.loadVideoFolders 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 · RecentlyPlayedViewModel.createVideoFromContentUri (cyclomatic 16) · ×1
  • RecentlyPlayedViewModel.createVideoFromContentUri (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:355 — RecentlyPlayedViewModel.createVideoFromContentUri 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 · MediaInfoActivity.parseMediaInfoText (cyclomatic 16) · ×1
  • MediaInfoActivity.parseMediaInfoText (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt:373 — MediaInfoActivity.parseMediaInfoText 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 · TrackSelector.ensureAudioTrackSelected (cyclomatic 16) · ×1
  • TrackSelector.ensureAudioTrackSelected (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/ui/player/TrackSelector.kt:162 — TrackSelector.ensureAudioTrackSelected 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 · ConfigEditorScreen.Content (cyclomatic 16) · ×1
  • ConfigEditorScreen.Content (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/ConfigEditorScreen.kt:70 — ConfigEditorScreen.Content 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 · MediaInfoOps.extractBasicMetadata (cyclomatic 16) · ×1
  • MediaInfoOps.extractBasicMetadata (cyclomatic 16) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaInfoOps.kt:387 — MediaInfoOps.extractBasicMetadata has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · GestureHandlerKt.GestureHandler (cognitive 414) · ×1
  • GestureHandlerKt.GestureHandler (cognitive 414) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:78 — GestureHandlerKt.GestureHandler has cognitive complexity 414 (threshold 15). Drivers by points: if/else 102 (335 pts), boolean chains 38, match/switch 8 (31 pts), loops 7 (10 pts) (nesting depth added 259). 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 · PlayerControlsKt.PlayerControls (cognitive 270) · ×1
  • PlayerControlsKt.PlayerControls (cognitive 270) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:153 — PlayerControlsKt.PlayerControls has cognitive complexity 270 (threshold 15). Drivers by points: if/else 168 (243 pts), boolean chains 20, match/switch 4 (7 pts) (nesting depth added 78). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerControlsSharedKt.RenderPlayerButton (cognitive 267) · ×1
  • PlayerControlsSharedKt.RenderPlayerButton (cognitive 267) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:92 — PlayerControlsSharedKt.RenderPlayerButton has cognitive complexity 267 (threshold 15). Drivers by points: if/else 138 (253 pts), match/switch 6 (13 pts), boolean chains 1 (nesting depth added 122). 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 · FileSystemBrowserScreenKt.FileSystemBrowserScreen (cognitive 147) · ×1
  • FileSystemBrowserScreenKt.FileSystemBrowserScreen (cognitive 147) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:155 — FileSystemBrowserScreenKt.FileSystemBrowserScreen has cognitive complexity 147 (threshold 15). Drivers by points: if/else 68 (110 pts), boolean chains 19, match/switch 7 (10 pts), error handling 4 (8 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoCardKt.VideoCard (cognitive 135) · ×1
  • VideoCardKt.VideoCard (cognitive 135) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:59 — VideoCardKt.VideoCard has cognitive complexity 135 (threshold 15). Drivers by points: if/else 65 (121 pts), boolean chains 14 (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 · TrackSelector.ensureSubtitleTrackSelected (cognitive 92) · ×1
  • TrackSelector.ensureSubtitleTrackSelected (cognitive 92) app/src/main/java/app/marlboroadvance/mpvex/ui/player/TrackSelector.kt:218 — TrackSelector.ensureSubtitleTrackSelected has cognitive complexity 92 (threshold 15). Drivers by points: if/else 26 (68 pts), loops 8 (15 pts), boolean chains 8, error handling 1 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VideoStatCache.readVideo (cognitive 89) · ×1
  • VideoStatCache.readVideo (cognitive 89) app/src/main/java/app/marlboroadvance/mpvex/repository/VideoStatCache.kt:173 — VideoStatCache.readVideo has cognitive complexity 89 (threshold 15). Drivers by points: if/else 43 (86 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecentlyPlayedScreenKt.RecentItemsContent (cognitive 82) · ×1
  • RecentlyPlayedScreenKt.RecentItemsContent (cognitive 82) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:419 — RecentlyPlayedScreenKt.RecentItemsContent has cognitive complexity 82 (threshold 15). Drivers by points: if/else 41 (71 pts), match/switch 4 (8 pts), boolean chains 3 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaylistDetailScreen.Content (cognitive 76) · ×1
  • PlaylistDetailScreen.Content (cognitive 76) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:103 — PlaylistDetailScreen.Content has cognitive complexity 76 (threshold 15). Drivers by points: if/else 32 (62 pts), boolean chains 9, match/switch 3 (5 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoListScreenKt.VideoListContent (cognitive 68) · ×1
  • VideoListScreenKt.VideoListContent (cognitive 68) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:563 — VideoListScreenKt.VideoListContent has cognitive complexity 68 (threshold 15). Drivers by points: if/else 30 (50 pts), boolean chains 9, loops 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FolderCardKt.FolderCard (cognitive 58) · ×1
  • FolderCardKt.FolderCard (cognitive 58) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:43 — FolderCardKt.FolderCard has cognitive complexity 58 (threshold 15). Drivers by points: if/else 31 (51 pts), boolean chains 7 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerViewModel.getVideoMetadataFromMediaStore (cognitive 55) · ×1
  • PlayerViewModel.getVideoMetadataFromMediaStore (cognitive 55) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1440 — PlayerViewModel.getVideoMetadataFromMediaStore has cognitive complexity 55 (threshold 15). Drivers by points: if/else 28 (50 pts), boolean chains 2, match/switch 2, error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoListScreen.Content (cognitive 53) · ×1
  • VideoListScreen.Content (cognitive 53) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:126 — VideoListScreen.Content has cognitive complexity 53 (threshold 15). Drivers by points: if/else 36 (44 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoListViewModel.loadVideos (cognitive 53) · ×1
  • VideoListViewModel.loadVideos (cognitive 53) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:163 — VideoListViewModel.loadVideos has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (35 pts), boolean chains 17, 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 · MediaInfoParser.parse (cognitive 47) · ×1
  • MediaInfoParser.parse (cognitive 47) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaInfoParser.kt:162 — MediaInfoParser.parse has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (36 pts), boolean chains 10, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FolderListScreen.MediaStoreFolderListContent (cognitive 44) · ×1
  • FolderListScreen.MediaStoreFolderListContent (cognitive 44) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:144 — FolderListScreen.MediaStoreFolderListContent has cognitive complexity 44 (threshold 15). Drivers by points: if/else 27 (37 pts), boolean chains 3, error handling 1 (2 pts), match/switch 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FolderListScreenKt.FolderSortDialog (cognitive 42) · ×1
  • FolderListScreenKt.FolderSortDialog (cognitive 42) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:874 — FolderListScreenKt.FolderSortDialog has cognitive complexity 42 (threshold 15). Drivers by points: if/else 33 (41 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VideoListScreenKt.VideoSortDialog (cognitive 40) · ×1
  • VideoListScreenKt.VideoSortDialog (cognitive 40) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:849 — VideoListScreenKt.VideoSortDialog has cognitive complexity 40 (threshold 15). Drivers by points: if/else 31 (39 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SeekbarKt.SquigglySeekbar (cognitive 39) · ×1
  • SeekbarKt.SquigglySeekbar (cognitive 39) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:269 — SeekbarKt.SquigglySeekbar has cognitive complexity 39 (threshold 15). Drivers by points: if/else 26 (29 pts), boolean chains 8, loops 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 · SeekbarKt.StandardSeekbar (cognitive 36) · ×1
  • SeekbarKt.StandardSeekbar (cognitive 36) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:540 — SeekbarKt.StandardSeekbar has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25 (29 pts), boolean chains 4, match/switch 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 · TrackSelector.ensureAudioTrackSelected (cognitive 35) · ×1
  • TrackSelector.ensureAudioTrackSelected (cognitive 35) app/src/main/java/app/marlboroadvance/mpvex/ui/player/TrackSelector.kt:162 — TrackSelector.ensureAudioTrackSelected has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 3 (6 pts), boolean chains 3, error handling 1 (nesting depth added 18). 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 · AdvancedPreferencesScreen.Content (cognitive 35) · ×1
  • AdvancedPreferencesScreen.Content (cognitive 35) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.kt:76 — AdvancedPreferencesScreen.Content has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 10, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NaturalOrderComparator.compare (cognitive 33) · ×1
  • NaturalOrderComparator.compare (cognitive 33) app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:131 — NaturalOrderComparator.compare has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, loops 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NetworkStreamingProxy.getStreamWithOffsetSMB (cognitive 32) · ×1
  • NetworkStreamingProxy.getStreamWithOffsetSMB (cognitive 32) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:697 — NetworkStreamingProxy.getStreamWithOffsetSMB has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (17 pts), error handling 8 (13 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlaylistScreen.Content (cognitive 31) · ×1
  • PlaylistScreen.Content (cognitive 31) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:88 — PlaylistScreen.Content has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 6, match/switch 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 · RecentlyPlayedViewModel.loadRecentVideosFromEntities (cognitive 31) · ×1
  • RecentlyPlayedViewModel.loadRecentVideosFromEntities (cognitive 31) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:64 — RecentlyPlayedViewModel.loadRecentVideosFromEntities has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4, boolean chains 2, match/switch 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerActivity.handleFileLoaded (cognitive 31) · ×1
  • PlayerActivity.handleFileLoaded (cognitive 31) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1669 — PlayerActivity.handleFileLoaded has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaylistSheetKt.PlaylistSheet (cognitive 31) · ×1
  • PlaylistSheetKt.PlaylistSheet (cognitive 31) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:230 — PlaylistSheetKt.PlaylistSheet has cognitive complexity 31 (threshold 15). Drivers by points: if/else 25 (29 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 · RecentlyPlayedViewModel.createVideoFromFilePath (cognitive 30) · ×1
  • RecentlyPlayedViewModel.createVideoFromFilePath (cognitive 30) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:172 — RecentlyPlayedViewModel.createVideoFromFilePath has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 3, error handling 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FilePickerDialogKt.FilePickerDialog (cognitive 29) · ×1
  • FilePickerDialogKt.FilePickerDialog (cognitive 29) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:57 — FilePickerDialogKt.FilePickerDialog has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 7 (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 · SmbClient.listFiles (cognitive 29) · ×1
  • SmbClient.listFiles (cognitive 29) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:187 — SmbClient.listFiles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (17 pts), error handling 6 (7 pts), boolean chains 4, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RecentlyPlayedScreen.Content (cognitive 28) · ×1
  • RecentlyPlayedScreen.Content (cognitive 28) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:91 — RecentlyPlayedScreen.Content has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 5, match/switch 3 (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 · MoreSheetKt.MoreSheet (cognitive 28) · ×1
  • MoreSheetKt.MoreSheet (cognitive 28) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/MoreSheet.kt:61 — MoreSheetKt.MoreSheet has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 4 (8 pts), boolean chains 4 (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 · PlaylistSheetKt.PlaylistTrackListItem (cognitive 28) · ×1
  • PlaylistSheetKt.PlaylistTrackListItem (cognitive 28) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:419 — PlaylistSheetKt.PlaylistTrackListItem has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ControlLayoutEditorScreen.Content (cognitive 28) · ×1
  • ControlLayoutEditorScreen.Content (cognitive 28) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/ControlLayoutEditorScreen.kt:65 — ControlLayoutEditorScreen.Content has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (18 pts), error handling 3 (5 pts), boolean chains 3, match/switch 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerActivity.getVideoDurationFromUri (cognitive 26) · ×1
  • PlayerActivity.getVideoDurationFromUri (cognitive 26) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3267 — PlayerActivity.getVideoDurationFromUri has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (25 pts), match/switch 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MediaFileRepository.scanDirectory (cognitive 25) · ×1
  • MediaFileRepository.scanDirectory (cognitive 25) app/src/main/java/app/marlboroadvance/mpvex/repository/MediaFileRepository.kt:408 — MediaFileRepository.scanDirectory has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, error handling 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FtpClient.getFileStream (cognitive 25) · ×1
  • FtpClient.getFileStream (cognitive 25) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:178 — FtpClient.getFileStream has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 6 (7 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 · PlayerActivity.handleEndOfFile (cognitive 25) · ×1
  • PlayerActivity.handleEndOfFile (cognitive 25) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1513 — PlayerActivity.handleEndOfFile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerActivity.fetchNetworkStreamTitle (cognitive 25) · ×1
  • PlayerActivity.fetchNetworkStreamTitle (cognitive 25) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1808 — PlayerActivity.fetchNetworkStreamTitle has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, match/switch 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerSheetsKt.PlayerSheets (cognitive 25) · ×1
  • PlayerSheetsKt.PlayerSheets (cognitive 25) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerSheets.kt:35 — PlayerSheetsKt.PlayerSheets has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 1 (nesting depth added 11). 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 · RecentlyPlayedViewModel.createVideoFromContentUri (cognitive 24) · ×1
  • RecentlyPlayedViewModel.createVideoFromContentUri (cognitive 24) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:355 — RecentlyPlayedViewModel.createVideoFromContentUri has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4 (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 · BrowserTopBarKt.NormalTopBar (cognitive 23) · ×1
  • BrowserTopBarKt.NormalTopBar (cognitive 23) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/components/BrowserTopBar.kt:136 — BrowserTopBarKt.NormalTopBar has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (22 pts), 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 · NetworkStreamingProxy.getStreamWithOffsetFTP (cognitive 23) · ×1
  • NetworkStreamingProxy.getStreamWithOffsetFTP (cognitive 23) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:504 — NetworkStreamingProxy.getStreamWithOffsetFTP has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), error handling 5 (6 pts), boolean chains 2, loops 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 · FileSystemBrowserScreenKt.FileSystemBrowserContent (cognitive 22) · ×1
  • FileSystemBrowserScreenKt.FileSystemBrowserContent (cognitive 22) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1002 — FileSystemBrowserScreenKt.FileSystemBrowserContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, match/switch 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 · FolderListScreenKt.FolderListContent (cognitive 22) · ×1
  • FolderListScreenKt.FolderListContent (cognitive 22) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:619 — FolderListScreenKt.FolderListContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (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 · StorageOps.deleteVideosScoped (cognitive 22) · ×1
  • StorageOps.deleteVideosScoped (cognitive 22) app/src/main/java/app/marlboroadvance/mpvex/utils/permission/PermissionUtils.kt:321 — StorageOps.deleteVideosScoped has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrowserTopBarKt.SelectionTopBar (cognitive 21) · ×1
  • BrowserTopBarKt.SelectionTopBar (cognitive 21) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/components/BrowserTopBar.kt:300 — BrowserTopBarKt.SelectionTopBar has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (21 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SmbClient.connect (cognitive 21) · ×1
  • SmbClient.connect (cognitive 21) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:32 — SmbClient.connect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 8, 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 · NetworkStreamingProxy.getFileSizeFTP (cognitive 21) · ×1
  • NetworkStreamingProxy.getFileSizeFTP (cognitive 21) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:373 — NetworkStreamingProxy.getFileSizeFTP has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 4 (6 pts), boolean chains 3, 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 · PermissionDeniedStateKt.PermissionDeniedState (cognitive 21) · ×1
  • PermissionDeniedStateKt.PermissionDeniedState (cognitive 21) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/states/PermissionDeniedState.kt:66 — PermissionDeniedStateKt.PermissionDeniedState has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), error handling 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SeekbarKt.SeekbarWithTimers (cognitive 21) · ×1
  • SeekbarKt.SeekbarWithTimers (cognitive 21) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/Seekbar.kt:70 — SeekbarKt.SeekbarWithTimers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaylistSheetKt.PlaylistTrackGridItem (cognitive 21) · ×1
  • PlaylistSheetKt.PlaylistTrackGridItem (cognitive 21) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:619 — PlaylistSheetKt.PlaylistTrackGridItem has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (20 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 · M3UParser.parseContent (cognitive 21) · ×1
  • M3UParser.parseContent (cognitive 21) app/src/main/java/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:103 — M3UParser.parseContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, match/switch 1 (2 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaFileRepository.scanExternalVolumeShallow (cognitive 20) · ×1
  • MediaFileRepository.scanExternalVolumeShallow (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/repository/MediaFileRepository.kt:219 — MediaFileRepository.scanExternalVolumeShallow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FolderPickerDialogKt.FolderPickerDialog (cognitive 20) · ×1
  • FolderPickerDialogKt.FolderPickerDialog (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:50 — FolderPickerDialogKt.FolderPickerDialog has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SortDialogKt.ViewModeSelectorComponent (cognitive 20) · ×1
  • SortDialogKt.ViewModeSelectorComponent (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/SortDialog.kt:312 — SortDialogKt.ViewModeSelectorComponent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 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 · FolderListViewModel.loadVideoFolders (cognitive 20) · ×1
  • FolderListViewModel.loadVideoFolders (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListViewModel.kt:312 — FolderListViewModel.loadVideoFolders has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, error handling 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 · PlaylistDetailScreenKt.PlaylistVideoListContent (cognitive 20) · ×1
  • PlaylistDetailScreenKt.PlaylistVideoListContent (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:543 — PlaylistDetailScreenKt.PlaylistVideoListContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 7). 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 · MediaInfoActivity.parseMediaInfoText (cognitive 20) · ×1
  • MediaInfoActivity.parseMediaInfoText (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt:373 — MediaInfoActivity.parseMediaInfoText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 6, match/switch 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 · PlayerActivity.saveVideoPlaybackState (cognitive 20) · ×1
  • PlayerActivity.saveVideoPlaybackState (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1991 — PlayerActivity.saveVideoPlaybackState has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 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 · GestureHandlerKt.DoubleTapToSeekOvals (cognitive 20) · ×1
  • GestureHandlerKt.DoubleTapToSeekOvals (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/GestureHandler.kt:922 — GestureHandlerKt.DoubleTapToSeekOvals has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThemePreviewCardKt.ThemePreviewCard (cognitive 20) · ×1
  • ThemePreviewCardKt.ThemePreviewCard (cognitive 20) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/components/ThemePreviewCard.kt:42 — ThemePreviewCardKt.ThemePreviewCard has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. 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 · FileSystemBrowserViewModel.loadCurrentDirectory (cognitive 19) · ×1
  • FileSystemBrowserViewModel.loadCurrentDirectory (cognitive 19) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:321 — FileSystemBrowserViewModel.loadCurrentDirectory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoListViewModel.loadPlaybackInfo (cognitive 19) · ×1
  • VideoListViewModel.loadPlaybackInfo (cognitive 19) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:303 — VideoListViewModel.loadPlaybackInfo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MediaFileRepository.getAllVideoFolders (cognitive 18) · ×1
  • MediaFileRepository.getAllVideoFolders (cognitive 18) app/src/main/java/app/marlboroadvance/mpvex/repository/MediaFileRepository.kt:84 — MediaFileRepository.getAllVideoFolders has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (5 pts), error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaInfoActivity.resolveFileName (cognitive 18) · ×1
  • MediaInfoActivity.resolveFileName (cognitive 18) app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt:598 — MediaInfoActivity.resolveFileName has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerActivity.syncConfigFiles (cognitive 18) · ×1
  • PlayerActivity.syncConfigFiles (cognitive 18) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:926 — PlayerActivity.syncConfigFiles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerActivity.loadPlaylistItemInternal (cognitive 18) · ×1
  • PlayerActivity.loadPlaylistItemInternal (cognitive 18) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3024 — PlayerActivity.loadPlaylistItemInternal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, match/switch 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 · ThumbnailRepository.generateWithMediaStore (cognitive 17) · ×1
  • ThumbnailRepository.generateWithMediaStore (cognitive 17) REDACTED:324 — ThumbnailRepository.generateWithMediaStore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (17 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerViewModel.setMediaTitle (cognitive 17) · ×1
  • PlayerViewModel.setMediaTitle (cognitive 17) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:487 — PlayerViewModel.setMediaTitle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaylistSheetKt.loadMediaStoreThumbnail (cognitive 17) · ×1
  • PlaylistSheetKt.loadMediaStoreThumbnail (cognitive 17) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:111 — PlaylistSheetKt.loadMediaStoreThumbnail has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DecoderPreferencesScreen.Content (cognitive 17) · ×1
  • DecoderPreferencesScreen.Content (cognitive 17) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/DecoderPreferencesScreen.kt:57 — DecoderPreferencesScreen.Content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SettingsManager.readSettingsFromXml (cognitive 16) · ×1
  • SettingsManager.readSettingsFromXml (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/preferences/SettingsManager.kt:190 — SettingsManager.readSettingsFromXml has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (9 pts), match/switch 2 (5 pts), if/else 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaylistActionSheetKt.PlaylistActionSheet (cognitive 16) · ×1
  • PlaylistActionSheetKt.PlaylistActionSheet (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/sheets/PlaylistActionSheet.kt:50 — PlaylistActionSheetKt.PlaylistActionSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerActivity.onCreate (cognitive 16) · ×1
  • PlayerActivity.onCreate (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:329 — PlayerActivity.onCreate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerViewModel.takeSnapshot (cognitive 16) · ×1
  • PlayerViewModel.takeSnapshot (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1192 — PlayerViewModel.takeSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioTracksSheetKt.formatAudioBitrate (cognitive 16) · ×1
  • AudioTracksSheetKt.formatAudioBitrate (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/AudioTracksSheet.kt:192 — AudioTracksSheetKt.formatAudioBitrate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameNavigationSheetKt.takeSnapshot (cognitive 16) · ×1
  • FrameNavigationSheetKt.takeSnapshot (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.kt:595 — FrameNavigationSheetKt.takeSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaybackSpeedSheetKt.PlaybackSpeedSheet (cognitive 16) · ×1
  • PlaybackSpeedSheetKt.PlaybackSpeedSheet (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaybackSpeedSheet.kt:68 — PlaybackSpeedSheetKt.PlaybackSpeedSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MediaUtils.playFile (cognitive 16) · ×1
  • MediaUtils.playFile (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaUtils.kt:50 — MediaUtils.playFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UpdateFeatureKt.UpdateDialog (cognitive 16) · ×1
  • UpdateFeatureKt.UpdateDialog (cognitive 16) app/src/main/java/app/marlboroadvance/mpvex/utils/update/UpdateFeature.kt:396 — UpdateFeatureKt.UpdateDialog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (91 shared lines) · ×1
  • Near-duplicate member pair (91 shared lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:427 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:427-616 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:626-834 — These two members are variants of one another: 91 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (57 shared lines) · ×1
  • Near-duplicate member pair (57 shared lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:429 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:429-726 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:579-846 — These two members are variants of one another: 57 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:276 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:276-368 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:697-860 — 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1808 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1808-1939 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2183-2284 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3024-3122 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3182-3265 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3318-3368 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3461-3489 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (223 corresponding lines) · ×1
  • Edited copy of a member (223 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:46 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:46-270 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/EditConnectionDialog.kt:47-269 — These two members are one piece of code written twice and then edited apart: 223 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (145 corresponding lines) · ×1
  • Edited copy of a member (145 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:881 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:881-1025 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:857-1017 — These two members are one piece of code written twice and then edited apart: 145 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (127 corresponding lines) · ×1
  • Edited copy of a member (127 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1192 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1192-1318 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.kt:598-724 — These two members are one piece of code written twice and then edited apart: 127 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (96 corresponding lines) · ×1
  • Edited copy of a member (96 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:50 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:50-145 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt:50-146 — These two members are one piece of code written twice and then edited apart: 96 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:40 — app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:40-88 | app/src/main/java/app/marlboroadvance/mpvex/presentation/components/OutlinedNumericChooser.kt:103-153 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (65 corresponding lines) · ×1
  • Edited copy of a member (65 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:122 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:122-186 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:200-267 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/theme/AppTheme.kt:373 — app/src/main/java/app/marlboroadvance/mpvex/ui/theme/AppTheme.kt:373-409 | app/src/main/java/app/marlboroadvance/mpvex/ui/theme/AppTheme.kt:414-450 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (59 corresponding lines) · ×1
  • Edited copy of a member (59 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/M3UVideoCard.kt:48 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/M3UVideoCard.kt:48-127 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkFolderCard.kt:41-99 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:743 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:743-802 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:816-871 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:68 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:68-105 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:178-224 — 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 (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:196 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:196-243 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:366-407 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:146 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:146-181 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:191-231 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/database/repository/PlaylistRepository.kt:206 — app/src/main/java/app/marlboroadvance/mpvex/database/repository/PlaylistRepository.kt:206-245 | app/src/main/java/app/marlboroadvance/mpvex/database/repository/PlaylistRepository.kt:247-286 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt:36 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/SubtitleSettingsPanel.kt:36-68 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsPanel.kt:36-68 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 38+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 38+ corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:37 — app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:37-74 | app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:87-124 | app/src/main/java/app/marlboroadvance/mpvex/presentation/components/TintedSliderItem.kt:36-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2933 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2933-2968 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2973-3007 — 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 copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:385 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:385-413 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:420-448 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:358-382 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/MainActivity.kt:70 — app/src/main/java/app/marlboroadvance/mpvex/MainActivity.kt:70-101 | app/src/main/java/app/marlboroadvance/mpvex/presentation/crash/CrashActivity.kt:82-101 | app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt:81-106 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:736 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:736-749 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:751-764 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×1
  • Edited copy of a member (10 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:18 — app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:18-27 | app/src/main/java/app/marlboroadvance/mpvex/utils/sort/SortUtils.kt:36-45 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:844 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:844-866 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2418-2429 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.kt:358 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.kt:358-379 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.kt:394-415 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1034 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1034-1043 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1045-1053 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1055-1063 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1065-1074 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:368 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:368-371 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:658-661 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 4+ corresponding lines) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:110 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:110-114 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListViewModel.kt:84-87 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailViewModel.kt:54-58 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistViewModel.kt:47-50 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt:413-416 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (182–184 lines × 2) · ×1
  • Duplicated block (182–184 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:87 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:87-270 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/EditConnectionDialog.kt:88-269 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/EditConnectionDialog.kt` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:87` 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 (89–90 lines × 2) · ×1
  • Duplicated block (89–90 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1225 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1225-1313 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.kt:633-722 — 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/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1225` it begins part-way through the construct above it, so those 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 (82–89 lines × 2) · ×1
  • Duplicated block (82–89 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:163 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:163-244 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:435-523 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:163` it begins part-way through the construct above it, so those 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 (89–95 lines × 2) · ×1
  • Duplicated block (89–95 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:284 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:284-372 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:560-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:284` 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 (65 lines × 2) · ×1
  • Duplicated block (65 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/states/EmptyState.kt:42 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/states/EmptyState.kt:42-106 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/states/LoadingState.kt:44-108 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/states/EmptyState.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/states/LoadingState.kt` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/states/EmptyState.kt:42` 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 (54 lines × 2) · ×1
  • Duplicated block (54 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/M3UVideoCard.kt:51 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/M3UVideoCard.kt:51-104 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkVideoCard.kt:54-107 — 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/app/marlboroadvance/mpvex/ui/browser/cards/M3UVideoCard.kt:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/NetworkVideoCard.kt:52` calls `collectAsState` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/M3UVideoCard.kt:49` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (43–47 lines × 2) · ×1
  • Duplicated block (43–47 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:119 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:119-161 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:387-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/cards/VideoCard.kt:119` it begins part-way through the construct above it, so those 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 (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:332 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:332-378 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:305-351 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:707 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:707-748 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:806-847 — both copies are in the same file, so extract the 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 (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:106 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:106-145 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt:105-144 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:106` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (38–39 lines × 2) · ×1
  • Duplicated block (38–39 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:917 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:917-954 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:466-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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:917` 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 (25–37 lines × 2) · ×1
  • Duplicated block (25–37 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:512 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:512-536 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:955-991 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:512` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35–36 lines × 2) · ×1
  • Duplicated block (35–36 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:527 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:527-561 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:636-671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:527` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:59 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:59-94 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt:104-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (34–35 lines × 2) · ×1
  • Duplicated block (34–35 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:116 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:116-149 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.kt:203-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/cards/FolderCard.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.
D4 · Code Duplication · Duplicated block (34 lines × 3) · ×1
  • Duplicated block (34 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:82 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:82-115 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt:81-114 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:138-171 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:82` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:81` calls `Surface` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:137` 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 (32–34 lines × 2) · ×1
  • Duplicated block (32–34 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:451 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:451-484 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:335-366 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:451` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:824 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:824-856 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:384-417 — 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:824` it does not close everything it opens, so those 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 (31–33 lines × 2) · ×1
  • Duplicated block (31–33 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:44 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:44-76 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:204-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (32 lines × 3) · ×1
  • Duplicated block (32 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:661 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:661-692 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:457-488 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:231-262 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:661` 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 (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:202 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:202-233 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:188-219 — 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/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:202` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `isSearching` to `enabled = selectionManager.isInSelectionMode || isReorderMode ||` in one and `enabled = selectionManager.isInSelectionMode ||` 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 (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:429 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:429-458 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:629-659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/PlaylistSheet.kt:429` it does not close everything it opens, so those 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–30 lines × 2) · ×1
  • Duplicated block (28–30 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2197 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2197-2226 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3184-3211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:964 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:964-991 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:942-970 — 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:964` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:129 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:129-156 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:207-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 3) · ×1
  • Duplicated block (27 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:165 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:165-191 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:211-237 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:257-283 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:338 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:338-364 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:196-221 — 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:329 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:329-353 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:751-776 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:329` it begins part-way through the construct above it, so those 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:750` calls `withReadTimeout` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:328` 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 (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2239 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2239-2264 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3219-3244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2239` it does not close everything it opens, so those 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/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:427 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:427-451 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:499-522 — 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/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:427` 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) · ×1
  • Duplicated block (25 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:946 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:946-970 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1013-1037 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:946` it begins part-way through the construct above it, so those 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/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:257 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:257-278 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:213-236 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:415 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:415-438 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:580-603 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/utils/media/CopyPasteOps.kt:415` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:760 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:760-781 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:811-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:758` calls `spacedBy` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:811` 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–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:18 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:18-39 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:179-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt: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.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:38 — app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:38-58 | app/src/main/java/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:88-108 | app/src/main/java/app/marlboroadvance/mpvex/presentation/components/TintedSliderItem.kt:37-57 — 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/app/marlboroadvance/mpvex/presentation/components/SliderItem.kt:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–21 lines × 3) · ×1
  • Duplicated block (18–21 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:647 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:647-664 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:407-427 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:709-727 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt` as WHOLE FILES: this scan already matched 7 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. 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:647` 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:437 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:437-455 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:209-229 — 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:437` it begins part-way through the construct above it, so those 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 (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:83 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:83-102 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt:82-101 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:139-158 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:271-290 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:81` calls `Surface` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:137` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:694 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:694-713 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:490-508 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:264-282 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:694` 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 (17–19 lines × 3) · ×1
  • Duplicated block (17–19 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:642 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:642-659 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:439-455 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:211-229 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:642` it does not close everything it opens, so those 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–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1876 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1876-1894 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3068-3086 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3325-3342 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:334 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:334-351 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:460-478 — 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/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:334` 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 (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:865 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:865-883 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1073-1091 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.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 (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:126 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:126-143 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt:125-142 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsShared.kt:182-199 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsPortrait.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControlsLandscape.kt:126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 4) · ×1
  • Duplicated block (16–17 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1043 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1043-1059 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1104-1119 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1122-1138 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1178-1194 — 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1043` 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 (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AppearancePreferencesScreen.kt:76 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AppearancePreferencesScreen.kt:76-92 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerControlsPreferencesScreen.kt:112-128 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerPreferencesScreen.kt:56-72 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PreferencesScreen.kt:63-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AppearancePreferencesScreen.kt:76` 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) · ×1
  • Duplicated block (17 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AudioPreferencesScreen.kt:59 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AudioPreferencesScreen.kt:59-75 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/DecoderPreferencesScreen.kt:74-90 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/GesturePreferencesScreen.kt:74-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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/app/marlboroadvance/mpvex/ui/preferences/AudioPreferencesScreen.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 (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AppearancePreferencesScreen.kt:72 — app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AppearancePreferencesScreen.kt:72-86 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerControlsPreferencesScreen.kt:108-122 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PlayerPreferencesScreen.kt:52-66 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/PreferencesScreen.kt:59-73 | app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/SettingsSearchScreen.kt:93-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AppearancePreferencesScreen.kt:72` 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–15 lines × 4) · ×1
  • Duplicated block (11–15 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1901 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1901-1915 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2247-2261 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3227-3241 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3343-3353 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2244` calls `getVideoDurationFromUri` and `app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1899` 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 (14–15 lines × 4) · ×1
  • Duplicated block (14–15 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:663 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:663-677 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:716-729 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:761-775 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:815-828 — 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:663` it begins part-way through the construct above it, so those 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–15 lines × 3) · ×1
  • Duplicated block (12–15 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:644 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:644-655 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:404-418 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:478-490 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt` as WHOLE FILES: this scan already matched 7 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. 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:644` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:332 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:332-346 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:436-450 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt:204-218 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:87 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:87-100 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:152-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.kt:152` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/database/repository/VideoMetadataCacheRepository.kt:69 — app/src/main/java/app/marlboroadvance/mpvex/database/repository/VideoMetadataCacheRepository.kt:69-81 | app/src/main/java/app/marlboroadvance/mpvex/database/repository/VideoMetadataCacheRepository.kt:158-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/database/repository/VideoMetadataCacheRepository.kt:69` 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 (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:433 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:433-445 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:504-516 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:737-749 — 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/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:433` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1301 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1301-1313 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/HttpUtils.kt:100-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1301` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (11–12 lines × 6) · ×1
  • Duplicated block (11–12 lines × 6) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1878 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1878-1888 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:2203-2214 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3070-3080 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3190-3201 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3327-3337 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3468-3478 — 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/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1878` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:871 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:871-882 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:959-970 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1026-1037 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1079-1090 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:1159-1170 — 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/app/marlboroadvance/mpvex/ui/player/controls/PlayerControls.kt:871` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:196 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:196-207 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:338-349 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:281-292 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:465-476 — 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/app/marlboroadvance/mpvex/ui/browser/dialogs/AddToPlaylistDialog.kt:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1207 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1207-1217 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:232-242 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:477-487 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:617-627 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:792-802 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1207` it does not close everything it opens, so those 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/app/marlboroadvance/mpvex/MainActivity.kt:78 — app/src/main/java/app/marlboroadvance/mpvex/MainActivity.kt:78-88 | app/src/main/java/app/marlboroadvance/mpvex/presentation/crash/CrashActivity.kt:87-96 | app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt:85-95 — 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/app/marlboroadvance/mpvex/MainActivity.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 after the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/MainActivity.kt:91` calls `LaunchedEffect`, `autoConnectToNetworks` and `app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt:97` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:187 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:187-197 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:225-235 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt:123-133 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:187` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (4–11 lines × 3) · ×1
  • Duplicated block (4–11 lines × 3) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:891 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:891-901 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:437-447 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:584-587 — 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. 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 lines × 6) · ×1
  • Duplicated block (10 lines × 6) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1209 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1209-1218 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:857-866 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/NetworkBrowserScreen.kt:234-243 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:479-488 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:619-628 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:794-803 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 163 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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:788 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:788-797 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:435-444 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt:506-515 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.kt:739-748 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt` as WHOLE FILES: this scan already matched 7 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. 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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:788` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3273 — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3273-3281 | app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3292-3301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3273` 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 × 4) · ×1
  • Duplicated block (7–8 lines × 4) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:270 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:270-277 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt:158-165 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:591-597 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:670-676 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:270` it does not close everything it opens, so those 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:278` calls `e` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:599` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:292 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedViewModel.kt:292-298 | app/src/main/java/app/marlboroadvance/mpvex/utils/storage/VideoScanUtils.kt:66-73 — 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. 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–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaInfoParser.kt:412 — app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaInfoParser.kt:412-417 | app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaInfoParser.kt:425-431 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/app/marlboroadvance/mpvex/utils/media/MediaInfoParser.kt:412` it begins part-way through the construct above it, so those 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 × 5) · ×1
  • Duplicated block (6 lines × 5) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:270 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:270-276 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:383-388 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt:158-164 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:591-596 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:670-675 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:270` it does not close everything it opens, so those 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 `len` to `Int): Int = rawStream.read(b` in one and `Int): Int = inputStream.read(b` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:278` calls `e` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:390` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×1
  • Duplicated block (5 lines × 2) app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:169 — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:169-173 | app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:394-398 — before extracting anything, compare `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt` and `app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt` as WHOLE FILES: this scan already matched 7 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. 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: PlayerViewModel (LCOM4 5) app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:80 — PlayerViewModel'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.
DM4 · Rich vs anemic model · Anemic entity · ×1
  • Anemic entity: NetworkConnection app/src/main/java/app/marlboroadvance/mpvex/domain/network/NetworkConnection.kt:10 — `NetworkConnection` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 242 JVM, JavaScript/TypeScript production file(s) this check read across 2 module(s). Each was searched for its ecosystem's logging libraries (JVM: SLF4J, Log4j2, java.util.logging, Logback, kotlin-logging, scala-logging; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) 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.
X2 · Cancellation propagation · Suspend function with a blocking request · ×1
  • Suspend function with a blocking request: getLatestRelease app/src/main/java/app/marlboroadvance/mpvex/utils/update/UpdateFeature.kt:119 — `getLatestRelease` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
Minor — 40 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×18
  • Duplicated predicate website/components/sections/header.tsx:118 — `downloadUrl || siteConfig.links.latestRelease` appears character-identically in 2 files — website/components/sections/header.tsx, website/components/sections/hero.tsx. 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/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt:245 — `!selectionManager.isInSelectionMode && isFabVisible.value` appears character-identically in 3 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.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/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt:1217 — `!tempFile.exists() || tempFile.length() == 0L` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/sheets/FrameNavigationSheet.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/app/marlboroadvance/mpvex/MainActivity.kt:215 — `BuildConfig.ENABLE_UPDATE_FEATURE && updateViewModel != null` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/MainActivity.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AboutScreen.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/app/marlboroadvance/mpvex/MainActivity.kt:82 — `dark == DarkMode.Dark || (dark == DarkMode.System && isSystemInDarkTheme)` appears character-identically in 3 files — app/src/main/java/app/marlboroadvance/mpvex/MainActivity.kt, app/src/main/java/app/marlboroadvance/mpvex/presentation/crash/CrashActivity.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt:210 — `file.isFile && FileTypeUtils.isVideoFile(file)` appears character-identically in 3 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserViewModel.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListViewModel.kt, app/src/main/java/app/marlboroadvance/mpvex/utils/media/MetadataRetrieval.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/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt:168 — `files.isNotEmpty() && !files[0].isDirectory` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/FtpClient.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.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/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt:647 — `gridState.firstVisibleItemIndex == 0 && gridState.firstVisibleItemScrollOffset == 0` appears character-identically in 4 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.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/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt:250 — `host.isNotBlank() && (isAnonymous || username.isNotBlank())` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/AddConnectionDialog.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/EditConnectionDialog.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/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt:338 — `isRemovable && volumePath.contains("usb", ignoreCase = true)` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FilePickerDialog.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/dialogs/FolderPickerDialog.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/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:1048 — `it.isDirectory && it.name?.equals(name, ignoreCase = true) == true` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/preferences/AdvancedPreferencesScreen.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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:1108 — `listState.firstVisibleItemIndex == 0 && listState.firstVisibleItemScrollOffset == 0` appears character-identically in 5 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/folderlist/FolderListScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/recentlyplayed/RecentlyPlayedScreen.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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:952 — `operationType.value is CopyPasteOps.OperationType.Move && operationProgress.isComplete && operationProgress.error == null` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.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/app/marlboroadvance/mpvex/ui/player/MPVPipHelper.kt:55 — `playerPreferences.usePreciseSeeking.get() || duration < 120` appears character-identically in 3 files — app/src/main/java/app/marlboroadvance/mpvex/ui/player/MPVPipHelper.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/player/MediaPlaybackService.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:341 — `selectedVideos.isEmpty() || operationType.value == null` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.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/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt:921 — `selectedVideos.isNotEmpty() && operationType.value != null` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/browser/filesystem/FileSystemBrowserScreen.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/browser/videolist/VideoListScreen.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/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt:585 — `uri != null && HttpUtils.isNetworkStream(uri)` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/mediainfo/MediaInfoActivity.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.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/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3423 — `uri.scheme?.startsWith("http") == true || uri.scheme == "rtmp" || uri.scheme == "ftp" || uri.scheme == "rtsp" || uri.scheme == "mms"` appears character-identically in 2 files — app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerViewModel.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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×4
  • Silent fallback default in catch app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/proxy/NetworkStreamingProxy.kt:267 — `getFileSize` swallows every exception into `-1L` — 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/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt:3315 — `getVideoDurationFromUri` 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/app/marlboroadvance/mpvex/utils/media/M3UParser.kt:292 — `extractPlaylistNameFromUrl` swallows every exception into `"M3U Playlist"` — 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/app/marlboroadvance/mpvex/utils/media/MediaInfoOps.kt:480 — `getRotation` swallows every exception into `0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
AX6 · Interface segregation · Fat interface · ×2
  • Fat interface: PlaylistDao (29 abstract methods) app/src/main/java/app/marlboroadvance/mpvex/database/dao/PlaylistDao.kt:15 — `PlaylistDao` declares 29 abstract methods: `insertPlaylist`, `updatePlaylist`, `deletePlaylist`, `observeAllPlaylists`, `getAllPlaylists`, `getPlaylistById`, `observePlaylistById`, `insertPlaylistItem`, `insertPlaylistItems`, `updatePlaylistItem`, `deletePlaylistItem`, `deletePlaylistItems`, `deletePlaylistItemById`, `deletePlaylistItemsByIds`, `observePlaylistItems`, `getPlaylistItems`, `getPlaylistItemCount`, `observePlaylistItemCount`, `deleteAllItemsFromPlaylist`, `deleteItemsByFilePath`, `deleteItemsByFilePaths`, `updateItemPosition`, `getMaxPosition`, `updatePlayHistory`, `getRecentlyPlayedInPlaylist`, `observeRecentlyPlayedInPlaylist`, `getPlaylistItemByPath`, `getPlaylistItemsWindow`, `getPlaylistItemsInRange`. 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: RecentlyPlayedDao (21 abstract methods) app/src/main/java/app/marlboroadvance/mpvex/database/dao/RecentlyPlayedDao.kt:11 — `RecentlyPlayedDao` declares 21 abstract methods: `insert`, `deleteExistingEntriesForFile`, `getByFilePath`, `getLastPlayed`, `observeLastPlayed`, `getLastPlayedForHighlight`, `observeLastPlayedForHighlight`, `getRecentlyPlayed`, `observeRecentlyPlayed`, `getRecentlyPlayedBySource`, `clearAll`, `deleteOlderThan`, `deleteByFilePath`, `deleteByPlaylistId`, `updateFilePath`, `updateVideoTitle`, `updateVideoMetadata`, `getRecentlyPlayedPlaylists`, `observeRecentlyPlayedPlaylists`, `getAllRecentlyPlayed`, `insertAll`. 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.
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file app/src/main/java/app/marlboroadvance/mpvex/domain/anime4k/Anime4KManager.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.
  • Orphaned file app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsFilterPresetsCard.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.
C4 · Data Retention · Partial data-retention evidence · ×1
  • Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found app/build.gradle.kts:5 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `app/build.gradle.kts` makes this repository a deployable product (line 5).
D21 · Naming Consistency · `isURLValid` spells `URL` where 17 names in the project spell it `Url` · ×1
  • `isURLValid` spells `URL` where 17 names in the project spell it `Url` app/src/main/java/app/marlboroadvance/mpvex/utils/media/MediaUtils.kt:145 — 17 of 18 names in project app spell the token `Url` (17 of 18; unit: names in project app containing `Url`). Peers: PlaylistEntity.m3uSourceUrl (app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaylistEntity.kt:12); ThumbnailRepository.isNetworkUrl (REDACTED:445); SmbClient.baseUrl (app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/SmbClient.kt:28); WebDavClient.buildUrl (app/src/main/java/app/marlboroadvance/mpvex/ui/browser/networkstreaming/clients/WebDavClient.kt:27); PlaylistDetailScreenKt.StreamUrlDialog (app/src/main/java/app/marlboroadvance/mpvex/ui/browser/playlist/PlaylistDetailScreen.kt:708). Rename to `isUrlValid`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion app/build.gradle.kts:1 — `app` (54025 LoC, 566 module-visible types across 55 directories) overshoots its size bounds. 1 of 2 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 2 of 162 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; 162 of the 221 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/app/marlboroadvance/mpvex/domain/anime4k/Anime4KManager.kt, app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/panels/VideoSettingsFilterPresetsCard.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:4 — 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) as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation website/package.json:49 — `website/package.json` 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.)
X2 · Cancellation propagation · Not all functions that make a request accept an AbortSignal or the coroutine's cancellation · ×1
  • Not all functions that make a request accept an AbortSignal or the coroutine's cancellation — Only 0/5 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; Ktor, OkHttp newCall, URL streams) accept an AbortSignal or the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` () and hand it to the request; in a Kotlin suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-00af42653d9b4dbf9164e6d9e54c9534/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=61" --report-format json --report-path /tmp/watchdog-gitleaks-00af42653d9b4dbf9164e6d9e54c9534/history-1.json --exit-code 0 --source .0artifacts/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-00af42653d9b4dbf9164e6d9e54c9534/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 .30artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.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 3 file(s) — `app/src/main/java/app/marlboroadvance/mpvex/database/entities/PlaylistItemEntity.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/player/PlayerActivity.kt`, `app/src/main/java/app/marlboroadvance/mpvex/ui/player/controls/components/VerticalSliders.kt` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.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 Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1eaf6-335d-7175-8a56-46e1e1ba2f01 · 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