Public report of nekomangaorg/Neko, 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, 14:08 UTC · Survey ID cd_5144ca6c374249eb9893eb82ff581b64

nekomangaorg/Neko

Measured 17 November 2026, 14:07 UTC, at code version dcf0e38

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

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

A large codebase: 107,112 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Security and Compliance, 43.2

Findings by how serious they are

38 critical 595 serious 134 minor

14 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, 14:07 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 ▸

56of 56 dimensions measured by tools.
755of 767 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
56dimensions across 7 lenses, read from 107,112 lines of product code in 5 projects.
Chapters

Executive summary

nekomangaorg/Neko falls short of our standard for production, in part because it has pipeline tools referenced by a changeable name. It scores 53.0 out of 100 and is rated Adequate, and all 38 of its critical findings are security problems.

Security and Compliance, at 43.2, is the weakest lens and counts most in the score. The best first step is replacing the six passwords or keys found in the code's history, worth about 3.8 points. Pinning the build actions that handle secrets comes next, worth about 1.9 points. Raising Security and Compliance to 70 would lift the score to about 59.9.

Twenty pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Twelve secrets can leak from the build pipeline, and six passwords or keys are open to anyone who can read the repository. Pinning each tool to an exact version, limiting each secret to its own step and replacing each exposed password or key would close these risks.

The product code is 107,112 lines, about €160,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.
Security and Compliance 43.2 · counts for 46%Production Readiness 46.1 · counts for 25%Maturity 66.9 · counts for 14%Code Health 77.2 · counts for 8%Domain Modelling 80.6 · counts for 4%Architecture 87.9 · counts for 2%Performance 88.6 · counts for 1%

If Security and Compliance rose from 43.2 to 70, the lowest score rated Strong, the score would rise from 53.0 to about 59.9.

Code composition: what the lines of code are
Product code 77%Tests 23%
Rebuild cost: about €160,000 · Estimate
Cost to rebuild€52,000 to €260,000, for 859 to 2,725 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 53. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 107,112 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 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED, REDACTED.
Raises the score by about 3.8 points · Low effort · Secrets (history)
2
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.
Raises the score by about 1.9 points · Low effort · Static Analysis (SAST)
3
Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (2), REDACTED.
Raises the score by about 3.6 points · Medium effort · Static Analysis (SAST)

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 €160,000 to build again, about 1.1 person-years of work. Its weakest lens is Security and Compliance, at 43.2 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 6 REDACTED finding(s) in Secrets (history). Of all the actions in this report, it raises the score most for the work it takes: about 3.8 points for low effort, because it clears the 6 Secrets (history) 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 7.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 96,271 lines over the last 90 days, which is about 390,432 lines a year. At that pace, the extra work comes to an estimated 19.5 to 130.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch :app :app :constants :constants :app->:constants :core :core :app->:core :baselineprofile :baselineprofile :baselineprofile->:app :core->:constants Neko Neko

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.

486 modules, with 1100 dependencies between them. 4 loops run through 104 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 446 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 org.nekomanga.domain.network2 org.nekomanga.presentation.screens.settings.widgets3 tachiyomi.core.preference4 org.nekomanga.core.security5 org.nekomanga.domain.category6 org.nekomanga.domain.chapter7 org.nekomanga.domain.details8 org.nekomanga.domain.reader9 org.nekomanga.domain.site10 eu.kanade.tachiyomi.data.download11 eu.kanade.tachiyomi.source.online.utils12 eu.kanade.tachiyomi.util.chapter13 org.nekomanga.domain.manga14 org.nekomanga.presentation.components15 eu.kanade.tachiyomi.ui.manga.MangaConstants16 org.nekomanga.presentation.screens.reader17 org.nekomanga.presentation.screens.library18 org.nekomanga.domain.library19 org.nekomanga.data.database.repository20 eu.kanade.tachiyomi.data.track21 org.nekomanga.data.repository22 org.nekomanga.presentation.screens.feed23 eu.kanade.tachiyomi.data.preference24 eu.kanade.tachiyomi.ui.source.latest25 eu.kanade.tachiyomi.source.online.handlers26 eu.kanade.tachiyomi.source.online27 eu.kanade.tachiyomi.source28 eu.kanade.tachiyomi.source.model29 eu.kanade.tachiyomi.data.database.models30 eu.kanade.tachiyomi.data.cache31 org.nekomanga.presentation.screens.browse32 org.nekomanga.presentation.screens.reader.viewer33 eu.kanade.tachiyomi.ui.main34 eu.kanade.tachiyomi.ui.reader.model35 eu.kanade.tachiyomi.ui.setting36 eu.kanade.tachiyomi.ui.manga37 eu.kanade.tachiyomi.ui.reader.domain38 org.nekomanga.presentation.screens.settings.screens39 eu.kanade.tachiyomi.ui.reader40 org.nekomanga.presentation.screens
1 org.nekomanga.domain.network
2 org.nekomanga.presentation.screens.settings.widgets
3 tachiyomi.core.preference
4 org.nekomanga.core.security2
5 org.nekomanga.domain.category11
6 org.nekomanga.domain.chapter1112
7 org.nekomanga.domain.details22
8 org.nekomanga.domain.reader2
9 org.nekomanga.domain.site2
10 eu.kanade.tachiyomi.data.download1151132101
11 eu.kanade.tachiyomi.source.online.utils111211
12 eu.kanade.tachiyomi.util.chapter32112121248
13 org.nekomanga.domain.manga1112
14 org.nekomanga.presentation.components375
15 eu.kanade.tachiyomi.ui.manga.MangaConstants361314
16 org.nekomanga.presentation.screens.reader1
17 org.nekomanga.presentation.screens.library1841112914131131
18 org.nekomanga.domain.library22
19 org.nekomanga.data.database.repository1134
20 eu.kanade.tachiyomi.data.track1417
21 org.nekomanga.data.repository2621122622
22 org.nekomanga.presentation.screens.feed151122111
23 eu.kanade.tachiyomi.data.preference2111
24 eu.kanade.tachiyomi.ui.source.latest11211221411
25 eu.kanade.tachiyomi.source.online.handlers810141411134
26 eu.kanade.tachiyomi.source.online32211192125
27 eu.kanade.tachiyomi.source241
28 eu.kanade.tachiyomi.source.model11112
29 eu.kanade.tachiyomi.data.database.models11113
30 eu.kanade.tachiyomi.data.cache112
31 org.nekomanga.presentation.screens.browse131161121123
32 org.nekomanga.presentation.screens.reader.viewer115331
33 eu.kanade.tachiyomi.ui.main1111
34 eu.kanade.tachiyomi.ui.reader.model111
35 eu.kanade.tachiyomi.ui.setting122122293422
36 eu.kanade.tachiyomi.ui.manga1251223520114121121821
37 eu.kanade.tachiyomi.ui.reader.domain111112
38 org.nekomanga.presentation.screens.settings.screens11313121266
39 eu.kanade.tachiyomi.ui.reader212212123141211121123
40 org.nekomanga.presentation.screens32121068441
Uses a module listed above itPart of a loopThe module itself
1 org.nekomanga.domain.network2 org.nekomanga.presentation.screens.settings.widgets3 tachiyomi.core.preference4 org.nekomanga.core.security5 org.nekomanga.domain.category6 org.nekomanga.domain.chapter7 org.nekomanga.domain.details8 org.nekomanga.domain.reader9 org.nekomanga.domain.site10 eu.kanade.tachiyomi.data.download11 eu.kanade.tachiyomi.source.online.utils12 eu.kanade.tachiyomi.util.chapter13 org.nekomanga.domain.manga14 org.nekomanga.presentation.components15 eu.kanade.tachiyomi.ui.manga.MangaConstants16 org.nekomanga.presentation.screens.reader17 org.nekomanga.presentation.screens.library18 org.nekomanga.domain.library19 org.nekomanga.data.database.repository20 eu.kanade.tachiyomi.data.track21 org.nekomanga.data.repository22 org.nekomanga.presentation.screens.feed23 eu.kanade.tachiyomi.data.preference24 eu.kanade.tachiyomi.ui.source.latest25 eu.kanade.tachiyomi.source.online.handlers26 eu.kanade.tachiyomi.source.online27 eu.kanade.tachiyomi.source28 eu.kanade.tachiyomi.source.model29 eu.kanade.tachiyomi.data.database.models30 eu.kanade.tachiyomi.data.cache31 org.nekomanga.presentation.screens.browse32 org.nekomanga.presentation.screens.reader.viewer33 eu.kanade.tachiyomi.ui.main34 eu.kanade.tachiyomi.ui.reader.model35 eu.kanade.tachiyomi.ui.setting36 eu.kanade.tachiyomi.ui.manga37 eu.kanade.tachiyomi.ui.reader.domain38 org.nekomanga.presentation.screens.settings.screens39 eu.kanade.tachiyomi.ui.reader40 org.nekomanga.presentation.screensorg.nekomanga.domain.network1org.nekomanga.presentation.screens.settings.widgets2tachiyomi.core.preference3org.nekomanga.core.security4org.nekomanga.domain.category5org.nekomanga.domain.chapter6org.nekomanga.domain.details7org.nekomanga.domain.reader8org.nekomanga.domain.site9eu.kanade.tachiyomi.data.download10eu.kanade.tachiyomi.source.online.utils11eu.kanade.tachiyomi.util.chapter12org.nekomanga.domain.manga13org.nekomanga.presentation.components14eu.kanade.tachiyomi.ui.manga.MangaConstants15org.nekomanga.presentation.screens.reader16org.nekomanga.presentation.screens.library17org.nekomanga.domain.library18org.nekomanga.data.database.repository19eu.kanade.tachiyomi.data.track20org.nekomanga.data.repository21org.nekomanga.presentation.screens.feed22eu.kanade.tachiyomi.data.preference23eu.kanade.tachiyomi.ui.source.latest24eu.kanade.tachiyomi.source.online.handlers25eu.kanade.tachiyomi.source.online26eu.kanade.tachiyomi.source27eu.kanade.tachiyomi.source.model28eu.kanade.tachiyomi.data.database.models29eu.kanade.tachiyomi.data.cache30org.nekomanga.presentation.screens.browse31org.nekomanga.presentation.screens.reader.viewer32eu.kanade.tachiyomi.ui.main33eu.kanade.tachiyomi.ui.reader.model34eu.kanade.tachiyomi.ui.setting35eu.kanade.tachiyomi.ui.manga36eu.kanade.tachiyomi.ui.reader.domain37org.nekomanga.presentation.screens.settings.screens38eu.kanade.tachiyomi.ui.reader39org.nekomanga.presentation.screens402111112222211511321011112113211212124811123753613141184111291413113122113414172621122622151122111211111211221411810141411134322111921252411111211113112131161121123115331111111112212229342212512235201141211218211111121131312126621221212314121112112332121068441+446 more modules (most-connected shown)

At a glance — Code Health · 77.2 · Strong ·

At a glance — Architecture · 87.9 · Strong ·

At a glance — Maturity · 66.9 · Adequate ·

At a glance — Readiness · 46.1 · Weak · gated by P3, P7 ·

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

At a glance — Domain Modelling · 80.6 · Strong ·

At a glance — Performance · 88.6 · Strong ·

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 — Injection41High / Critical
A07:2025 — Authentication Failures7High / Critical
A03:2025 — Software Supply Chain Failures6Medium

Roadmap

Top priorities: Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED, REDACTED; Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (2), REDACTED; 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.

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

Do thisHelpsEffortDimension
Resolve the 6 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED, REDACTED.+3.8 ptsLowSecrets (history)
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+1.9 ptsLowStatic Analysis (SAST)
Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (2), REDACTED.+3.6 ptsMediumStatic Analysis (SAST)
Resolve the 3 Off-boarding risk finding(s) in Bus Factor.+1.4 ptsLowBus Factor
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED.+1.4 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.4 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED.+1.4 ptsLowSupply-chain Provenance & Signing
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.+2.3 ptsMediumSecurity & performance tooling

File quality

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

FileScoreBandWorst signal
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedSecrets (history): REDACTED: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt4.8MixedCyclomatic Complexity: MangaViewModel.applyToManga (cyclomatic 21)
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedSecrets (history): REDACTED: REDACTED
app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt5.8MixedGod Classes: TooManyMethods: MangaDex
REDACTED5.9MixedStatic Analysis (SAST): Medium: REDACTED
app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt6.0MixedExplicit Debt: TodoComment
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt6.5MixedCognitive Complexity: ReaderViewModel.observeReaderSettings (cognitive 17)
app/src/main/java/eu/kanade/tachiyomi/data/database/models/ArtworkImpl.kt6.7MixedExplicit Debt: TodoComment
app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt7.0MixedCyclomatic Complexity: ComposePagerViewerKt.executeNavCommand (cyclomatic 43)
app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt7.0MixedCyclomatic Complexity: ReaderPreloadControllerImpl.onPositionChanged (cyclomatic 37)
app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt7.0MixedCognitive Complexity: ReaderControlsKt.HorizontalFloatingSlider (cognitive 21)
app/src/main/java/eu/kanade/tachiyomi/data/backup/RestoreHelper.kt7.0MixedCognitive Complexity: RestoreHelper.restoreTrackForManga (cognitive 19)
app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt7.0MixedCode Duplication: Edited copy of a member (70 corresponding lines)
app/src/main/java/org/nekomanga/presentation/screens/stats/SimpleStats.kt7.0MixedCode Duplication: Duplicated block (26 lines × 2)
app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivityViewModel.kt7.0MixedCode Duplication: Duplicated block (14 lines × 2)

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

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

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

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

Could not be resolved — 14

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 56 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

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

What we checked — 56 dimensions across the health lenses
D1D2D3D4D5D6D13D14D15D16D17D19D21D26D27D28D29D34D35D36D44AX10AX3AX4AX6DM1DM10DM11DM12DM6M1M2M3P1P3P4P5P6P7PF1PF3X1X12X13X14X16X18X2X21X23X25X26X27X28X3X5

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, 755 of 767 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 01a1e9d5-784c-79a7-8442-d2af491356d0.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.kt) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.kt) and this repository declares a JVM test suite (repository root, Gradle), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — a Gradle build resolved 659 artifact(s) across its subprojects (165 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.
  • D20 ADR Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository. Read, stating neither a host nor a published package: `build.gradle.kts`, `core/build.gradle.kts`, `constants/build.gradle.kts`, `buildSrc/build.gradle.kts`, `baselineprofile/build.gradle.kts`, ….
  • 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.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `app/src/main/java/eu/kanade/tachiyomi/data/coil/SharedFullDecodes.kt`, `app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt`, `app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt`, `app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt`, `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPanDelegate.kt`, … (+7 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: a native UI project (core/src/main/AndroidManifest.xml). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • 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 — 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 measured — scattered-decision detection needs expression-level symbol resolution: a comparison operand bound to the member it judges (arm one) and a construction bound to the type it produces (arm two). A Roslyn compilation carries both; arm two alone also runs on any frontend that declares whether a construction is produced or passed, and this target loaded neither.
  • 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 no C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Java was found, and this repository's Kotlin 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 no C#, JavaScript/TypeScript, Java, Dart, Ruby, Scala or Rust was found, and this repository's Kotlin 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.
  • 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.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • 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.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • 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.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • 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.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.1 / 10Adequate✓ Tool-verified

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

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

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

57 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ReaderActivity.onCreate at 91. A further 4 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 ReaderViewModel.onReaderSettingsAction at 41 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt (ReaderViewModel.onReaderSettingsAction at 41), app/src/main/java/org/nekomanga/usecases/filter/CalculateDexFilterUseCase.kt (CalculateDexFilterUseCase.invoke at 20), app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt (DetailedStatsKt.DetailedStats at 16), core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt (DiskUtil.isValidFatFilenameChar at 16). 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.

ReaderActivity.onCreate (cyclomatic 91)app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:368
SmartBackgroundAnalyzer.analyze (cyclomatic 65)app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/SmartBackground.kt:37
SettingsScreenKt.SettingsScreen (cyclomatic 65)app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:60
ChapterSourceSyncKt.syncChaptersWithSource (cyclomatic 64)app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt:38
PagerPageItemKt.PagerPageItem (cyclomatic 52)app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.kt:57

+ 52 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 ReaderActivity.onCreate (cyclomatic 91), SmartBackgroundAnalyzer.analyze (cyclomatic 65), SettingsScreenKt.SettingsScreen (cyclomatic 65). — 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 6.1 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D2 · Cognitive Complexity5.7 / 10Adequate✓ 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 5.7 / 10 · rule-coverage 100% · ceiling Prevented

93 method(s) exceeded the cognitive complexity threshold of 15; the worst was ChapterSourceSyncKt.syncChaptersWithSource at 121.

ChapterSourceSyncKt.syncChaptersWithSource (cognitive 121)app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt:38
SettingsScreenKt.SettingsScreen (cognitive 116)app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:60
SmartBackgroundAnalyzer.analyze (cognitive 104)app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/SmartBackground.kt:37
ComposePagerViewerKt.executeNavCommand (cognitive 100)app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:582
ReaderActivity.onCreate (cognitive 85)app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:368

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

What to do

  1. Bring the 13 bodies over 60 down to 60 or less in Cognitive Complexity — start with ChapterSourceSyncKt.syncChaptersWithSource (cognitive 121), SettingsScreenKt.SettingsScreen (cognitive 116), SmartBackgroundAnalyzer.analyze (cognitive 104). — 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 13 together lifts Cognitive Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes7.0 / 10Strong✓ Tool-verified

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

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

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

97 god class(es) detected.

MethodTooLong: SettingsScreenKt.SettingsScreen · ×56app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:60
FileTooLong: reader/ReaderActivity.kt · ×19app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt
ClassTooLong: MangaViewModel · ×11app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:133
TooManyMethods: ReaderViewModel · ×11app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:131

What to do

  1. Resolve the 56 MethodTooLong finding(s) in God Classes — start with MangaScreen.kt (2), ReaderSettingsScreen.kt (2), ReaderPreloadControllerImpl.kt (2). — One of this dimension's main actionable groups (56 warning-level).
  2. Resolve the 19 FileTooLong finding(s) in God Classes — start with ReaderActivity.kt, MangaViewModel.kt, ReaderViewModel.kt. — One of this dimension's main actionable groups (19 warning-level).
  3. Resolve the 11 ClassTooLong finding(s) in God Classes — start with MangaViewModel.kt, ReaderViewModel.kt, LibraryViewModel.kt. — One of this dimension's main actionable groups (11 warning-level).

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

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

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

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

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

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

Duplicated block (12 lines × 2) · ×9app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:99
Edited copy of a member (9 corresponding lines) · ×8app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:198
Duplicated block (14 lines × 2) · ×8app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:177
Duplicated block (10 lines × 2) · ×8app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:158
Edited copy of a member (16 corresponding lines) · ×7app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:216

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

What to do

  1. Resolve the 9 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with PagerViewer.kt (2), CoverCache.kt, NotificationReceiver.kt. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 8 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with CoverCache.kt, MissingChapters.kt, ImageUtil.kt. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 8 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with AlternativeMangaCoverFetcher.kt, ResolveChapterTransitionUiModelUseCase.kt, WebtoonActiveItemResolver.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 · Coupling8.4 / 10Strong✓ 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 8.4 / 10 · rule-coverage 100% · ceiling Prevented

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

Off the main sequence: :constants

What to do

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

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

D6 · Cohesion (LCOM4)9.7 / 10Stronggated by 4 serious findings✓ Tool-verified

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

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

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

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

4 of 186 classes have LCOM4 above 3.

Low cohesion: RestoreHelper (LCOM4 7) · ×4app/src/main/java/eu/kanade/tachiyomi/data/backup/RestoreHelper.kt:38

What to do

  1. Resolve the 4 Low cohesion finding(s) in Cohesion (LCOM4) — start with RestoreHelper.kt, MangaDex.kt, MainActivityViewModel.kt. — One of this dimension's main actionable groups (4 warning-level).

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 39 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 10 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. 2 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 27 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

Top hotspots: app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt (33×91=3003); app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt (41×50=2050); app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.kt (25×52=1300) Repeated repair below the complexity floor: app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt (12 of 14 changes were fixes); app/src/main/java/eu/kanade/tachiyomi/data/coil/ReaderPageFetcher.kt (10 of 11 changes were fixes); app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt (7 of 9 changes were fixes)

Repeated repair: app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt · ×20app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt:336
Hotspot: app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt · ×14app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:368

What to do

  1. Resolve the 20 Repeated repair finding(s) in Churn × Complexity Hotspots — start with Downloader.kt, ReaderPageFetcher.kt, DownloadManager.kt. — One of this dimension's main actionable groups (20 warning-level).
  2. Resolve the 14 Hotspot finding(s) in Churn × Complexity Hotspots — start with ReaderActivity.kt, ComposeWebtoonViewer.kt, PagerPageItem.kt. — One of this dimension's main actionable groups (14 warning-level).

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

D16 · Bus Factor6.9 / 10Adequate✓ Tool-verified

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

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

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

142 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt. Counted over 465 of the 916 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×3

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 6 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

6 deducted task-comment markers across 107112 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/eu/kanade/tachiyomi/data/database/models/ArtworkImpl.kt:20
XxxComment · ×2app/src/main/java/eu/kanade/tachiyomi/source/online/merged/mangaball/Dto.kt:120
HackCommentapp/src/main/java/org/nekomanga/presentation/screens/settings/screens/SearchableSettings.kt:41

What to do

  1. Resolve the 3 TodoComment finding(s) in Explicit Debt — start with ArtworkImpl.kt, BrowseFilterImpl.kt, Manga.kt. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 2 XxxComment finding(s) in Explicit Debt — start with Dto.kt (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 HackComment finding(s) in Explicit Debt — start with SearchableSettings.kt. — One of this dimension's main actionable groups (1 warning-level).

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

D19 · Documentation 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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D21 · Naming Consistency8.8 / 10Strong✓ Tool-verified

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

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

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

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

`mangaID` spells `ID` where 499 names in the project spell it `Id`app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt:73
`bookID` spells `ID` where 499 names in the project spell it `Id`app/src/main/java/eu/kanade/tachiyomi/source/online/merged/projectsuki/ProjectSuki.kt:146
`chapterID` spells `ID` where 499 names in the project spell it `Id`app/src/main/java/eu/kanade/tachiyomi/source/online/merged/projectsuki/ProjectSuki.kt:147
`isRTL` spells `RTL` where 30 names in the project spell it `Rtl`app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSlider.kt:14
`loadChapterURL` spells `URL` where 191 names in the project spell it `Url`app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:484

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

What to do

  1. Resolve the 1 `mangaID` spells `ID` where 499 names in the project spell it `Id` finding(s) in Naming Consistency — start with MangaDex.kt. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `bookID` spells `ID` where 499 names in the project spell it `Id` finding(s) in Naming Consistency — start with ProjectSuki.kt. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 `chapterID` spells `ID` where 499 names in the project spell it `Id` finding(s) in Naming Consistency — start with ProjectSuki.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 Cohesion6.0 / 10Adequate✓ 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 6.0 / 10 · rule-coverage 100% · ceiling Documented

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

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

What to do

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

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

D27 · Navigability8.9 / 10Strong✓ Tool-verified

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

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

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

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

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

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)4.0 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

41 finding(s): 0 critical, 32 high, 9 medium, 0 low. 20 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 3 file(s) — `app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt` (line 31), `app/src/main/java/org/nekomanga/App.kt` (line 80), `gradlew` (line 74, line 178) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 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 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (11 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 20 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 (20 issue-level, 0 of them charged here).

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

D34 · Knowledge Freshness8.7 / 10Strong✓ Tool-verified

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

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

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

63 of 465 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/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt. Counted over 465 of the 916 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×63app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:1
Orphaned files with no living knowledge

What to do

  1. Resolve the 63 Orphaned file finding(s) in Knowledge Freshness — start with FilterChapterSheet.kt, SearchHandler.kt, TrackingDateSheet.kt. — One of this dimension's main actionable groups (63 recommendation-level).
  2. Resolve the 1 Orphaned files with no living knowledge finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

Strongest change-coupling: PreferenceKeys.kt↔PreferencesHelper.kt 92%; LibraryManga.kt↔LibraryViewModel.kt 81%; MangaGridView.kt↔MangaListView.kt 67%

Change coupling: PreferenceKeys.kt ↔ PreferencesHelper.kt · ×10app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt:1
Change coupling clique: InLibrary.kt, MangaGridView.kt, MangaListView.ktapp/src/main/java/org/nekomanga/presentation/components/InLibrary.kt

What to do

  1. Resolve the 10 Change coupling finding(s) in Change Coupling — start with MangaViewModel.kt (2), ChapterImpl.kt (2), PreferenceKeys.kt. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with InLibrary.kt. — One of this dimension's main actionable groups (1 warning-level).

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

D36 · Supply-chain Provenance & 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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

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

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

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

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

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

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

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

  • `TrackService` declares 18 abstract methods: `nameRes`, `getLogo`, `getLogoColor`, `getStatusList`, `isCompletedStatus`, `completedStatus`, `readingStatus`, `planningStatus`, `getStatus`, `getGlobalStatus`, `getScoreList`, `displayScore`, `add`, `update`, `bind`, `search`, `refresh`, `login`. 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/eu/kanade/tachiyomi/data/track/TrackService.kt:26
  • `MangaDexService` declares 21 abstract methods: `search`, `searchAuthor`, `searchGroup`, `recentlyAdded`, `popularNewReleases`, `viewManga`, `mangaStatistics`, `getAggregate`, `chapterStatistics`, `relatedManga`, `recommendedManga`, `viewChapters`, `latestChapters`, `viewArtwork`, `viewChapter`, `randomManga`, `scanlatorGroup`, `scanlatorGroupByUuid`, `authorByUuid`, `viewList`, `getSeasonalList`. 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/eu/kanade/tachiyomi/network/services/MangaDexService.kt:25
  • `ChapterDao` declares 18 abstract methods: `observeChaptersForManga`, `getChaptersForManga`, `getChaptersForMangaIds`, `getChapterById`, `getChapterByUrl`, `getChaptersByUrls`, `getChapterByUrlAndMangaId`, `insertChapter`, `insertChapters`, `updateChapters`, `deleteChapter`, `deleteChapters`, `updateProgress`, `updateSourceOrder`, `observeRecentChapters`, `getRecentChapters`, `updateChapterBackupByMangadexId`, `updateKnownChapterBackupById`. 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/org/nekomanga/data/database/dao/ChapterDao.kt:15
  • `HistoryDao` declares 19 abstract methods: `observeRecentHistoryUngrouped`, `getRecentHistoryUngrouped`, `observeRecentMangaLimit`, `getRecentMangaLimit`, `observeHistoryPerPeriod`, `observeAllRecentsTypes`, `getHistoryByMangaId`, `observeHistoryByMangaId`, `getHistoryByMangaIds`, `observeChapterHistoryByMangaId`, `getChapterHistoryByMangaId`, `getChapterHistoryByMangaIds`, `getHistoryByChapterUrl`, `getTotalReadDuration`, `getHistoryByChapterId`, `insertHistory`, `updateHistoryLastRead`, `deleteAllHistory`, `deleteHistoryNoLastRead`. 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/org/nekomanga/data/database/dao/HistoryDao.kt:13
  • `MangaDao` declares 32 abstract methods: `observeMangaList`, `getMangaList`, `observeFavoriteMangaList`, `getFavoriteMangaList`, `getMangaByIds`, `getMangaByUrlAndSourceSync`, `getMangaByUrls`, `getMangaByUrl`, `getMangaById`, `observeMangaById`, `insertManga`, `insertMangaList`, `updateManga`, `updateMangaList`, `deleteManga`, `deleteMangaList`, `deleteAllNotInLibrary`, `deleteAllNotInLibraryAndNotRead`, `deleteAllManga`, `observeReadNotInLibraryManga`, `getReadNotInLibraryManga`, `observeLastReadMangaIds`, `observeLastFetchedMangaIds`, `updateFavorite`, `updateDateAdded`, `updateViewerFlags`, `updateChapterFlags`, `updateMangaInfo`, `updateLastUpdated`, `updateNextUpdated`, `updateScanlatorFilter`, `updateLanguageFilter`. 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/org/nekomanga/data/database/dao/MangaDao.kt:13
  • `ChapterRepository` declares 20 abstract methods: `observeChaptersForManga`, `getChaptersForManga`, `getChaptersForMangaIds`, `getChapterById`, `getChapterByUrl`, `getChaptersByUrls`, `getChapterByUrlAndMangaId`, `insertChapter`, `insertChapters`, `updateChapters`, `deleteChapter`, `deleteChapters`, `updateProgress`, `updateSourceOrder`, `observeRecentChapters`, `getRecentChapters`, `updateChaptersBackup`, `updateKnownChaptersBackup`, `updateChaptersProgress`, `fixChaptersSourceOrder`. 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/org/nekomanga/data/database/repository/ChapterRepository.kt:7
  • `HistoryRepository` declares 21 abstract methods: `observeRecentHistoryUngrouped`, `getRecentHistoryUngrouped`, `observeRecentMangaLimit`, `getRecentMangaLimit`, `getHistoryPerPeriod`, `observeAllRecentsTypes`, `observeChapterHistoryByMangaId`, `getChapterHistoryByMangaId`, `getChapterHistoryByMangaIds`, `getHistoryByMangaId`, `observeHistoryByMangaId`, `getHistoryByMangaIds`, `getHistoryByChapterUrl`, `getTotalReadDuration`, `getHistoryByChapterId`, `insertHistory`, `updateHistoryLastRead`, `upsertHistory`, `upsertHistoryList`, `deleteAllHistory`, `deleteHistoryNoLastRead`. 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/org/nekomanga/data/database/repository/HistoryRepository.kt:8
  • `MangaRepository` declares 34 abstract methods: `observeLibrary`, `getLibraryList`, `observeMangaList`, `getMangaList`, `observeFavoriteMangaList`, `getFavoriteMangaList`, `getMangaByIds`, `getMangaByUrlAndSource`, `getMangaByUrls`, `getMangaByUrl`, `getMangaById`, `observeMangaById`, `observeReadNotInLibraryManga`, `getReadNotInLibraryManga`, `observeLastReadMangaIds`, `observeLastFetchedMangaIds`, `insertManga`, `insertMangaList`, `updateManga`, `updateMangaList`, `deleteManga`, `deleteMangaList`, `deleteAllNotInLibrary`, `deleteAllNotInLibraryAndNotRead`, `deleteAllManga`, `updateFavorite`, `updateDateAdded`, `updateViewerFlags`, `updateChapterFlags`, `updateMangaInfo`, `updateLastUpdated`, `updateNextUpdated`, `updateScanlatorFilter`, `updateLanguageFilter`. 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/org/nekomanga/data/database/repository/MangaRepository.kt:7

What to do

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

Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.

DM10 · One transaction, one aggregate10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.

Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.

DM11 · Constructible invalid state4.1 / 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.

  • `ArtworkEntity`'s public constructor takes `fileName`, `volume`, `locale`, `description` 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 `ArtworkEntity` 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/org/nekomanga/data/database/entity/ArtworkEntity.kt:22
  • `BrowseFilterEntity`'s public constructor takes `name`, `filters` 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 `BrowseFilterEntity` 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/org/nekomanga/data/database/entity/BrowseFilterEntity.kt:8
  • `CategoryEntity`'s public constructor takes `name`, `mangaOrder` 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 `CategoryEntity` 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/org/nekomanga/data/database/entity/CategoryEntity.kt:8
  • `ChapterEntity`'s public constructor takes `url`, `name`, `chapterTxt`, `chapterTitle`, … 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 `ChapterEntity` 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/org/nekomanga/data/database/entity/ChapterEntity.kt:22
  • `MangaAggregateEntity`'s public constructor takes `volumes` 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 `MangaAggregateEntity` 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/org/nekomanga/data/database/entity/MangaAggregateEntity.kt:20
  • `MangaEntity`'s public constructor takes `url`, `artist`, `author`, `description`, … 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 `MangaEntity` 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/org/nekomanga/data/database/entity/MangaEntity.kt:10
  • `MangaSimilarEntity`'s public constructor takes `mangaId`, `data` 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 `MangaSimilarEntity` 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/org/nekomanga/data/database/entity/MangaSimilarEntity.kt:9
  • `MergeMangaEntity`'s public constructor takes `coverUrl`, `title`, `url` 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 `MergeMangaEntity` 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/org/nekomanga/data/database/entity/MergeMangaEntity.kt:23
  • `ScanlatorGroupEntity`'s public constructor takes `name`, `uuid`, `description` 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 `ScanlatorGroupEntity` 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/org/nekomanga/data/database/entity/ScanlatorGroupEntity.kt:9
  • `TrackEntity`'s public constructor takes `title`, `trackingUrl` 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 `TrackEntity` 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/org/nekomanga/data/database/entity/TrackEntity.kt:26
  • `UploaderEntity`'s public constructor takes `username`, `uuid` 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 `UploaderEntity` 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/org/nekomanga/data/database/entity/UploaderEntity.kt:9

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.

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.

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

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

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P3 · Security & performance tooling3.0 / 10Weak✓ 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 5 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:3

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

P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×4) — REDACTED:50, REDACTED:58, REDACTED:66, …

What to do

  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
PF1 · Benchmark discipline8.0 / 10Strong✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

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

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

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

X13 · Undrained process stream3.5 / 10Weak✓ Tool-verified

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

  • The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `process.inputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `process.errorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a coroutine or thread per stream), merge them with `redirectErrorStream(true)` before `start()`, or discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`). — app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt:59

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

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 propagation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether suspend functions that make a cancellable request accept or pass on 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.

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.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. 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 `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. 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.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. 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.3 / 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. (×16) — core/src/main/kotlin/tachiyomi/core/util/system/DeviceUtil.kt:32, core/src/main/kotlin/tachiyomi/core/util/system/DeviceUtil.kt:48, core/src/main/kotlin/tachiyomi/core/preference/AndroidPreference.kt:170, …
  • `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. (×11) — core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:76, core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:89, core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:99, …
  • `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — app/src/main/java/eu/kanade/tachiyomi/util/system/GLUtil.kt:83, app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt:73
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×2) — app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt:45, app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt:51

What to do

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health77.2StrongSolid.
Architecture87.9StrongSolid.
Maturity66.9AdequateAcceptable, with room to improve.
Readiness46.1Weak — gated by P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security43.2Weak — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling80.6StrongSolid.
Performance88.6StrongStrongest 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 — 33 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 69 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Kotlin imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean.
  • 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
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~31871 lines of test source are present (.kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .kt suite was found but not re-run
  • D12 Dependency Hygiene — Not scored — a Gradle build resolved 659 artifact(s) across its subprojects (165 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.
  • 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.
  • D20 ADR Quality — Repository kind not determined
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .kt, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) and a Gradle version catalogue — not scanned yet).
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 12 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.
  • D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) and a Gradle version catalogue — not scanned yet).
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • 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
  • DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
  • DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • 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)
  • DM9 Scattered domain decisions — not measured — scattered-decision detection needs expression-level symbol resolution: a comparison operand bound to the member it judges (arm one) and a construction bound to the type it produces (arm two). A Roslyn compilation carries both; arm two alone also runs on any frontend that declares whether a construction is produced or passed, and this target loaded neither
  • 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
  • M4 Documentation accuracy — Not applicable: the 2 current-state document(s) make no claim of a kind M4 checks.
  • 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'.
  • P2 Observability — This repository's JVM source (5 module(s), 909 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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
  • 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
  • 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 — 38 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
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 595 finding(s)
D3 · God Classes · MethodTooLong · ×56
  • MethodTooLong: SettingsScreenKt.SettingsScreen app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:60 — MethodTooLong — SettingsScreen runs 333 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 233 over it, 3.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PagerPageItemKt.PagerPageItem app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.kt:57 — MethodTooLong — PagerPageItem runs 273 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 173 over it, 2.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ChapterSourceSyncKt.syncChaptersWithSource app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt:38 — MethodTooLong — syncChaptersWithSource runs 268 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 168 over it, 2.68× 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: FilterBrowseSheetKt.FilterBrowseSheet app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:80 — MethodTooLong — FilterBrowseSheet runs 234 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 134 over it, 2.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MangaScreenKt.MangaScreen app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:101 — MethodTooLong — MangaScreen runs 199 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× 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: AboutScreenKt.AboutWrapper app/src/main/java/org/nekomanga/presentation/screens/AboutScreen.kt:125 — MethodTooLong — AboutWrapper runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainScreenKt.MainScreen app/src/main/java/org/nekomanga/presentation/screens/MainScreen.kt:44 — MethodTooLong — MainScreen runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BrowseScreenKt.BrowseWrapper app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:141 — MethodTooLong — BrowseWrapper runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TrackingSettingsScreen.servicesGroup app/src/main/java/org/nekomanga/presentation/screens/settings/screens/TrackingSettingsScreen.kt:85 — MethodTooLong — servicesGroup runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FeedScreenKt.FeedWrapper app/src/main/java/org/nekomanga/presentation/screens/FeedScreen.kt:172 — MethodTooLong — FeedWrapper runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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: SmartBackgroundAnalyzer.analyze app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/SmartBackground.kt:37 — MethodTooLong — analyze runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× 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: MangaScreenKt.MangaScreenWrapper app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:373 — MethodTooLong — MangaScreenWrapper runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HorizontalCategoriesPageKt.HorizontalCategoriesPage app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:55 — MethodTooLong — HorizontalCategoriesPage runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× 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: ReaderSettingsSheetKt.LayoutSettingsTab app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderSettingsSheet.kt:225 — MethodTooLong — LayoutSettingsTab runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.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: LibraryScreenKt.LibraryWrapper app/src/main/java/org/nekomanga/presentation/screens/LibraryScreen.kt:165 — MethodTooLong — LibraryWrapper runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.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: Companion.getSearchTerms app/src/main/java/org/nekomanga/presentation/screens/settings/screens/ReaderSettingsScreen.kt:488 — MethodTooLong — getSearchTerms runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.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: WebtoonScrollAnchorResolver.resolveReanchorTarget app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonScrollAnchorResolver.kt:26 — MethodTooLong — resolveReanchorTarget runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× 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: ReaderPreloadControllerImpl.onPositionChanged app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:88 — MethodTooLong — onPositionChanged runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DatabaseMigrations.restoreDataFromTempTables app/src/main/java/org/nekomanga/data/database/migration/DatabaseMigrations.kt:220 — MethodTooLong — restoreDataFromTempTables runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TrackingDateSheetKt.TrackingDateSheet app/src/main/java/org/nekomanga/presentation/components/sheets/TrackingDateSheet.kt:55 — MethodTooLong — TrackingDateSheet runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× 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: DetailsBottomSheetKt.DetailsBottomSheet app/src/main/java/org/nekomanga/presentation/screens/manga/DetailsBottomSheet.kt:53 — MethodTooLong — DetailsBottomSheet runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.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: AddEditCategoriesScreen.Content app/src/main/java/org/nekomanga/presentation/screens/settings/screens/AddEditCategoriesScreen.kt:58 — MethodTooLong — Content runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainActivity.onCreate app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt:80 — MethodTooLong — onCreate runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.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: ButtonBlockKt.ButtonBlock app/src/main/java/org/nekomanga/presentation/screens/manga/ButtonBlock.kt:60 — MethodTooLong — ButtonBlock runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DisplayScreenKt.DisplayWrapper app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:130 — MethodTooLong — DisplayWrapper runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 31 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×29
  • Swallowed exception (caught, then discarded) core/src/main/kotlin/tachiyomi/core/util/system/DeviceUtil.kt:32 — `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) core/src/main/kotlin/tachiyomi/core/util/system/DeviceUtil.kt:48 — `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) core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:76 — `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) core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:89 — `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) core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:99 — `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) core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:109 — `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) core/src/main/kotlin/tachiyomi/core/preference/AndroidPreference.kt:170 — `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) core/src/main/kotlin/tachiyomi/core/preference/AndroidPreference.kt:192 — `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/eu/kanade/tachiyomi/util/system/GLUtil.kt:83 — `catch (_: Throwable)` 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/eu/kanade/tachiyomi/util/system/ImageUtil.kt:42 — `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/eu/kanade/tachiyomi/util/system/MiuiUtil.kt:21 — `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/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1407 — `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/eu/kanade/tachiyomi/ui/reader/domain/CheckTallPageUseCase.kt:30 — `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/eu/kanade/tachiyomi/ui/reader/domain/CheckWidePageUseCase.kt:35 — `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/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:287 — `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/eu/kanade/tachiyomi/source/online/merged/projectsuki/ProjectSuki.kt:287 — `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/eu/kanade/tachiyomi/source/online/merged/atsumaru/dto/AtsumaruDto.kt:235 — `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/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt:179 — `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/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt:279 — `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/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt:291 — `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/eu/kanade/tachiyomi/data/track/mangaupdates/MangaUpdatesApi.kt:111 — `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/eu/kanade/tachiyomi/data/track/mangabaka/MangaBaka.kt:200 — `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/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt:184 — `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) REDACTED:299 — `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/eu/kanade/tachiyomi/data/track/anilist/AnilistModels.kt:37 — `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.
  • + 4 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×20
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt:336 — app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt changed 14 times in last 90 days and 12 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is Downloader.queueChapters at line 336), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: chapters saved as folders are downloaded again (#3534)”; “fix: pausing downloads can drop a downloader started at the same time (#3521)”; “fix: downloads stay running after deleting the manga being downloaded (#3516)”; “fix: deleted chapter being zipped shows a download error (#3519)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/data/coil/ReaderPageFetcher.kt app/src/main/java/eu/kanade/tachiyomi/data/coil/ReaderPageFetcher.kt:325 — app/src/main/java/eu/kanade/tachiyomi/data/coil/ReaderPageFetcher.kt changed 11 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ReaderPageSplitFetcher.platformFullDecode at line 325), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: reader pages whose cached image is gone fail with ENOENT (#3520)”; “fix: reader freezes and runs out of memory on a very tall page (#3527)”; “fix: canvas bitmap limit (#3481)”; “fix: retry a native decode that runs out of memory at a smaller size (#3480)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/data/coil/ReaderPageFetcher.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt:357 — app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt changed 9 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is DownloadManager.cleanupChapters at line 357), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: starting downloads blocks the main thread on WorkManager (#3546)”; “fix: deleting the last downloaded chapter wipes a chapter still downloading (#3535)”; “fix: chapters saved as folders are downloaded again (#3534)”; “fix: pausing downloads can drop a downloader started at the same time (#3521)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:26 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is R2LPagerViewer.moveRight at line 26), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: navigate to pan (#3478)”; “fix: pager preload reset and tap nav (#3459)”; “fix: harden chapter navigation and prevent unwanted jumps in paged reader (#3376)”; “fix: synchronize paged reader page position on swipe and improve tap responsiveness (#3352)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:111 — app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ImageUtil.toImageUtilType at line 111), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: reader freezes and runs out of memory on a very tall page (#3527)”; “fix: reader crashes on Android 14 and older with pages just over 100 MB (#3525)”; “fix: downloads save HTTP error pages as chapter images (#3493)”; “fix: smart reader background ignores the page (#3489)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt:180 — app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is MangaExtensionsKt.toLibraryMangaItem at line 180), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: show the library entry instead of a copy for titles stored as /manga/ (#3597)”; “fix: open the library entry instead of a copy for damaged titles (#3588)”; “fix: keep stored fields when a section refresh joins a running update (#3568)”; “fix: sync title when returning to browse screen (#3378)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/ReaderWebtoonController.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/ReaderWebtoonController.kt:97 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/ReaderWebtoonController.kt changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is ReaderWebtoonController.splitPage at line 97), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: reader reloads double with every Split tall images toggle (#3507)”; “fix: webtoon keeps tall page slices after Split tall images is turned off (#3506)”; “fix: canvas bitmap limit (#3481)”; “fix: webtoon quality still lacking (#3355)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/ReaderWebtoonController.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/SplitPageLayout.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/SplitPageLayout.kt:116 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/SplitPageLayout.kt changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is SplitPageLayoutKt.SplitPageHalfLayout at line 116), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: tall reader pages decode at 4096 px and look blurry (#3490)”; “fix: paged pages that fail to decode stay blank with no Retry (#3484)”; “fix: canvas bitmap limit (#3481)”; “fix: reader color filters”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/SplitPageLayout.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/jobs/follows/FollowsSyncProcessor.kt app/src/main/java/eu/kanade/tachiyomi/jobs/follows/FollowsSyncProcessor.kt:154 — app/src/main/java/eu/kanade/tachiyomi/jobs/follows/FollowsSyncProcessor.kt changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is FollowsSyncProcessor.toMangaDex at line 154), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: keep a title unfollowed when MangaDex refuses it during a push (#3599)”; “fix: stop Add to follows running a Pull for manga id 1 (#3571)”; “fix: stop Pull follows adding copies of damaged titles (#3570)”; “fix: starting or stopping a library update blocks the main thread (#3547)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/jobs/follows/FollowsSyncProcessor.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt:860 — app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is LibraryViewModel.filterToggled at line 860), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: stop the Last read and Date fetched sorts crashing when a title is removed (#3592)”; “fix: stop Add to follows running a Pull for manga id 1 (#3571)”; “fix: keep stored fields when a section refresh joins a running update (#3568)”; “fix: starting or stopping a library update blocks the main thread (#3547)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:911 — app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is FeedViewModel.updateReadOnFeed at line 911), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: resolve empty history feed and harden feed pagination concurrency (#3573)”; “fix: starting or stopping a library update blocks the main thread (#3547)”; “fix: moving a download already at the top or bottom restarts the downloader (#3518)”; “fix: reordering the download queue can lose or repeat a download (#3522)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt:32 — app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is TachiyomiImageDecoder.decode at line 32), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: tall reader pages decode at 4096 px and look blurry (#3490)”; “fix: tall pages crash or draw blank in the paged reader (#3483)”; “fix: retry a native decode that runs out of memory at a smaller size (#3480)”; “fix: decode tall AVIF webtoon slices with the bundled decoder (#3429)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/data/coil/TachiyomiImageDecoder.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt:60 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is ReaderPage.isFromSamePage at line 60), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: smart reader background ignores the page (#3489)”; “fix: stop decoding a failed webtoon page again on every scroll pass (#3464)”; “fix: webtoon quality still lacking (#3355)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt:209 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is PagerConfig.updateNavigation at line 209), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: navigate to pan (#3478)”; “fix: restore image scale types and initial alignment in compose paged reader (#3349)”; “fix: disable page animations not working in reader (#3319)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/org/nekomanga/App.kt app/src/main/java/org/nekomanga/App.kt:79 — app/src/main/java/org/nekomanga/App.kt changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is App.onCreate at line 79), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: let an interrupted library update run again on the next start (#3587)”; “fix: save crash logs in the crashing process and share them (#3463)”; “fix: clean up leftover chapter copies and online covers on app start (#3456)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/App.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt app/src/main/java/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt:70 — app/src/main/java/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is StatusSyncJob.doWork at line 70), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: let Add to follows take a selection of any size (#3585)”; “fix: stop Add to follows running a Pull for manga id 1 (#3571)”; “fix: starting or stopping a library update blocks the main thread (#3547)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt:77 — app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is DownloadCache.isChapterDownloaded at line 77), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: stop listing another manga's downloads as local chapters (#3396)”; “fix: deleting the last downloaded chapter wipes a chapter still downloading (#3535)”; “fix: chapters saved as folders are downloaded again (#3534)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt:123 — app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is BackupMangaKt.combineRows at line 123), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: keep tracker progress and read history when a backup lists a title twice (#3598)”; “fix: keep each Komga, Suwayomi and Kagane series when restoring over a title (#3590)”; “fix: keep merges and damaged titles when restoring a backup (#3569)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaUpdateCoordinator.kt app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaUpdateCoordinator.kt:164 — app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaUpdateCoordinator.kt changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is MangaUpdateCoordinator.updateChapters at line 164), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: keep merged chapters when opening a MangaDex chapter link (#3574)”; “fix: keep merged chapters when a merged source returns none (#3560)”; “fix: prevent crashes from network interceptor exceptions during updates (#3449)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaUpdateCoordinator.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/eu/kanade/tachiyomi/util/system/GLUtil.kt app/src/main/java/eu/kanade/tachiyomi/util/system/GLUtil.kt:32 — app/src/main/java/eu/kanade/tachiyomi/util/system/GLUtil.kt changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is GLUtil.canvasBitmapBytes at line 32), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: reader crashes on Android 14 and older with pages just over 100 MB (#3525)”; “fix: canvas bitmap limit (#3481)”; “fix: enable app unit testing under testDebugUnitTest (#3388)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/util/system/GLUtil.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 · God Classes · FileTooLong · ×19
  • FileTooLong: reader/ReaderActivity.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt — FileTooLong — 1785 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1285 over it, 3.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: manga/MangaViewModel.kt app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt — FileTooLong — 1616 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: MangaViewModel (133-2366). The bar is 500 significant lines; this is 1116 over it, 3.23× 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: reader/ReaderViewModel.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt — FileTooLong — 1445 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ReaderViewModel (131-2198). The bar is 500 significant lines; this is 945 over it, 2.89× 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: library/LibraryViewModel.kt app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt — FileTooLong — 911 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: LibraryViewModel (85-1335). The bar is 500 significant lines; this is 411 over it, 1.82× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: feed/FeedViewModel.kt app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: FeedViewModel (47-1255). The bar is 500 significant lines; this is 354 over it, 1.71× 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: library/LibraryUpdateJob.kt app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt — FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: LibraryUpdateJob (109-991). The bar is 500 significant lines; this is 199 over it, 1.40× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: suwayomi/Suwayomi.kt app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt — FileTooLong — 693 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Suwayomi (45-912). The bar is 500 significant lines; this is 193 over it, 1.39× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: comix/Comix.kt app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/Comix.kt — FileTooLong — 688 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: Comix (53-924). The bar is 500 significant lines; this is 188 over it, 1.38× 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: reader/ReaderControls.kt app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt — FileTooLong — 686 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 186 over it, 1.37× 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: screens/MangaScreen.kt app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt — FileTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 177 over it, 1.35× 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: stats/DetailedStats.kt app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt — FileTooLong — 664 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 164 over it, 1.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: loader/ReaderPreloadControllerImpl.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt — FileTooLong — 614 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: onRequestPreloadChapter (50-854). The bar is 500 significant lines; this is 114 over it, 1.23× 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: notification/NotificationReceiver.kt app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt — FileTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: NotificationReceiver (55-1026). The bar is 500 significant lines; this is 90 over it, 1.18× 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/FilterBrowseSheet.kt app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.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: reader/ReaderSettingsSheet.kt app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderSettingsSheet.kt — FileTooLong — 550 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 50 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: screens/ReaderSettingsScreen.kt app/src/main/java/org/nekomanga/presentation/screens/settings/screens/ReaderSettingsScreen.kt — FileTooLong — 531 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: ReaderSettingsScreen (28-688). The bar is 500 significant lines; this is 31 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: viewer/ComposePagerViewer.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt — FileTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 27 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: system/ImageUtil.kt app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt — FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: download/Downloader.kt app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt — FileTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: Downloader (69-900). The bar is 500 significant lines; this is 3 over it, 1.01× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D15 · Churn × Complexity Hotspots · Hotspot · ×14
  • Hotspot: app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:368 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 91 in ReaderActivity.onCreate at line 368. 15 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.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/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:68 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in ComposeWebtoonViewerKt.ComposeWebtoonViewer at line 68. 22 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.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/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.kt:57 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.kt changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in PagerPageItemKt.PagerPageItem at line 57. 18 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:582 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in ComposePagerViewerKt.executeNavCommand at line 582. 18 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.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/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:82 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in DoublePageLayoutKt.DoublePageLayout at line 82. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.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/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:134 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in WebtoonPageItemKt.WebtoonPageContent at line 134. 8 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.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/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt:365 — app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in LibraryUpdateJob.updateMangaChapters at line 365. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.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/eu/kanade/tachiyomi/ui/reader/model/ReaderUiItem.kt app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderUiItem.kt:91 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderUiItem.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ReaderUiItemKt.isEquivalentTo at line 91. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderUiItem.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/org/nekomanga/presentation/screens/reader/viewer/PagerTapNavigationModifier.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerTapNavigationModifier.kt:32 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerTapNavigationModifier.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in PagerTapNavigationModifierKt.pagerTapNavigation at line 32. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerTapNavigationModifier.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/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt:38 — app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in ChapterSourceSyncKt.syncChaptersWithSource at line 38. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.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/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:59 — app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in NotificationReceiver.onReceive at line 59. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.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/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:505 — app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in Suwayomi.sanitizeName at line 505. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.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/eu/kanade/tachiyomi/ui/main/MainActivity.kt app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt:80 — app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in MainActivity.onCreate at line 80. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.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/org/nekomanga/presentation/screens/reader/viewer/WebtoonTapNavigationModifier.kt app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonTapNavigationModifier.kt:30 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonTapNavigationModifier.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in WebtoonTapNavigationModifierKt.webtoonTapNavigation at line 30. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:02:50 -05:00' --until='2026-11-13 12:02:50 -05:00' --full-history --no-merges -- app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonTapNavigationModifier.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 · God Classes · ClassTooLong · ×11
  • ClassTooLong: MangaViewModel app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:133 — ClassTooLong — 1457 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 1057 over it, 3.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ReaderViewModel app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:131 — ClassTooLong — 1318 significant lines (blank, comment-only and punctuation-only lines excluded), 84 methods. The bar is 400 significant lines; this is 918 over it, 3.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LibraryViewModel app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt:85 — ClassTooLong — 829 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 429 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FeedViewModel app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:47 — ClassTooLong — 788 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 388 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Comix app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/Comix.kt:53 — ClassTooLong — 638 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 238 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Suwayomi app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:45 — ClassTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 232 over it, 1.58× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LibraryUpdateJob app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt:109 — ClassTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 193 over it, 1.48× 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: NotificationReceiver app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:55 — ClassTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 142 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ReaderSettingsScreen app/src/main/java/org/nekomanga/presentation/screens/settings/screens/ReaderSettingsScreen.kt:28 — ClassTooLong — 506 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 106 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: Downloader app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt:69 — ClassTooLong — 437 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 37 over it, 1.09× 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: FeedRepositoryImpl app/src/main/java/org/nekomanga/data/repository/FeedRepositoryImpl.kt:39 — ClassTooLong — 419 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 19 over it, 1.05× 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 · TooManyMethods · ×11
  • TooManyMethods: ReaderViewModel app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:131 — TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MangaViewModel app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:133 — TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PreferencesHelper app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt:41 — TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ReaderActivity app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:196 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LibraryViewModel app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt:85 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FeedViewModel app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:47 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: DownloadManager app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt:46 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MangaRepositoryImpl app/src/main/java/org/nekomanga/data/database/repository/MangaRepositoryImpl.kt:26 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. Most of these members implement repository.MangaRepository (34 of 36 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: ImageUtil app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:36 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TrackService app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:26 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MangaDex app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt:51 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
DM11 · Constructible invalid state · Constructible in an invalid state · ×11
  • Constructible in an invalid state: ArtworkEntity app/src/main/java/org/nekomanga/data/database/entity/ArtworkEntity.kt:22 — `ArtworkEntity`'s public constructor takes `fileName`, `volume`, `locale`, `description` 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 `ArtworkEntity` 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: BrowseFilterEntity app/src/main/java/org/nekomanga/data/database/entity/BrowseFilterEntity.kt:8 — `BrowseFilterEntity`'s public constructor takes `name`, `filters` 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 `BrowseFilterEntity` 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: CategoryEntity app/src/main/java/org/nekomanga/data/database/entity/CategoryEntity.kt:8 — `CategoryEntity`'s public constructor takes `name`, `mangaOrder` 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 `CategoryEntity` 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: ChapterEntity app/src/main/java/org/nekomanga/data/database/entity/ChapterEntity.kt:22 — `ChapterEntity`'s public constructor takes `url`, `name`, `chapterTxt`, `chapterTitle`, … 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 `ChapterEntity` 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: MangaAggregateEntity app/src/main/java/org/nekomanga/data/database/entity/MangaAggregateEntity.kt:20 — `MangaAggregateEntity`'s public constructor takes `volumes` 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 `MangaAggregateEntity` 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: MangaEntity app/src/main/java/org/nekomanga/data/database/entity/MangaEntity.kt:10 — `MangaEntity`'s public constructor takes `url`, `artist`, `author`, `description`, … 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 `MangaEntity` 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: MangaSimilarEntity app/src/main/java/org/nekomanga/data/database/entity/MangaSimilarEntity.kt:9 — `MangaSimilarEntity`'s public constructor takes `mangaId`, `data` 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 `MangaSimilarEntity` 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: MergeMangaEntity app/src/main/java/org/nekomanga/data/database/entity/MergeMangaEntity.kt:23 — `MergeMangaEntity`'s public constructor takes `coverUrl`, `title`, `url` 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 `MergeMangaEntity` 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: ScanlatorGroupEntity app/src/main/java/org/nekomanga/data/database/entity/ScanlatorGroupEntity.kt:9 — `ScanlatorGroupEntity`'s public constructor takes `name`, `uuid`, `description` 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 `ScanlatorGroupEntity` 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: TrackEntity app/src/main/java/org/nekomanga/data/database/entity/TrackEntity.kt:26 — `TrackEntity`'s public constructor takes `title`, `trackingUrl` 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 `TrackEntity` 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: UploaderEntity app/src/main/java/org/nekomanga/data/database/entity/UploaderEntity.kt:9 — `UploaderEntity`'s public constructor takes `username`, `uuid` 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 `UploaderEntity` 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.
D35 · Change Coupling · Change coupling · ×10
  • Change coupling: PreferenceKeys.kt ↔ PreferencesHelper.kt app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt:1 — `app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt` change together 92% of the time (157 of the 170 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 157 shared commits counted here, the most recent 3 are `248f0e23` feat: add a setting to open links in the browser (#3390); `a67cdb2d` fix: solve waf challenge on comix merge source (#3358); `9155fd29` fix: SideNav Always/Never setting not working — run `git show` on any of them.
  • Change coupling: LibraryManga.kt ↔ LibraryViewModel.kt app/src/main/java/eu/kanade/tachiyomi/data/database/models/LibraryManga.kt:1 — `app/src/main/java/eu/kanade/tachiyomi/data/database/models/LibraryManga.kt` and `app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt` change together 81% of the time (17 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `24143b1d` fix: update manga cover in library screen when changed (#2908) (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryViewModel.kt`); `4b4ee798` feat: unavailable flters and stats (#2134) (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt`); `76073b74` More customizable auto update options (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt`) — run `git show` on any of them.
  • Change coupling: NekoTheme.kt ↔ Themes.kt app/src/main/java/org/nekomanga/presentation/theme/NekoTheme.kt:1 — `app/src/main/java/org/nekomanga/presentation/theme/NekoTheme.kt` and `app/src/main/java/org/nekomanga/presentation/theme/Themes.kt` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `88590f4f` feat: add Tokyo Night theme (#3202); `9f21900c` feat: Neon Nights theme; `c1c2054c` feat: Add Nord theme — run `git show` on any of them.
  • Change coupling: FeedPage.kt ↔ FeedViewModel.kt app/src/main/java/org/nekomanga/presentation/screens/feed/FeedPage.kt:1 — `app/src/main/java/org/nekomanga/presentation/screens/feed/FeedPage.kt` and `app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `966ec7ed` feat: make the vivid color headers a global thing (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/feed/FeedPresenter.kt`); `f1fd0a46` Add loading bars on summary page (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/feed/FeedPresenter.kt`); `628a7e36` Add summary page on feed (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/feed/FeedPresenter.kt`) — run `git show` on any of them.
  • Change coupling: SimpleStats.kt ↔ StatsViewModel.kt app/src/main/java/org/nekomanga/presentation/screens/stats/SimpleStats.kt:1 — `app/src/main/java/org/nekomanga/presentation/screens/stats/SimpleStats.kt` and `app/src/main/java/org/nekomanga/presentation/screens/stats/StatsViewModel.kt` change together 62% of the time (13 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `2f1385ee` ref: decouple statistics aggregation and heavy dataset transformation…; `da9606f2` ref: Remove MangaLife and Comick (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/more/stats/StatsViewModel.kt`); `04dbc88a` feat: add time duration stat for library update (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/more/stats/StatsPresenter.kt`) — run `git show` on any of them.
  • Change coupling: MangaViewModel.kt ↔ DetailsBottomSheet.kt app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1 — `app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt` and `app/src/main/java/org/nekomanga/presentation/screens/manga/DetailsBottomSheet.kt` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `6602a24e` feat: multi merge (#3056); `577d8f27` perf: refactor MangaDetailScreenState into distinct StateFlows (#2866); `70b097e2` fix: missing snackbar when saving a cover to device, also close the s… — run `git show` on any of them.
  • Change coupling: AppUpdateDialog.kt ↔ DescriptionBlock.kt app/src/main/java/org/nekomanga/presentation/components/dialog/AppUpdateDialog.kt:1 — `app/src/main/java/org/nekomanga/presentation/components/dialog/AppUpdateDialog.kt` and `app/src/main/java/org/nekomanga/presentation/screens/manga/DescriptionBlock.kt` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `90af0432` feat: implement MarkdownRender and enable GFM tables (#3235); `920c901b` fix: manga description constant flashing when downloading a chapter (at that commit the file was still `app/src/main/java/org/nekomanga/presentation/screens/mangadetails/DescriptionBlock.kt`); `a621c8b0` update markdown library to 0.13.0 (at that commit the file was still `app/src/main/java/org/nekomanga/presentation/screens/mangadetails/DescriptionBlock.kt`) — run `git show` on any of them.
  • Change coupling: MangaViewModel.kt ↔ FilterChapterSheet.kt app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1 — `app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt` and `app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `387ce184` feat: Add ability to filter by source (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailPresenter.kt`); `f35121b0` feat: better source and smart sorting (#2199) (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailPresenter.kt`); `99b36234` fix: filter (un)available correctly on manga details page (#2190) (at that commit the file was still `app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailPresenter.kt`) — run `git show` on any of them.
  • Change coupling: ChapterImpl.kt ↔ ChapterSourceSync.kt app/src/main/java/eu/kanade/tachiyomi/data/database/models/ChapterImpl.kt:1 — `app/src/main/java/eu/kanade/tachiyomi/data/database/models/ChapterImpl.kt` and `app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `f35121b0` feat: better source and smart sorting (#2199); `23d5e67c` Add Uploader to ChapterRow when No Group (#2067); `ac3613cb` show languages in chapter list — run `git show` on any of them.
  • Change coupling: ChapterImpl.kt ↔ ApiMangaParser.kt app/src/main/java/eu/kanade/tachiyomi/data/database/models/ChapterImpl.kt:1 — `app/src/main/java/eu/kanade/tachiyomi/data/database/models/ChapterImpl.kt` and `app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/ApiMangaParser.kt` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `74aefb4f` feat: show unavailable chapters (#2133); `23d5e67c` Add Uploader to ChapterRow when No Group (#2067); `ac3613cb` show languages in chapter list — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×9
  • Duplicated block (12 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:99 — app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:99-110 | app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:120-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:747 — app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:747-758 | app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:810-821 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:747` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1718 — app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1718-1729 | app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1745-1756 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1718` it begins part-way through the construct above it, so those exact lines 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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:235 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:235-246 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:27-38 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt` and `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:235` it does not close everything it opens, so those exact lines 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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:268 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:268-279 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:59-70 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt` and `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/library/LibraryAppBarActions.kt:38 — app/src/main/java/org/nekomanga/presentation/screens/library/LibraryAppBarActions.kt:38-49 | app/src/main/java/org/nekomanga/presentation/screens/manga/MangaDetailsAppBarActions.kt:26-37 — 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/org/nekomanga/presentation/screens/library/LibraryAppBarActions.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.
  • Duplicated block (12 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:66 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:66-77 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:102-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:66` it does not close everything it opens, so those exact lines 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/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:248 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:248-259 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:272-283 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFactory.kt:17 — app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFactory.kt:17-28 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:299-310 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×8
  • Edited copy of a member (9 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:198 — app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:198-206 | app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:215-230 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/MissingChapters.kt:17 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/MissingChapters.kt:17-25 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/MissingChapters.kt:40-48 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:189 — app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:189-200 | app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:709-717 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaUtil.kt:42 — app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaUtil.kt:42-50 | app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt:125-133 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt:60 — app/src/main/java/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt:60-68 | app/src/main/java/eu/kanade/tachiyomi/jobs/tracking/TrackingSyncJob.kt:51-59 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreJob.kt:66 — app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreJob.kt:66-75 | app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadJob.kt:132-140 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/database/models/ArtworkImpl.kt:9 — app/src/main/java/eu/kanade/tachiyomi/data/database/models/ArtworkImpl.kt:9-17 | app/src/main/java/org/nekomanga/data/database/mapper/ArtworkMappers.kt:6-15 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/database/models/MergeMangaImpl.kt:32 — app/src/main/java/eu/kanade/tachiyomi/data/database/models/MergeMangaImpl.kt:32-40 | app/src/main/java/org/nekomanga/data/database/mapper/MergeMangaMappers.kt:6-15 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×8
  • Duplicated block (14 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:177 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:177-190 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:197-210 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/ResolveChapterTransitionUiModelUseCase.kt:47 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/ResolveChapterTransitionUiModelUseCase.kt:47-60 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/ResolveChapterTransitionUiModelUseCase.kt:77-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/ui/reader/domain/ResolveChapterTransitionUiModelUseCase.kt:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonActiveItemResolver.kt:43 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonActiveItemResolver.kt:43-56 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonActiveItemResolver.kt:72-85 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:177 — app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:177-190 | app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:248-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:177` it begins part-way through the construct above it, so those exact lines 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/org/nekomanga/presentation/components/DownloadButton.kt:549 — app/src/main/java/org/nekomanga/presentation/components/DownloadButton.kt:549-562 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/ContinueReadingCard.kt:170-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:146 — app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:146-159 | app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt:112-125 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt` and `app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivityViewModel.kt:72 — app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivityViewModel.kt:72-85 | app/src/main/java/org/nekomanga/presentation/screens/about/AboutViewModel.kt:98-111 — 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 (14 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:320 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:320-333 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:337-350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:320` it begins part-way through the construct above it, so those 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) · ×8
  • Duplicated block (10 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:158 — app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:158-167 | app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:179-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:161 — app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:161-170 | app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:265-274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:220 — app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:220-229 | app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:250-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/org/nekomanga/data/repository/FeedRepositoryImpl.kt:161 — app/src/main/java/org/nekomanga/data/repository/FeedRepositoryImpl.kt:161-170 | app/src/main/java/org/nekomanga/data/repository/FeedRepositoryImpl.kt:282-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/data/repository/FeedRepositoryImpl.kt:161` 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/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:527 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:527-536 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:542-551 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:527` 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/org/nekomanga/presentation/screens/reader/viewer/ReaderPageOverlay.kt:59 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderPageOverlay.kt:59-68 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderPageOverlay.kt:96-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderPageOverlay.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.
  • Duplicated block (10 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:205 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:205-214 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:225-234 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt:175 — app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt:175-185 | app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt:121-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×7
  • Edited copy of a member (16 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:216 — app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:216-233 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:235-250 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:743 — app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:743-758 | app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:806-821 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:93 — app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:93-111 | app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:118-133 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:222 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:222-237 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:242-261 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/ExpressivePicker.kt:218 — app/src/main/java/org/nekomanga/presentation/components/ExpressivePicker.kt:218-233 | app/src/main/java/org/nekomanga/presentation/components/ExpressivePicker.kt:239-257 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/MarkdownRender.kt:103 — app/src/main/java/org/nekomanga/presentation/components/MarkdownRender.kt:103-123 | app/src/main/java/org/nekomanga/presentation/components/MarkdownRender.kt:131-146 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt:39 — app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt:39-54 | app/src/main/java/eu/kanade/tachiyomi/jobs/tracking/TrackingSyncJob.kt:99-114 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×7
  • Duplicated block (15 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:276 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:276-291 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:675-689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:276` it begins part-way through the construct above it, so those exact lines 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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:239 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:239-253 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:63-77 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt` and `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:272 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:272-286 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:31-45 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt` and `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:147 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:147-161 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:195-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:147` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:47 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:47-61 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/UpdatesCard.kt:49-63 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt` and `app/src/main/java/org/nekomanga/presentation/screens/feed/updates/UpdatesCard.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 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/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/main/BottomBar.kt:26 — app/src/main/java/org/nekomanga/presentation/screens/main/BottomBar.kt:26-40 | app/src/main/java/org/nekomanga/presentation/screens/main/NavigationSideBar.kt:43-57 — 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/org/nekomanga/presentation/screens/main/BottomBar.kt:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/org/nekomanga/presentation/screens/main/NavigationSideBar.kt:58` calls `Gap` and `app/src/main/java/org/nekomanga/presentation/screens/main/BottomBar.kt:41` 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 (15 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/settings/screens/ReaderSettingsScreen.kt:231 — app/src/main/java/org/nekomanga/presentation/screens/settings/screens/ReaderSettingsScreen.kt:231-245 | app/src/main/java/org/nekomanga/presentation/screens/settings/screens/ReaderSettingsScreen.kt:378-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/org/nekomanga/presentation/screens/settings/screens/ReaderSettingsScreen.kt:231` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×7
  • Duplicated block (11 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:193 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:193-203 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:213-223 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/external/MangaUpHandler.kt:119 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/external/MangaUpHandler.kt:119-129 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/external/MangaUpHandler.kt:157-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/source/online/handlers/external/MangaUpHandler.kt:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:223 — app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:223-233 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:240-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:223` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt:126 — app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt:126-136 | app/src/main/java/org/nekomanga/presentation/screens/similar/SimilarRepo.kt:166-176 — 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/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt:126` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:131 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:131-141 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:180-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:131` it begins part-way through the construct above it, so those exact lines 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/org/nekomanga/presentation/screens/reader/ReaderSettingsSheet.kt:695 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderSettingsSheet.kt:695-705 | app/src/main/java/org/nekomanga/presentation/screens/settings/widgets/SliderPreferenceWidget.kt:89-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderSettingsSheet.kt:695` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:239 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:239-249 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:270-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:239` 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 (7 lines × 2) · ×7
  • Duplicated block (7 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:102 — app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:102-108 | app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaShortcutManager.kt:138-144 — 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/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:235 — app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:235-242 | app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:275-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:235` it does not close everything it opens, so those exact lines 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/org/nekomanga/presentation/screens/BrowseScreen.kt:184 — app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:184-190 | app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:161-168 — 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/org/nekomanga/presentation/screens/BrowseScreen.kt:184` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt:181 — app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt:181-187 | app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt:176-182 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/eu/kanade/tachiyomi/source/model/SChapter.kt:84 — app/src/main/java/eu/kanade/tachiyomi/source/model/SChapter.kt:84-90 | app/src/main/java/org/nekomanga/domain/chapter/Chapter.kt:51-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) app/src/main/java/org/nekomanga/presentation/components/theme/ThemeSelector.kt:134 — app/src/main/java/org/nekomanga/presentation/components/theme/ThemeSelector.kt:134-140 | app/src/main/java/org/nekomanga/presentation/screens/onboarding/ThemeStep.kt:52-59 — 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/org/nekomanga/presentation/components/theme/ThemeSelector.kt:134` it begins part-way through the construct above it, so those exact lines 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/org/nekomanga/presentation/screens/library/filter/FilterBookmarked.kt:13 — app/src/main/java/org/nekomanga/presentation/screens/library/filter/FilterBookmarked.kt:13-19 | app/src/main/java/org/nekomanga/presentation/screens/library/filter/FilterTracked.kt:13-19 — 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×5
  • Edited copy of a member (12 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:538 — app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:538-549 | app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:551-563 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:211 — REDACTED:211-222 | REDACTED:224-235 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:53 — app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:53-64 | app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseViewModel.kt:100-112 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:78 — app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:78-90 | app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:102-113 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/util/system/MiuiUtil.kt:13 — app/src/main/java/eu/kanade/tachiyomi/util/system/MiuiUtil.kt:13-24 | core/src/main/kotlin/tachiyomi/core/util/system/DeviceUtil.kt:23-35 — 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 (10 corresponding lines) · ×5
  • Edited copy of a member (10 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt:57 — app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt:57-67 | app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt:33-42 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:1265 — app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:1265-1274 | app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:1284-1293 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:139 — app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:139-149 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixDescrambler.kt:151-160 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/ArtworkHandler.kt:62 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/ArtworkHandler.kt:62-72 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FollowsHandler.kt:81-90 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/util/system/MiuiUtil.kt:27 — app/src/main/java/eu/kanade/tachiyomi/util/system/MiuiUtil.kt:27-36 | core/src/main/kotlin/tachiyomi/core/util/system/DeviceUtil.kt:57-66 — 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 (22 corresponding lines) · ×4
  • Edited copy of a member (22 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/utils/BlockedGroupUploaderUtils.kt:16 — app/src/main/java/eu/kanade/tachiyomi/source/online/utils/BlockedGroupUploaderUtils.kt:16-37 | app/src/main/java/eu/kanade/tachiyomi/source/online/utils/BlockedGroupUploaderUtils.kt:43-64 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/theme/ThemeSelector.kt:149 — app/src/main/java/org/nekomanga/presentation/components/theme/ThemeSelector.kt:149-170 | app/src/main/java/org/nekomanga/presentation/screens/onboarding/ThemeStep.kt:67-97 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1146 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1146-1167 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1182-1204 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:42 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:42-63 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/LatestChapterHandler.kt:36-57 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×4
  • Edited copy of a member (25 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:798 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:798-822 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:829-853 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1708 — app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1708-1734 | app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1737-1761 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:65 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:65-89 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:100-131 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/CheckedStateComponents.kt:29 — app/src/main/java/org/nekomanga/presentation/components/CheckedStateComponents.kt:29-58 | app/src/main/java/org/nekomanga/presentation/components/TriStateComponents.kt:38-62 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×4
  • Edited copy of a member (15 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:97 — app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:97-115 | app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:118-132 — 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/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:688 — app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:688-704 | app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:716-730 — 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/org/nekomanga/presentation/screens/about/AboutTopAppBar.kt:17 — app/src/main/java/org/nekomanga/presentation/screens/about/AboutTopAppBar.kt:17-31 | app/src/main/java/org/nekomanga/presentation/screens/license/LicenseTopAppBar.kt:13-27 — 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/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1277 — app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1277-1291 | app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:1297-1311 — 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 (13 corresponding lines) · ×4
  • Edited copy of a member (13 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/category/AddEditCategoryTopBar.kt:16 — app/src/main/java/org/nekomanga/presentation/screens/category/AddEditCategoryTopBar.kt:16-29 | app/src/main/java/org/nekomanga/presentation/screens/settings/SettingsTopBar.kt:18-30 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt:137 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt:137-149 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerConfig.kt:209-221 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt:208 — app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt:208-221 | app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt:144-156 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationHandler.kt:37 — app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationHandler.kt:37-50 | app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:781-793 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×4
  • Duplicated block (12 lines × 3) app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:231 — app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:231-244 | app/src/main/java/org/nekomanga/presentation/screens/FeedScreen.kt:285-298 | app/src/main/java/org/nekomanga/presentation/screens/LibraryScreen.kt:295-306 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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/org/nekomanga/presentation/screens/BrowseScreen.kt:231` it begins part-way through the construct above it, so those 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 (12 lines × 3) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/ContinueReadingCard.kt:89 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/ContinueReadingCard.kt:89-100 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:116-127 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/UpdatesCard.kt:122-133 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt` and `app/src/main/java/org/nekomanga/presentation/screens/feed/updates/UpdatesCard.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 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/org/nekomanga/presentation/screens/feed/summary/ContinueReadingCard.kt:89` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 3) app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayViewModel.kt:162 — app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayViewModel.kt:162-173 | app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseViewModel.kt:411-422 | app/src/main/java/org/nekomanga/presentation/screens/similar/SimilarViewModel.kt:118-129 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayViewModel.kt:158` calls `loadNextItems` and `app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseViewModel.kt:408` 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 (12 lines × 3) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:63 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:63-75 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:117-128 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:166-177 — 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/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:63` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×4
  • Duplicated block (8 lines × 2) app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:303 — app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:303-310 | app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:522-529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/components/FastScroller.kt:303` it begins part-way through the construct above it, so those 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/org/nekomanga/presentation/components/FastScroller.kt:302` calls `padding` and `app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:521` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:77 — app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:77-84 | app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:136-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:77` it does not close everything it opens, so those 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/org/nekomanga/presentation/components/MangaListView.kt:144` calls `animateItem` and `app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:85` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:261 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:261-268 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:285-292 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt:159 — app/src/main/java/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt:159-166 | app/src/main/java/eu/kanade/tachiyomi/jobs/tracking/TrackingSyncJob.kt:78-85 — 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/eu/kanade/tachiyomi/jobs/follows/StatusSyncJob.kt:155` calls `clearPushIds` and `app/src/main/java/eu/kanade/tachiyomi/jobs/tracking/TrackingSyncJob.kt:74` 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×4
  • Low cohesion: RestoreHelper (LCOM4 7) app/src/main/java/eu/kanade/tachiyomi/data/backup/RestoreHelper.kt:38 — RestoreHelper's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MangaDex (LCOM4 7) app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt:51 — MangaDex's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MainActivityViewModel (LCOM4 4) app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivityViewModel.kt:32 — MainActivityViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TrackingSettingsViewModel (LCOM4 4) app/src/main/java/eu/kanade/tachiyomi/ui/setting/TrackingSettingsViewModel.kt:25 — TrackingSettingsViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×4
  • Outbound HTTP without resilience REDACTED:50 — `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:58 — `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:66 — `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:238 — `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D17 · Explicit Debt · TodoComment · ×3
  • TodoComment app/src/main/java/eu/kanade/tachiyomi/data/database/models/ArtworkImpl.kt:20 — // TODO rename this to Artwork — 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/eu/kanade/tachiyomi/data/database/models/BrowseFilterImpl.kt:3 — // TODO rename to Browse Filter — 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/eu/kanade/tachiyomi/data/database/models/Manga.kt:226 — // TODO: Log the exception to aid debugging in production environments. — 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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:192 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:192-230 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:269-303 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:342-371 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:411-448 — 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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:234 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:234-264 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:267-297 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:26-56 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:58-88 — 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/org/nekomanga/presentation/screens/stats/DetailedStats.kt:246 — app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:246-264 | app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:274-302 | app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:361-379 | app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:389-407 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:210 — app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:210-229 | app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt:159-178 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt` and `app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:210` 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 (20 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:230 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:230-249 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:409-428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/ReaderControls.kt:230` 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 (20 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:214 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:214-233 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:286-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:214` 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 lines × 2) · ×3
  • Duplicated block (19 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt:116 — app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt:116-134 | app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt:160-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.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.
  • Duplicated block (19 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/display/DisplayTopBar.kt:28 — app/src/main/java/org/nekomanga/presentation/screens/display/DisplayTopBar.kt:28-46 | app/src/main/java/org/nekomanga/presentation/screens/similar/SimilarTopBar.kt:27-45 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/display/DisplayTopBar.kt` and `app/src/main/java/org/nekomanga/presentation/screens/similar/SimilarTopBar.kt` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/display/DisplayTopBar.kt:28` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:267 — app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:267-285 | app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt:186-204 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt` and `app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:267` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:805 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:805-822 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:836-853 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:805` 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/org/nekomanga/domain/manga/Manga.kt:66 — app/src/main/java/org/nekomanga/domain/manga/Manga.kt:66-83 | app/src/main/java/org/nekomanga/domain/manga/Manga.kt:85-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/domain/manga/Manga.kt:66` 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/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:416 — app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:416-433 | app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:464-481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:416` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×3
  • Duplicated block (15–16 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:223 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:223-237 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:246-261 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:246` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15–16 lines × 2) app/src/main/java/org/nekomanga/presentation/components/FooterFilterChip.kt:41 — app/src/main/java/org/nekomanga/presentation/components/FooterFilterChip.kt:41-56 | app/src/main/java/org/nekomanga/presentation/components/TriStateComponents.kt:89-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/components/FooterFilterChip.kt:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/org/nekomanga/presentation/components/TriStateComponents.kt:87` calls `RoundedCornerShape`, `Text` and `app/src/main/java/org/nekomanga/presentation/components/FooterFilterChip.kt:41` 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 (15–16 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:190 — app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:190-205 | app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt:188-202 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt` and `app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt:74 — app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt:74-86 | app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:120-132 — 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/org/nekomanga/presentation/components/MangaGridView.kt:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:233 — app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:233-245 | app/src/main/java/org/nekomanga/presentation/screens/FeedScreen.kt:287-299 — 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/org/nekomanga/presentation/screens/BrowseScreen.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 (13 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:262 — app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:262-274 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:335-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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×3
  • Duplicated block (11 lines × 3) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:354 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:354-364 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:376-386 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:425-435 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:354` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:79 — app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:79-89 | app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:87-97 | app/src/main/java/org/nekomanga/presentation/screens/FeedScreen.kt:97-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 3 call sites, so a change lands once.
  • Duplicated block (11 lines × 3) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:244 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:244-254 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:317-327 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:385-395 — 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/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:244` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) REDACTED:167 — REDACTED:167-172 | REDACTED:194-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 `REDACTED:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:322 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:322-327 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:337-342 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:213 — REDACTED:213-218 | REDACTED:226-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D17 · Explicit Debt · XxxComment · ×2
  • XxxComment app/src/main/java/eu/kanade/tachiyomi/source/online/merged/mangaball/Dto.kt:120 — // Regex to find "Chapter XXX:", "Ch. 12:", "Chapter 12.1 - ", etc. — 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.
  • XxxComment app/src/main/java/eu/kanade/tachiyomi/source/online/merged/mangaball/Dto.kt:135 — // The name is just "Chapter XXX", no title. — 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
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/org/nekomanga/presentation/components/MangaGridView.kt:125 — app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt:125-167 | app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:51-94 | app/src/main/java/org/nekomanga/presentation/screens/feed/history/FeedHistoryPage.kt:43-117 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:105-239 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:254-356 — 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/org/nekomanga/presentation/components/MangaListView.kt:51 — app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:51-94 | app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:107-156 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:49-211 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:105-239 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:254-356 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (70 corresponding lines) · ×2
  • Edited copy of a member (70 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:69 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:69-138 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:82-159 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (70 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:67 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:67-136 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/LatestChapterHandler.kt:61-130 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×2
  • Edited copy of a member (37 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:297 — app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:297-338 | app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:363-399 — 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.
  • Edited copy of a member (37 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:812 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:812-849 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:855-891 — 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 (34 corresponding lines) · ×2
  • Edited copy of a member (34 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:43 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:43-76 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:78-112 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (34 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:410 — app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:410-443 | app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:458-491 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×2
  • Edited copy of a member (35 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/dialog/CleanDownloadsDialog.kt:22 — app/src/main/java/org/nekomanga/presentation/components/dialog/CleanDownloadsDialog.kt:22-66 | app/src/main/java/org/nekomanga/presentation/components/dialog/ClearDatabaseDialog.kt:22-56 — 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.
  • Edited copy of a member (35 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt:100 — app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt:100-134 | app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt:144-178 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×2
  • Edited copy of a member (30 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt:174 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt:174-203 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt:205-243 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:46 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:46-75 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/UpdatesCard.kt:48-79 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 10+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt:70 — app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt:70-80 | app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt:73-82 | app/src/main/java/eu/kanade/tachiyomi/data/track/mangabaka/MangaBaka.kt:69-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/database/models/MangaSimilarImpl.kt:11 — app/src/main/java/eu/kanade/tachiyomi/data/database/models/MangaSimilarImpl.kt:11-20 | app/src/main/java/eu/kanade/tachiyomi/data/database/models/TrackImpl.kt:31-41 | app/src/main/java/eu/kanade/tachiyomi/data/track/model/TrackSearch.kt:43-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×2
  • Edited copy of a member (14 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt:996 — app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt:996-1013 | app/src/main/java/org/nekomanga/presentation/screens/library/LibraryViewModel.kt:1019-1032 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/komga/Komga.kt:45 — app/src/main/java/eu/kanade/tachiyomi/source/online/merged/komga/Komga.kt:45-59 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:72-85 — 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 (8 corresponding lines) · ×2
  • Edited copy of a member (8 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt:263 — app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt:263-270 | app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt:277-284 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationHandler.kt:58 — app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationHandler.kt:58-65 | app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:770-778 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×2
  • Edited copy of a member (11 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:230 — app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:230-240 | app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:242-252 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/atsumaru/Atsumaru.kt:72 — app/src/main/java/eu/kanade/tachiyomi/source/online/merged/atsumaru/Atsumaru.kt:72-82 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/weebcentral/WeebCentral.kt:56-67 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×2
  • Edited copy of a member (6 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt:197 — app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt:197-202 | app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaUtil.kt:15-20 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/database/models/TrackImpl.kt:43 — app/src/main/java/eu/kanade/tachiyomi/data/database/models/TrackImpl.kt:43-48 | app/src/main/java/eu/kanade/tachiyomi/data/track/model/TrackSearch.kt:54-59 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) app/src/main/java/org/nekomanga/presentation/components/DownloadButton.kt:393 — app/src/main/java/org/nekomanga/presentation/components/DownloadButton.kt:393-420 | app/src/main/java/org/nekomanga/presentation/components/DownloadButton.kt:494-521 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/components/DownloadButton.kt:393` 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/org/nekomanga/presentation/components/DownloadButton.kt:522` calls `DownloadIcon` and `app/src/main/java/org/nekomanga/presentation/components/DownloadButton.kt:421` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (28 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:663 — app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:663-690 | app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:741-768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/MangaScreen.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 (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:401 — app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:401-427 | app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt:260-286 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt` and `app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:401` it does not close everything it opens, so those exact lines 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/org/nekomanga/presentation/screens/reader/ReaderControls.kt:314 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:314-340 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:493-519 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/ReaderControls.kt:314` 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 (26 lines × 2) · ×2
  • Duplicated block (26 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:709 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:709-734 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:766-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/ReaderControls.kt:709` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/stats/SimpleStats.kt:128 — app/src/main/java/org/nekomanga/presentation/screens/stats/SimpleStats.kt:128-153 | app/src/main/java/org/nekomanga/presentation/screens/stats/SimpleStats.kt:160-185 — both copies are in the same file, so extract the 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 (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:446 — app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:446-464 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:510-527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/SettingsScreen.kt:446` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:517 — app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:517-534 | app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:537-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:517` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×2
  • Duplicated block (14–18 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerScrollAnchorResolver.kt:83 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerScrollAnchorResolver.kt:83-96 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonScrollAnchorResolver.kt:43-60 — 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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerScrollAnchorResolver.kt:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14–18 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/feed/history/HistoryCard.kt:175 — app/src/main/java/org/nekomanga/presentation/screens/feed/history/HistoryCard.kt:175-192 | app/src/main/java/org/nekomanga/presentation/screens/feed/history/HistoryCard.kt:292-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/feed/history/HistoryCard.kt:175` it begins part-way through the construct above it, so those 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/org/nekomanga/presentation/screens/feed/history/HistoryCard.kt:291` calls `getReadTextColor`, `ScanlatorLine` and `app/src/main/java/org/nekomanga/presentation/screens/feed/history/HistoryCard.kt:175` 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 (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:374 — app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:374-389 | app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt:231-246 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt` and `app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:374` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:286 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:286-301 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:302-317 — both copies are in the same file, so extract the 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/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:300` calls `build` and `app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:283` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt:75 — app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt:75-82 | app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt:46-54 — 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/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:71 — app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:71-79 | app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:367-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/components/FastScroller.kt:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 2) · ×2
  • Duplicated block (9 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:375 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:375-383 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:394-405 — 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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:375` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/kagane/Kagane.kt:117 — app/src/main/java/eu/kanade/tachiyomi/source/online/merged/kagane/Kagane.kt:117-125 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/mangaball/MangaBall.kt:43-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:370 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:370-375 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:396-401 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/SplitPageLayout.kt:95-100 — 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/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:370` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayViewModel.kt:221 — app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayViewModel.kt:221-228 | app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseViewModel.kt:552-557 | app/src/main/java/org/nekomanga/presentation/screens/similar/SimilarViewModel.kt:173-180 — 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×2
  • Swallowed exception (empty catch) app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt:45 — 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/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.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.
D1 · Cyclomatic Complexity · ReaderActivity.onCreate (cyclomatic 91) · ×1
  • ReaderActivity.onCreate (cyclomatic 91) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:368 — ReaderActivity.onCreate has cyclomatic complexity 91 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SmartBackgroundAnalyzer.analyze (cyclomatic 65) · ×1
  • SmartBackgroundAnalyzer.analyze (cyclomatic 65) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/SmartBackground.kt:37 — SmartBackgroundAnalyzer.analyze has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsScreenKt.SettingsScreen (cyclomatic 65) · ×1
  • SettingsScreenKt.SettingsScreen (cyclomatic 65) app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:60 — SettingsScreenKt.SettingsScreen has cyclomatic complexity 65 (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 · ChapterSourceSyncKt.syncChaptersWithSource (cyclomatic 64) · ×1
  • ChapterSourceSyncKt.syncChaptersWithSource (cyclomatic 64) app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt:38 — ChapterSourceSyncKt.syncChaptersWithSource has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PagerPageItemKt.PagerPageItem (cyclomatic 52) · ×1
  • PagerPageItemKt.PagerPageItem (cyclomatic 52) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.kt:57 — PagerPageItemKt.PagerPageItem has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ComposeWebtoonViewerKt.ComposeWebtoonViewer (cyclomatic 50) · ×1
  • ComposeWebtoonViewerKt.ComposeWebtoonViewer (cyclomatic 50) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:68 — ComposeWebtoonViewerKt.ComposeWebtoonViewer has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ComposePagerViewerKt.executeNavCommand (cyclomatic 43) · ×1
  • ComposePagerViewerKt.executeNavCommand (cyclomatic 43) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:582 — ComposePagerViewerKt.executeNavCommand 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 · DoublePageLayoutKt.DoublePageLayout (cyclomatic 39) · ×1
  • DoublePageLayoutKt.DoublePageLayout (cyclomatic 39) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:82 — DoublePageLayoutKt.DoublePageLayout 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 · Suwayomi.sanitizeName (cyclomatic 38) · ×1
  • Suwayomi.sanitizeName (cyclomatic 38) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:505 — Suwayomi.sanitizeName has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebtoonScrollAnchorResolver.resolveReanchorTarget (cyclomatic 38) · ×1
  • WebtoonScrollAnchorResolver.resolveReanchorTarget (cyclomatic 38) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonScrollAnchorResolver.kt:26 — WebtoonScrollAnchorResolver.resolveReanchorTarget has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReaderPreloadControllerImpl.onPositionChanged (cyclomatic 37) · ×1
  • ReaderPreloadControllerImpl.onPositionChanged (cyclomatic 37) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:88 — ReaderPreloadControllerImpl.onPositionChanged has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ComposePagerViewerKt.ComposePagerViewer (cyclomatic 37) · ×1
  • ComposePagerViewerKt.ComposePagerViewer (cyclomatic 37) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:54 — ComposePagerViewerKt.ComposePagerViewer has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LibraryUpdateJob.updateMangaChapters (cyclomatic 35) · ×1
  • LibraryUpdateJob.updateMangaChapters (cyclomatic 35) app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt:365 — LibraryUpdateJob.updateMangaChapters has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PagerTapNavigationModifierKt.pagerTapNavigation (cyclomatic 34) · ×1
  • PagerTapNavigationModifierKt.pagerTapNavigation (cyclomatic 34) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerTapNavigationModifier.kt:32 — PagerTapNavigationModifierKt.pagerTapNavigation has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackService.updateTrackStatus (cyclomatic 32) · ×1
  • TrackService.updateTrackStatus (cyclomatic 32) app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:103 — TrackService.updateTrackStatus 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 · ChapterUtil.filterByScanlator (cyclomatic 32) · ×1
  • ChapterUtil.filterByScanlator (cyclomatic 32) app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterUtil.kt:133 — ChapterUtil.filterByScanlator 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 · ReaderPreloadControllerImpl.loadItemToDisk (cyclomatic 31) · ×1
  • ReaderPreloadControllerImpl.loadItemToDisk (cyclomatic 31) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:303 — ReaderPreloadControllerImpl.loadItemToDisk has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PagerViewer.handleKeyEvent (cyclomatic 27) · ×1
  • PagerViewer.handleKeyEvent (cyclomatic 27) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:321 — PagerViewer.handleKeyEvent has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainActivity.onCreate (cyclomatic 26) · ×1
  • MainActivity.onCreate (cyclomatic 26) app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt:80 — MainActivity.onCreate 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 · PagerOverscrollHandler.handleScrollDelta (cyclomatic 26) · ×1
  • PagerOverscrollHandler.handleScrollDelta (cyclomatic 26) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerOverscrollNavigation.kt:117 — PagerOverscrollHandler.handleScrollDelta 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 · NotificationReceiver.onReceive (cyclomatic 25) · ×1
  • NotificationReceiver.onReceive (cyclomatic 25) app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:59 — NotificationReceiver.onReceive has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MainActivity.handleDeepLink (cyclomatic 25) · ×1
  • MainActivity.handleDeepLink (cyclomatic 25) app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt:304 — MainActivity.handleDeepLink has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FastScrollerKt.VerticalFastScroller (cyclomatic 25) · ×1
  • FastScrollerKt.VerticalFastScroller (cyclomatic 25) app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:61 — FastScrollerKt.VerticalFastScroller has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FeedSummaryPageKt.FeedSummaryPage (cyclomatic 25) · ×1
  • FeedSummaryPageKt.FeedSummaryPage (cyclomatic 25) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:36 — FeedSummaryPageKt.FeedSummaryPage has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ButtonBlockKt.ButtonBlock (cyclomatic 25) · ×1
  • ButtonBlockKt.ButtonBlock (cyclomatic 25) app/src/main/java/org/nekomanga/presentation/screens/manga/ButtonBlock.kt:60 — ButtonBlockKt.ButtonBlock has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WebtoonActiveItemResolver.resolveActiveIndexInternal (cyclomatic 24) · ×1
  • WebtoonActiveItemResolver.resolveActiveIndexInternal (cyclomatic 24) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonActiveItemResolver.kt:87 — WebtoonActiveItemResolver.resolveActiveIndexInternal has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CropBordersTransformation.calculateCropBounds (cyclomatic 23) · ×1
  • CropBordersTransformation.calculateCropBounds (cyclomatic 23) app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:198 — CropBordersTransformation.calculateCropBounds 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 · ComposePagerViewerKt.calculateDefaultPagerIndex (cyclomatic 23) · ×1
  • ComposePagerViewerKt.calculateDefaultPagerIndex (cyclomatic 23) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:464 — ComposePagerViewerKt.calculateDefaultPagerIndex has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DownloadButtonKt.DownloadButton (cyclomatic 22) · ×1
  • DownloadButtonKt.DownloadButton (cyclomatic 22) app/src/main/java/org/nekomanga/presentation/components/DownloadButton.kt:76 — DownloadButtonKt.DownloadButton has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MangaViewModel.applyToManga (cyclomatic 21) · ×1
  • MangaViewModel.applyToManga (cyclomatic 21) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:2196 — MangaViewModel.applyToManga has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PagerScrollAnchorResolver.resolveReanchorTarget (cyclomatic 21) · ×1
  • PagerScrollAnchorResolver.resolveReanchorTarget (cyclomatic 21) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerScrollAnchorResolver.kt:50 — PagerScrollAnchorResolver.resolveReanchorTarget has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebtoonViewer.handleKeyEvent (cyclomatic 21) · ×1
  • WebtoonViewer.handleKeyEvent (cyclomatic 21) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt:220 — WebtoonViewer.handleKeyEvent has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InformationBlockKt.InformationBlock (cyclomatic 21) · ×1
  • InformationBlockKt.InformationBlock (cyclomatic 21) app/src/main/java/org/nekomanga/presentation/screens/manga/InformationBlock.kt:55 — InformationBlockKt.InformationBlock has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BrowseScreenKt.BrowseWrapper (cyclomatic 20) · ×1
  • BrowseScreenKt.BrowseWrapper (cyclomatic 20) app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:141 — BrowseScreenKt.BrowseWrapper 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 · PreferenceItemKt.PreferenceItem (cyclomatic 20) · ×1
  • PreferenceItemKt.PreferenceItem (cyclomatic 20) app/src/main/java/org/nekomanga/presentation/screens/settings/PreferenceItem.kt:61 — PreferenceItemKt.PreferenceItem has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackingSettingsScreen.servicesGroup (cyclomatic 20) · ×1
  • TrackingSettingsScreen.servicesGroup (cyclomatic 20) app/src/main/java/org/nekomanga/presentation/screens/settings/screens/TrackingSettingsScreen.kt:85 — TrackingSettingsScreen.servicesGroup 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 · FilterBrowseSheetKt.FilterBrowseSheet (cyclomatic 19) · ×1
  • FilterBrowseSheetKt.FilterBrowseSheet (cyclomatic 19) app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt:80 — FilterBrowseSheetKt.FilterBrowseSheet 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 · TriStateDialogKt.TriStateListDialog (cyclomatic 19) · ×1
  • TriStateDialogKt.TriStateListDialog (cyclomatic 19) app/src/main/java/org/nekomanga/presentation/screens/settings/widgets/TriStateDialog.kt:44 — TriStateDialogKt.TriStateListDialog 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 · Comix.runInWebView (cyclomatic 18) · ×1
  • Comix.runInWebView (cyclomatic 18) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/Comix.kt:691 — Comix.runInWebView 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 · LibraryMangaMappersKt.parseChapterCount (cyclomatic 18) · ×1
  • LibraryMangaMappersKt.parseChapterCount (cyclomatic 18) app/src/main/java/org/nekomanga/data/database/mapper/LibraryMangaMappers.kt:93 — LibraryMangaMappersKt.parseChapterCount 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 · AutoAddTrackers.invoke (cyclomatic 18) · ×1
  • AutoAddTrackers.invoke (cyclomatic 18) app/src/main/java/org/nekomanga/usecases/tracking/AutoAddTrackers.kt:46 — AutoAddTrackers.invoke 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 · CropBordersTransformation.transform (cyclomatic 17) · ×1
  • CropBordersTransformation.transform (cyclomatic 17) app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:54 — CropBordersTransformation.transform 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 · SearchHandler.search (cyclomatic 17) · ×1
  • SearchHandler.search (cyclomatic 17) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt:87 — SearchHandler.search 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 · ReaderUiItemKt.isEquivalentTo (cyclomatic 17) · ×1
  • ReaderUiItemKt.isEquivalentTo (cyclomatic 17) app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderUiItem.kt:91 — ReaderUiItemKt.isEquivalentTo has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WebtoonPageItemKt.WebtoonPageContent (cyclomatic 17) · ×1
  • WebtoonPageItemKt.WebtoonPageContent (cyclomatic 17) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:134 — WebtoonPageItemKt.WebtoonPageContent 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 · ShouldUpdateMangaUseCase.invoke (cyclomatic 17) · ×1
  • ShouldUpdateMangaUseCase.invoke (cyclomatic 17) app/src/main/java/org/nekomanga/usecases/library/ShouldUpdateMangaUseCase.kt:27 — ShouldUpdateMangaUseCase.invoke 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 · MangaCoverFetcher.httpLoader (cyclomatic 16) · ×1
  • MangaCoverFetcher.httpLoader (cyclomatic 16) app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:82 — MangaCoverFetcher.httpLoader 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 · SManga.copyFrom (cyclomatic 16) · ×1
  • SManga.copyFrom (cyclomatic 16) app/src/main/java/eu/kanade/tachiyomi/source/model/SManga.kt:70 — SManga.copyFrom 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 · MangaViewModel.markChapters (cyclomatic 16) · ×1
  • MangaViewModel.markChapters (cyclomatic 16) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:882 — MangaViewModel.markChapters 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 · MangaViewModel.downloadChapters (cyclomatic 16) · ×1
  • MangaViewModel.downloadChapters (cyclomatic 16) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:992 — MangaViewModel.downloadChapters has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MangaViewModel.updateDynamicCover (cyclomatic 16) · ×1
  • MangaViewModel.updateDynamicCover (cyclomatic 16) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:2262 — MangaViewModel.updateDynamicCover 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 · ReaderPreloadControllerImpl.checkAndSplitTallPage (cyclomatic 16) · ×1
  • ReaderPreloadControllerImpl.checkAndSplitTallPage (cyclomatic 16) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:510 — ReaderPreloadControllerImpl.checkAndSplitTallPage 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 · TrackingDateSheetKt.TrackingDateSheet (cyclomatic 16) · ×1
  • TrackingDateSheetKt.TrackingDateSheet (cyclomatic 16) app/src/main/java/org/nekomanga/presentation/components/sheets/TrackingDateSheet.kt:55 — TrackingDateSheetKt.TrackingDateSheet 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 · FeedScreenKt.FeedWrapper (cyclomatic 16) · ×1
  • FeedScreenKt.FeedWrapper (cyclomatic 16) app/src/main/java/org/nekomanga/presentation/screens/FeedScreen.kt:172 — FeedScreenKt.FeedWrapper 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 · FeedScreenComposablesKt.FeedScreenContent (cyclomatic 16) · ×1
  • FeedScreenComposablesKt.FeedScreenContent (cyclomatic 16) app/src/main/java/org/nekomanga/presentation/screens/feed/FeedScreenComposables.kt:52 — FeedScreenComposablesKt.FeedScreenContent 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 · WebtoonTapNavigationModifierKt.webtoonTapNavigation (cyclomatic 16) · ×1
  • WebtoonTapNavigationModifierKt.webtoonTapNavigation (cyclomatic 16) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonTapNavigationModifier.kt:30 — WebtoonTapNavigationModifierKt.webtoonTapNavigation 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 · CalculateCategoryDiffUseCase.invoke (cyclomatic 16) · ×1
  • CalculateCategoryDiffUseCase.invoke (cyclomatic 16) app/src/main/java/org/nekomanga/usecases/category/CalculateCategoryDiffUseCase.kt:17 — CalculateCategoryDiffUseCase.invoke 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.
D17 · Explicit Debt · HackComment · ×1
  • HackComment app/src/main/java/org/nekomanga/presentation/screens/settings/screens/SearchableSettings.kt:41 — // HACK: for the background blipping thingy. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · ChapterSourceSyncKt.syncChaptersWithSource (cognitive 121) · ×1
  • ChapterSourceSyncKt.syncChaptersWithSource (cognitive 121) app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt:38 — ChapterSourceSyncKt.syncChaptersWithSource has cognitive complexity 121 (threshold 15). Drivers by points: if/else 45 (91 pts), boolean chains 20, loops 5 (10 pts) (nesting depth added 51). 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 · SettingsScreenKt.SettingsScreen (cognitive 116) · ×1
  • SettingsScreenKt.SettingsScreen (cognitive 116) app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:60 — SettingsScreenKt.SettingsScreen has cognitive complexity 116 (threshold 15). Drivers by points: if/else 66 (82 pts), boolean chains 28, loops 2 (6 pts) (nesting depth added 20). 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 · SmartBackgroundAnalyzer.analyze (cognitive 104) · ×1
  • SmartBackgroundAnalyzer.analyze (cognitive 104) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/SmartBackground.kt:37 — SmartBackgroundAnalyzer.analyze has cognitive complexity 104 (threshold 15). Drivers by points: if/else 31 (64 pts), boolean chains 26, match/switch 4 (11 pts), loops 2 (3 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComposePagerViewerKt.executeNavCommand (cognitive 100) · ×1
  • ComposePagerViewerKt.executeNavCommand (cognitive 100) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:582 — ComposePagerViewerKt.executeNavCommand has cognitive complexity 100 (threshold 15). Drivers by points: if/else 40 (86 pts), boolean chains 12, error handling 1, match/switch 1 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderActivity.onCreate (cognitive 85) · ×1
  • ReaderActivity.onCreate (cognitive 85) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:368 — ReaderActivity.onCreate has cognitive complexity 85 (threshold 15). Drivers by points: if/else 38 (53 pts), boolean chains 17, match/switch 9 (15 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComposeWebtoonViewerKt.ComposeWebtoonViewer (cognitive 85) · ×1
  • ComposeWebtoonViewerKt.ComposeWebtoonViewer (cognitive 85) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:68 — ComposeWebtoonViewerKt.ComposeWebtoonViewer has cognitive complexity 85 (threshold 15). Drivers by points: if/else 32 (62 pts), boolean chains 14, match/switch 3 (9 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebtoonScrollAnchorResolver.resolveReanchorTarget (cognitive 77) · ×1
  • WebtoonScrollAnchorResolver.resolveReanchorTarget (cognitive 77) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonScrollAnchorResolver.kt:26 — WebtoonScrollAnchorResolver.resolveReanchorTarget has cognitive complexity 77 (threshold 15). Drivers by points: if/else 32 (62 pts), boolean chains 11, loops 1 (4 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerPageItemKt.PagerPageItem (cognitive 71) · ×1
  • PagerPageItemKt.PagerPageItem (cognitive 71) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerPageItem.kt:57 — PagerPageItemKt.PagerPageItem has cognitive complexity 71 (threshold 15). Drivers by points: if/else 31 (49 pts), match/switch 6 (13 pts), boolean chains 9 (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 · ReaderPreloadControllerImpl.loadItemToDisk (cognitive 67) · ×1
  • ReaderPreloadControllerImpl.loadItemToDisk (cognitive 67) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:303 — ReaderPreloadControllerImpl.loadItemToDisk has cognitive complexity 67 (threshold 15). Drivers by points: if/else 22 (50 pts), error handling 4 (9 pts), boolean chains 7, match/switch 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DoublePageLayoutKt.DoublePageLayout (cognitive 64) · ×1
  • DoublePageLayoutKt.DoublePageLayout (cognitive 64) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:82 — DoublePageLayoutKt.DoublePageLayout has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (41 pts), boolean chains 13, match/switch 2 (10 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackService.updateTrackStatus (cognitive 62) · ×1
  • TrackService.updateTrackStatus (cognitive 62) app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:103 — TrackService.updateTrackStatus has cognitive complexity 62 (threshold 15). Drivers by points: if/else 22 (47 pts), boolean chains 15 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Suwayomi.sanitizeName (cognitive 62) · ×1
  • Suwayomi.sanitizeName (cognitive 62) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:505 — Suwayomi.sanitizeName has cognitive complexity 62 (threshold 15). Drivers by points: if/else 32 (51 pts), boolean chains 11 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComposePagerViewerKt.ComposePagerViewer (cognitive 61) · ×1
  • ComposePagerViewerKt.ComposePagerViewer (cognitive 61) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:54 — ComposePagerViewerKt.ComposePagerViewer has cognitive complexity 61 (threshold 15). Drivers by points: if/else 27 (43 pts), boolean chains 11, error handling 2 (6 pts), match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibraryUpdateJob.updateMangaChapters (cognitive 58) · ×1
  • LibraryUpdateJob.updateMangaChapters (cognitive 58) app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt:365 — LibraryUpdateJob.updateMangaChapters has cognitive complexity 58 (threshold 15). Drivers by points: if/else 26 (46 pts), boolean chains 11, match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChapterUtil.filterByScanlator (cognitive 54) · ×1
  • ChapterUtil.filterByScanlator (cognitive 54) app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterUtil.kt:133 — ChapterUtil.filterByScanlator has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (35 pts), boolean chains 12, loops 4 (7 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderPreloadControllerImpl.onPositionChanged (cognitive 53) · ×1
  • ReaderPreloadControllerImpl.onPositionChanged (cognitive 53) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:88 — ReaderPreloadControllerImpl.onPositionChanged has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 11, loops 3, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerTapNavigationModifierKt.pagerTapNavigation (cognitive 53) · ×1
  • PagerTapNavigationModifierKt.pagerTapNavigation (cognitive 53) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerTapNavigationModifier.kt:32 — PagerTapNavigationModifierKt.pagerTapNavigation has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (31 pts), match/switch 3 (8 pts), loops 3 (7 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 29). 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 · LibraryMangaMappersKt.parseChapterCount (cognitive 48) · ×1
  • LibraryMangaMappersKt.parseChapterCount (cognitive 48) app/src/main/java/org/nekomanga/data/database/mapper/LibraryMangaMappers.kt:93 — LibraryMangaMappersKt.parseChapterCount has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 29). 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 · TrackSyncProcessor.process (cognitive 44) · ×1
  • TrackSyncProcessor.process (cognitive 44) app/src/main/java/eu/kanade/tachiyomi/jobs/tracking/TrackSyncProcessor.kt:28 — TrackSyncProcessor.process has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (29 pts), error handling 2 (7 pts), match/switch 1 (6 pts), boolean chains 2 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PagerOverscrollHandler.handleScrollDelta (cognitive 44) · ×1
  • PagerOverscrollHandler.handleScrollDelta (cognitive 44) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerOverscrollNavigation.kt:117 — PagerOverscrollHandler.handleScrollDelta has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 12 (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 · CropBordersTransformation.calculateCropBounds (cognitive 40) · ×1
  • CropBordersTransformation.calculateCropBounds (cognitive 40) app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:198 — CropBordersTransformation.calculateCropBounds has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4 (10 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerViewer.handleKeyEvent (cognitive 40) · ×1
  • PagerViewer.handleKeyEvent (cognitive 40) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:321 — PagerViewer.handleKeyEvent has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 2, match/switch 1 (nesting depth added 17). 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 · WebtoonTapNavigationModifierKt.webtoonTapNavigation (cognitive 39) · ×1
  • WebtoonTapNavigationModifierKt.webtoonTapNavigation (cognitive 39) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonTapNavigationModifier.kt:30 — WebtoonTapNavigationModifierKt.webtoonTapNavigation has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 4, loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WebtoonActiveItemResolver.resolveActiveIndexInternal (cognitive 38) · ×1
  • WebtoonActiveItemResolver.resolveActiveIndexInternal (cognitive 38) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonActiveItemResolver.kt:87 — WebtoonActiveItemResolver.resolveActiveIndexInternal has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 8, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MangaViewModel.applyToManga (cognitive 35) · ×1
  • MangaViewModel.applyToManga (cognitive 35) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:2196 — MangaViewModel.applyToManga has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MangaViewModel.updateDynamicCover (cognitive 34) · ×1
  • MangaViewModel.updateDynamicCover (cognitive 34) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:2262 — MangaViewModel.updateDynamicCover has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 1 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainActivity.handleDeepLink (cognitive 31) · ×1
  • MainActivity.handleDeepLink (cognitive 31) app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt:304 — MainActivity.handleDeepLink has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 4, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FastScrollerKt.VerticalFastScroller (cognitive 31) · ×1
  • FastScrollerKt.VerticalFastScroller (cognitive 31) app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:61 — FastScrollerKt.VerticalFastScroller has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 12 (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 · MainActivity.onCreate (cognitive 29) · ×1
  • MainActivity.onCreate (cognitive 29) app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt:80 — MainActivity.onCreate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 4, match/switch 3 (4 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 · ReaderPreloadControllerImpl.checkAndSplitTallPage (cognitive 28) · ×1
  • ReaderPreloadControllerImpl.checkAndSplitTallPage (cognitive 28) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:510 — ReaderPreloadControllerImpl.checkAndSplitTallPage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerScrollAnchorResolver.resolveReanchorTarget (cognitive 28) · ×1
  • PagerScrollAnchorResolver.resolveReanchorTarget (cognitive 28) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerScrollAnchorResolver.kt:50 — PagerScrollAnchorResolver.resolveReanchorTarget has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 8 (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 · LibraryMangaItem.matches (cognitive 28) · ×1
  • LibraryMangaItem.matches (cognitive 28) app/src/main/java/org/nekomanga/domain/manga/Manga.kt:56 — LibraryMangaItem.matches has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ButtonBlockKt.ButtonBlock (cognitive 28) · ×1
  • ButtonBlockKt.ButtonBlock (cognitive 28) app/src/main/java/org/nekomanga/presentation/screens/manga/ButtonBlock.kt:60 — ButtonBlockKt.ButtonBlock has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21 (22 pts), match/switch 3 (6 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TrackingSettingsScreen.servicesGroup (cognitive 28) · ×1
  • TrackingSettingsScreen.servicesGroup (cognitive 28) app/src/main/java/org/nekomanga/presentation/screens/settings/screens/TrackingSettingsScreen.kt:85 — TrackingSettingsScreen.servicesGroup has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25 (27 pts), match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FeedScreenKt.FeedWrapper (cognitive 27) · ×1
  • FeedScreenKt.FeedWrapper (cognitive 27) app/src/main/java/org/nekomanga/presentation/screens/FeedScreen.kt:172 — FeedScreenKt.FeedWrapper has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeedSummaryPageKt.FeedSummaryPage (cognitive 27) · ×1
  • FeedSummaryPageKt.FeedSummaryPage (cognitive 27) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:36 — FeedSummaryPageKt.FeedSummaryPage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 9, match/switch 4 (7 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComposePagerViewerKt.calculateDefaultPagerIndex (cognitive 27) · ×1
  • ComposePagerViewerKt.calculateDefaultPagerIndex (cognitive 27) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:464 — ComposePagerViewerKt.calculateDefaultPagerIndex has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, match/switch 3 (5 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrowseScreenKt.BrowseWrapper (cognitive 26) · ×1
  • BrowseScreenKt.BrowseWrapper (cognitive 26) app/src/main/java/org/nekomanga/presentation/screens/BrowseScreen.kt:141 — BrowseScreenKt.BrowseWrapper has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (18 pts), match/switch 3 (6 pts), boolean chains 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 · WebtoonPageItemKt.WebtoonPageContent (cognitive 26) · ×1
  • WebtoonPageItemKt.WebtoonPageContent (cognitive 26) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonPageItem.kt:134 — WebtoonPageItemKt.WebtoonPageContent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebtoonZoomableModifierKt.webtoonZoomable (cognitive 25) · ×1
  • WebtoonZoomableModifierKt.webtoonZoomable (cognitive 25) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/WebtoonZoomableModifier.kt:120 — WebtoonZoomableModifierKt.webtoonZoomable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CropBordersTransformation.transform (cognitive 24) · ×1
  • CropBordersTransformation.transform (cognitive 24) app/src/main/java/eu/kanade/tachiyomi/data/coil/CropBordersTransformation.kt:54 — CropBordersTransformation.transform has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 3, error handling 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 · WebtoonViewer.handleKeyEvent (cognitive 24) · ×1
  • WebtoonViewer.handleKeyEvent (cognitive 24) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.kt:220 — WebtoonViewer.handleKeyEvent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 2, match/switch 1 (nesting depth added 9). 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 · InformationBlockKt.InformationBlock (cognitive 24) · ×1
  • InformationBlockKt.InformationBlock (cognitive 24) app/src/main/java/org/nekomanga/presentation/screens/manga/InformationBlock.kt:55 — InformationBlockKt.InformationBlock has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ComposePagerViewerKt.PagerItemContent (cognitive 23) · ×1
  • ComposePagerViewerKt.PagerItemContent (cognitive 23) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:355 — ComposePagerViewerKt.PagerItemContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 2 (3 pts) (nesting depth added 13). 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 · DataStorageSettingsScreen.backupAndRestoreGroup (cognitive 23) · ×1
  • DataStorageSettingsScreen.backupAndRestoreGroup (cognitive 23) app/src/main/java/org/nekomanga/presentation/screens/settings/screens/DataStorageSettingsScreen.kt:162 — DataStorageSettingsScreen.backupAndRestoreGroup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SearchHandler.search (cognitive 22) · ×1
  • SearchHandler.search (cognitive 22) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt:87 — SearchHandler.search has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22. 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 · ProjectSuki.parseChapters (cognitive 22) · ×1
  • ProjectSuki.parseChapters (cognitive 22) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/projectsuki/ProjectSuki.kt:212 — ProjectSuki.parseChapters has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MergeSheetKt.MergeSelectionSheet (cognitive 22) · ×1
  • MergeSheetKt.MergeSelectionSheet (cognitive 22) app/src/main/java/org/nekomanga/presentation/components/sheets/MergeSheet.kt:159 — MergeSheetKt.MergeSelectionSheet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 9). 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 · AboutScreenKt.AboutWrapper (cognitive 22) · ×1
  • AboutScreenKt.AboutWrapper (cognitive 22) app/src/main/java/org/nekomanga/presentation/screens/AboutScreen.kt:125 — AboutScreenKt.AboutWrapper has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DisplayScreenKt.DisplayWrapper (cognitive 22) · ×1
  • DisplayScreenKt.DisplayWrapper (cognitive 22) app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:130 — DisplayScreenKt.DisplayWrapper has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 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 · ReaderChaptersSheetKt.ChapterListItem (cognitive 22) · ×1
  • ReaderChaptersSheetKt.ChapterListItem (cognitive 22) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderChaptersSheet.kt:165 — ReaderChaptersSheetKt.ChapterListItem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ReaderActivity.onVisibilityChange (cognitive 21) · ×1
  • ReaderActivity.onVisibilityChange (cognitive 21) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:2254 — ReaderActivity.onVisibilityChange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6 (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 · ReaderControlsKt.HorizontalFloatingSlider (cognitive 21) · ×1
  • ReaderControlsKt.HorizontalFloatingSlider (cognitive 21) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:206 — ReaderControlsKt.HorizontalFloatingSlider has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderSettingsSheetKt.LayoutSettingsTab (cognitive 21) · ×1
  • ReaderSettingsSheetKt.LayoutSettingsTab (cognitive 21) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderSettingsSheet.kt:225 — ReaderSettingsSheetKt.LayoutSettingsTab has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (21 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComposeWebtoonViewerKt.executeWebtoonNavCommand (cognitive 21) · ×1
  • ComposeWebtoonViewerKt.executeWebtoonNavCommand (cognitive 21) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:515 — ComposeWebtoonViewerKt.executeWebtoonNavCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, 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 · ComposeWebtoonViewerKt.handleBoundaryNavigation (cognitive 21) · ×1
  • ComposeWebtoonViewerKt.handleBoundaryNavigation (cognitive 21) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt:605 — ComposeWebtoonViewerKt.handleBoundaryNavigation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6 (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 · ShouldUpdateMangaUseCase.invoke (cognitive 21) · ×1
  • ShouldUpdateMangaUseCase.invoke (cognitive 21) app/src/main/java/org/nekomanga/usecases/library/ShouldUpdateMangaUseCase.kt:27 — ShouldUpdateMangaUseCase.invoke has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AutoAddTrackers.invoke (cognitive 21) · ×1
  • AutoAddTrackers.invoke (cognitive 21) app/src/main/java/org/nekomanga/usecases/tracking/AutoAddTrackers.kt:46 — AutoAddTrackers.invoke has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, match/switch 2 (3 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 · MangaCoverFetcher.httpLoader (cognitive 20) · ×1
  • MangaCoverFetcher.httpLoader (cognitive 20) app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:82 — MangaCoverFetcher.httpLoader has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, error handling 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotificationReceiver.onReceive (cognitive 20) · ×1
  • NotificationReceiver.onReceive (cognitive 20) app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt:59 — NotificationReceiver.onReceive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (4 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FeedScreenComposablesKt.FeedScreenContent (cognitive 20) · ×1
  • FeedScreenComposablesKt.FeedScreenContent (cognitive 20) app/src/main/java/org/nekomanga/presentation/screens/feed/FeedScreenComposables.kt:52 — FeedScreenComposablesKt.FeedScreenContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, match/switch 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RestoreHelper.restoreTrackForManga (cognitive 19) · ×1
  • RestoreHelper.restoreTrackForManga (cognitive 19) app/src/main/java/eu/kanade/tachiyomi/data/backup/RestoreHelper.kt:352 — RestoreHelper.restoreTrackForManga has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WeebCentral.parseChapters (cognitive 19) · ×1
  • WeebCentral.parseChapters (cognitive 19) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/weebcentral/WeebCentral.kt:127 — WeebCentral.parseChapters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MangaViewModel.onRefresh (cognitive 19) · ×1
  • MangaViewModel.onRefresh (cognitive 19) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:698 — MangaViewModel.onRefresh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (5 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResolveChapterTransitionUiModelUseCase.invoke (cognitive 19) · ×1
  • ResolveChapterTransitionUiModelUseCase.invoke (cognitive 19) app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/ResolveChapterTransitionUiModelUseCase.kt:18 — ResolveChapterTransitionUiModelUseCase.invoke has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, 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 · ExpressivePickerKt.ExpressivePicker (cognitive 19) · ×1
  • ExpressivePickerKt.ExpressivePicker (cognitive 19) app/src/main/java/org/nekomanga/presentation/components/ExpressivePicker.kt:44 — ExpressivePickerKt.ExpressivePicker has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 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 · MangaScreenKt.MangaScreenWrapper (cognitive 19) · ×1
  • MangaScreenKt.MangaScreenWrapper (cognitive 19) app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:373 — MangaScreenKt.MangaScreenWrapper has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AnimatedBackdropContainerKt.AnimatedBackdropContainer (cognitive 19) · ×1
  • AnimatedBackdropContainerKt.AnimatedBackdropContainer (cognitive 19) app/src/main/java/org/nekomanga/presentation/screens/manga/AnimatedBackdropContainer.kt:30 — AnimatedBackdropContainerKt.AnimatedBackdropContainer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, match/switch 2 (3 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ReaderChaptersSheetKt.ReaderChaptersSheet (cognitive 19) · ×1
  • ReaderChaptersSheetKt.ReaderChaptersSheet (cognitive 19) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderChaptersSheet.kt:54 — ReaderChaptersSheetKt.ReaderChaptersSheet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackServiceKt.updateNewTrackInfo (cognitive 18) · ×1
  • TrackServiceKt.updateNewTrackInfo (cognitive 18) app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:238 — TrackServiceKt.updateNewTrackInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderActivity.setManga (cognitive 18) · ×1
  • ReaderActivity.setManga (cognitive 18) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:1716 — ReaderActivity.setManga has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibraryScreenKt.LibraryWrapper (cognitive 18) · ×1
  • LibraryScreenKt.LibraryWrapper (cognitive 18) app/src/main/java/org/nekomanga/presentation/screens/LibraryScreen.kt:165 — LibraryScreenKt.LibraryWrapper has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MangaScreenKt.MangaScreen (cognitive 18) · ×1
  • MangaScreenKt.MangaScreen (cognitive 18) app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:101 — MangaScreenKt.MangaScreen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 3, error handling 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ButtonBlockKt.ActionButton (cognitive 18) · ×1
  • ButtonBlockKt.ActionButton (cognitive 18) app/src/main/java/org/nekomanga/presentation/screens/manga/ButtonBlock.kt:246 — ButtonBlockKt.ActionButton has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (18 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 · PriorityRateLimitInterceptor.intercept (cognitive 18) · ×1
  • PriorityRateLimitInterceptor.intercept (cognitive 18) core/src/main/kotlin/org/nekomanga/core/network/interceptor/PriorityRateLimitInterceptor.kt:60 — PriorityRateLimitInterceptor.intercept has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 1, 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 · Comix.runInWebView (cognitive 17) · ×1
  • Comix.runInWebView (cognitive 17) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/Comix.kt:691 — Comix.runInWebView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 5, error handling 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 · ReaderActivity.openWebView (cognitive 17) · ×1
  • ReaderActivity.openWebView (cognitive 17) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:2159 — ReaderActivity.openWebView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderViewModel.observeReaderSettings (cognitive 17) · ×1
  • ReaderViewModel.observeReaderSettings (cognitive 17) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1768 — ReaderViewModel.observeReaderSettings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), 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 · FeedUpdatesPageKt.Grouped (cognitive 17) · ×1
  • FeedUpdatesPageKt.Grouped (cognitive 17) app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:93 — FeedUpdatesPageKt.Grouped has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (4 pts), boolean chains 3 (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 · PreferenceItemKt.PreferenceItem (cognitive 17) · ×1
  • PreferenceItemKt.PreferenceItem (cognitive 17) app/src/main/java/org/nekomanga/presentation/screens/settings/PreferenceItem.kt:61 — PreferenceItemKt.PreferenceItem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), 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 · TriStateDialogKt.TriStateListDialog (cognitive 17) · ×1
  • TriStateDialogKt.TriStateListDialog (cognitive 17) app/src/main/java/org/nekomanga/presentation/screens/settings/widgets/TriStateDialog.kt:44 — TriStateDialogKt.TriStateListDialog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 4 (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 · BackupCreator.backupMangaObject (cognitive 16) · ×1
  • BackupCreator.backupMangaObject (cognitive 16) app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreator.kt:230 — BackupCreator.backupMangaObject has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComixWafSolver.estimateRotationAngle (cognitive 16) · ×1
  • ComixWafSolver.estimateRotationAngle (cognitive 16) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixWafSolver.kt:32 — ComixWafSolver.estimateRotationAngle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MangaViewModel.markChapters (cognitive 16) · ×1
  • MangaViewModel.markChapters (cognitive 16) app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaViewModel.kt:882 — MangaViewModel.markChapters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildPagerItemsUseCase.invoke (cognitive 16) · ×1
  • BuildPagerItemsUseCase.invoke (cognitive 16) app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/BuildPagerItemsUseCase.kt:20 — BuildPagerItemsUseCase.invoke has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeedRepositoryImpl.getSummaryContinueReadingList (cognitive 16) · ×1
  • FeedRepositoryImpl.getSummaryContinueReadingList (cognitive 16) app/src/main/java/org/nekomanga/data/repository/FeedRepositoryImpl.kt:172 — FeedRepositoryImpl.getSummaryContinueReadingList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MangaGridViewKt.MangaGridItem (cognitive 16) · ×1
  • MangaGridViewKt.MangaGridItem (cognitive 16) app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt:170 — MangaGridViewKt.MangaGridItem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TrackingDateSheetKt.TrackingDateSheet (cognitive 16) · ×1
  • TrackingDateSheetKt.TrackingDateSheet (cognitive 16) app/src/main/java/org/nekomanga/presentation/components/sheets/TrackingDateSheet.kt:55 — TrackingDateSheetKt.TrackingDateSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VerticalCategoriesPageKt.LibraryCategoryHeader (cognitive 16) · ×1
  • VerticalCategoriesPageKt.LibraryCategoryHeader (cognitive 16) app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt:311 — VerticalCategoriesPageKt.LibraryCategoryHeader has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ReaderControlsKt.ReaderBottomControls (cognitive 16) · ×1
  • ReaderControlsKt.ReaderBottomControls (cognitive 16) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:119 — ReaderControlsKt.ReaderBottomControls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PagerOverscrollNavigationKt.pagerOverscrollNavigation (cognitive 16) · ×1
  • PagerOverscrollNavigationKt.pagerOverscrollNavigation (cognitive 16) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerOverscrollNavigation.kt:24 — PagerOverscrollNavigationKt.pagerOverscrollNavigation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderTransitionPageKt.ReaderTransitionPage (cognitive 16) · ×1
  • ReaderTransitionPageKt.ReaderTransitionPage (cognitive 16) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ReaderTransitionPage.kt:56 — ReaderTransitionPageKt.ReaderTransitionPage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, match/switch 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CrashReportingTree.log (cognitive 16) · ×1
  • CrashReportingTree.log (cognitive 16) core/src/main/kotlin/org/nekomanga/logging/CrashReportingTree.kt:10 — CrashReportingTree.log 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: InLibrary.kt, MangaGridView.kt, MangaListView.kt app/src/main/java/org/nekomanga/presentation/components/InLibrary.kt — 3 files — `app/src/main/java/org/nekomanga/presentation/components/InLibrary.kt`, `app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt`, `app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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 (96 shared lines) · ×1
  • Near-duplicate member pair (96 shared lines) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:213 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:213-380 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:390-558 — These two members are variants of one another: 96 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/org/nekomanga/presentation/screens/DisplayScreen.kt:142 — app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:142-309 | app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt:99-207 — 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 · Edited copy of a member (118 corresponding lines) · ×1
  • Edited copy of a member (118 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/library/LibraryAppBarActions.kt:24 — app/src/main/java/org/nekomanga/presentation/screens/library/LibraryAppBarActions.kt:24-141 | app/src/main/java/org/nekomanga/presentation/screens/manga/MangaDetailsAppBarActions.kt:18-141 — These two members are one piece of code written twice and then edited apart: 118 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (61 corresponding lines) · ×1
  • Edited copy of a member (61 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/settings/screens/LibrarySettingsScreen.kt:297 — app/src/main/java/org/nekomanga/presentation/screens/settings/screens/LibrarySettingsScreen.kt:297-357 | app/src/main/java/org/nekomanga/presentation/screens/settings/screens/MangaDexSettingsScreen.kt:325-394 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:89 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:89-143 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/UpdatesCard.kt:95-159 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (90 corresponding lines) · ×1
  • Edited copy of a member (90 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:911 — app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:911-1000 | app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:1002-1092 — These two members are one piece of code written twice and then edited apart: 90 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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/org/nekomanga/presentation/screens/MangaScreen.kt:648 — app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:648-706 | app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:726-800 — 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 (64 corresponding lines) · ×1
  • Edited copy of a member (64 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/dialog/TrackingChapterDialog.kt:34 — app/src/main/java/org/nekomanga/presentation/components/dialog/TrackingChapterDialog.kt:34-97 | app/src/main/java/org/nekomanga/presentation/components/dialog/TrackingScoreDialog.kt:34-102 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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/eu/kanade/tachiyomi/data/download/DownloadProvider.kt:135 — app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt:135-167 | app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt:183-225 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:400 — app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:400-440 | app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt:259-299 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:760 — app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:760-802 | app/src/main/java/org/nekomanga/presentation/screens/feed/FeedViewModel.kt:804-857 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt:217 — app/src/main/java/org/nekomanga/presentation/screens/SimilarScreen.kt:217-265 | app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseFollowsPage.kt:28-66 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/track/mangabaka/MangaBakaApi.kt:70 — app/src/main/java/eu/kanade/tachiyomi/data/track/mangabaka/MangaBakaApi.kt:70-100 | app/src/main/java/eu/kanade/tachiyomi/data/track/mangabaka/MangaBakaApi.kt:151-187 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1276 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1276-1306 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1313-1340 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 29+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:233 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:233-264 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:309-337 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:377-409 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:364 — app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:364-389 | app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.kt:215-248 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt:156 — app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt:156-174 | app/src/main/java/org/nekomanga/domain/manga/MangaItem.kt:176-194 — 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, 28+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 28+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:151 — app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:151-178 | app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:217-244 | app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.kt:246-274 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/dialog/DataSaverDialog.kt:15 — app/src/main/java/org/nekomanga/presentation/components/dialog/DataSaverDialog.kt:15-45 | app/src/main/java/org/nekomanga/presentation/components/dialog/WhatsNewDialog.kt:17-45 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) app/src/main/java/org/nekomanga/usecases/tracking/SearchTracker.kt:22 — app/src/main/java/org/nekomanga/usecases/tracking/SearchTracker.kt:22-49 | app/src/main/java/org/nekomanga/usecases/tracking/SearchTracker.kt:65-87 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt:49 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt:49-66 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt:68-85 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseScreenTopBar.kt:20 — app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseScreenTopBar.kt:20-43 | app/src/main/java/org/nekomanga/presentation/screens/display/DisplayTopBar.kt:23-46 | app/src/main/java/org/nekomanga/presentation/screens/similar/SimilarTopBar.kt:22-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) app/src/main/java/org/nekomanga/data/database/mapper/TrackMappers.kt:29 — app/src/main/java/org/nekomanga/data/database/mapper/TrackMappers.kt:29-45 | app/src/main/java/org/nekomanga/domain/track/Track.kt:77-93 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) app/src/main/java/org/nekomanga/presentation/components/scaffold/ChildScreenScaffold.kt:23 — app/src/main/java/org/nekomanga/presentation/components/scaffold/ChildScreenScaffold.kt:23-42 | app/src/main/java/org/nekomanga/presentation/components/scaffold/RootScaffold.kt:25-50 — 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 copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:172 — app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:172-190 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:192-216 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:721-746 | app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt:790-807 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt:113 — app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt:113-128 | app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt:130-151 | app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt:153-168 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 17+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:115 — app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:115-136 | app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:138-159 | app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:174-190 | app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:245-261 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/util/system/CombineHelpers.kt:15 — app/src/main/java/eu/kanade/tachiyomi/util/system/CombineHelpers.kt:15-18 | app/src/main/java/eu/kanade/tachiyomi/util/system/CombineHelpers.kt:30-35 | app/src/main/java/eu/kanade/tachiyomi/util/system/CombineHelpers.kt:48-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 14+ corresponding lines) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ZoomablePanDelegate.kt:71 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ZoomablePanDelegate.kt:71-84 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ZoomablePanDelegate.kt:86-99 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ZoomablePanDelegate.kt:101-114 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ZoomablePanDelegate.kt:116-129 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreJob.kt:29 — app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestoreJob.kt:29-37 | app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadJob.kt:37-46 | app/src/main/java/eu/kanade/tachiyomi/data/updater/AppDownloadInstallJob.kt:62-70 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) app/src/main/java/eu/kanade/tachiyomi/data/database/models/CategoryImpl.kt:25 — app/src/main/java/eu/kanade/tachiyomi/data/database/models/CategoryImpl.kt:25-32 | app/src/main/java/eu/kanade/tachiyomi/data/database/models/ChapterImpl.kt:49-55 | app/src/main/java/eu/kanade/tachiyomi/data/database/models/MangaImpl.kt:109-116 — 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 (68 lines × 2) · ×1
  • Duplicated block (68 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/AboutScreen.kt:221 — app/src/main/java/org/nekomanga/presentation/screens/AboutScreen.kt:221-288 | app/src/main/java/org/nekomanga/presentation/screens/AboutScreen.kt:299-366 — both copies are in the same file, so extract the 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 (60–61 lines × 2) · ×1
  • Duplicated block (60–61 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:78 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:78-138 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:100-159 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:78` 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 (43–44 lines × 2) · ×1
  • Duplicated block (43–44 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:519 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:519-561 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:576-619 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/ui/reader/loader/ReaderPreloadControllerImpl.kt:519` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:282 — app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:282-318 | app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt:329-365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:90 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:90-125 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/UpdatesCard.kt:96-131 — before extracting anything, compare `app/src/main/java/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt` and `app/src/main/java/org/nekomanga/presentation/screens/feed/updates/UpdatesCard.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 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/org/nekomanga/presentation/screens/feed/summary/NewlyAddedCard.kt:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:68 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:68-100 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/LatestChapterHandler.kt:62-94 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt` and `app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/LatestChapterHandler.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/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) app/src/main/java/org/nekomanga/presentation/components/dialog/TrackingChapterDialog.kt:66 — app/src/main/java/org/nekomanga/presentation/components/dialog/TrackingChapterDialog.kt:66-97 | app/src/main/java/org/nekomanga/presentation/components/dialog/TrackingScoreDialog.kt:71-102 — 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/org/nekomanga/presentation/components/dialog/TrackingChapterDialog.kt:66` it begins part-way through the construct above it, so those 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 (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:102 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:102-131 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/LatestChapterHandler.kt:96-125 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt` and `app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/LatestChapterHandler.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/eu/kanade/tachiyomi/source/online/handlers/FeedUpdatesHandler.kt:102` it begins part-way through the construct above it, so those 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 (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:260 — app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:260-301 | app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:480-521 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/components/FastScroller.kt:260` 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/org/nekomanga/presentation/components/FastScroller.kt:302` calls `padding` and `app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:522` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:470 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:470-492 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:633-656 — both copies are in the same file, so extract the 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 (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) app/src/main/java/org/nekomanga/presentation/screens/feed/history/FeedHistoryPage.kt:50 — app/src/main/java/org/nekomanga/presentation/screens/feed/history/FeedHistoryPage.kt:50-72 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:106-128 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:255-277 — 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.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:152 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:152-174 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:172-194 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:166 — app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:166-187 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:284-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:288 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:288-309 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:469-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:88 — app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:88-107 | app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:162-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:363 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:363-383 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:389-409 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/viewer/DoublePageLayout.kt:363` 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–20 lines × 5) · ×1
  • Duplicated block (17–20 lines × 5) app/src/main/java/org/nekomanga/usecases/stats/AggregateDetailedStatsUseCase.kt:44 — app/src/main/java/org/nekomanga/usecases/stats/AggregateDetailedStatsUseCase.kt:44-63 | app/src/main/java/org/nekomanga/usecases/stats/AggregateDetailedStatsUseCase.kt:66-85 | app/src/main/java/org/nekomanga/usecases/stats/AggregateDetailedStatsUseCase.kt:88-107 | app/src/main/java/org/nekomanga/usecases/stats/AggregateDetailedStatsUseCase.kt:110-126 | app/src/main/java/org/nekomanga/usecases/stats/AggregateDetailedStatsUseCase.kt:140-158 — 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/org/nekomanga/usecases/stats/AggregateDetailedStatsUseCase.kt:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:402 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:402-421 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt:580-598 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/ui/reader/ReaderActivity.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.
D4 · Code Duplication · Duplicated block (15–20 lines × 2) · ×1
  • Duplicated block (15–20 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:287 — app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:287-306 | app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseFilterPage.kt:74-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/DisplayScreen.kt:287` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) REDACTED:136 — REDACTED:136-153 | REDACTED:167-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–18 lines × 2) · ×1
  • Duplicated block (11–18 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:321 — app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:321-338 | app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:342-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:321` 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) · ×1
  • Duplicated block (17–18 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:542 — app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:542-558 | app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:561-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/MangaScreen.kt:542` it begins part-way through the construct above it, so those 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/org/nekomanga/presentation/screens/reader/ReaderControls.kt:232 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:232-248 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:354-370 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:411-427 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:531-547 — 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/org/nekomanga/presentation/screens/reader/ReaderControls.kt:232` it does not close everything it opens, so those 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) · ×1
  • Duplicated block (16 lines × 4) app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:249 — app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:249-264 | app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:287-302 | app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:364-379 | app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:392-407 — 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/org/nekomanga/presentation/screens/stats/DetailedStats.kt:249` 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 (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:447 — app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:447-461 | app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt:466-479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/stats/DetailedStats.kt:447` 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 (14 lines × 5) · ×1
  • Duplicated block (14 lines × 5) app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:288 — app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:288-301 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:311-324 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:337-350 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:355-368 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:383-396 — 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/org/nekomanga/presentation/screens/SettingsScreen.kt:288` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:310` calls `collectAsState` and `app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:354` 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 lines × 3) · ×1
  • Duplicated block (14 lines × 3) app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:123 — app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:123-136 | app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:146-159 | app/src/main/java/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:230-243 — 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/eu/kanade/tachiyomi/ui/source/latest/DisplayRepository.kt:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) REDACTED:53 — REDACTED:53-66 | REDACTED:90-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:53` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:89` calls `put`, `toInt` and `REDACTED:52` 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 (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt:134 — app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt:134-146 | app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:56-68 | app/src/main/java/org/nekomanga/presentation/screens/feed/history/FeedHistoryPage.kt:57-69 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:113-125 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:262-274 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt:134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:608 — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:608-620 | app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:625-636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:608` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:125 — app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:125-136 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:145-156 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:166-177 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:216-227 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:240-251 | app/src/main/java/org/nekomanga/presentation/screens/SettingsScreen.kt:264-275 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–12 lines × 4) · ×1
  • Duplicated block (9–12 lines × 4) app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:215 — app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:215-226 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:291-299 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:356-367 | app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SimilarHandler.kt:433-444 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:215 — app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:215-225 | app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:393-404 — both copies are in the same file, so extract the 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/org/nekomanga/presentation/screens/reader/ReaderControls.kt:392` calls `rememberUpdatedState` and `app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderControls.kt:214` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–11 lines × 3) · ×1
  • Duplicated block (8–11 lines × 3) app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:79 — app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:79-86 | app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:153-160 | app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:298-308 — 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/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:196 — app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:196-204 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:314-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) app/src/main/java/org/nekomanga/presentation/screens/settings/screens/MangaDexSettingsScreen.kt:119 — app/src/main/java/org/nekomanga/presentation/screens/settings/screens/MangaDexSettingsScreen.kt:119-128 | app/src/main/java/org/nekomanga/presentation/screens/settings/screens/TrackingSettingsScreen.kt:62-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/org/nekomanga/presentation/screens/settings/screens/MangaDexSettingsScreen.kt:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 4) · ×1
  • Duplicated block (10 lines × 4) app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:237 — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:237-246 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:270-279 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:29-38 | app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt:61-70 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt` and `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 4) · ×1
  • Duplicated block (8–10 lines × 4) app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:129 — app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:129-136 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:178-185 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:194-201 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:312-321 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:199 — app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:199-206 | app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:219-228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/eu/kanade/tachiyomi/data/cache/CoverCache.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:216` calls `getCoverFile`, `exists`, `inputStream` and `app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:198` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:77 — app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:77-83 | app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:136-142 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:76-83 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:129-136 | app/src/main/java/org/nekomanga/presentation/screens/feed/summary/FeedSummaryPage.kt:178-185 | app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.kt:312-319 — there are 6 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:144` calls `animateItem` and `app/src/main/java/org/nekomanga/presentation/components/MangaListView.kt:85` 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 (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:409 — app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:409-413 | app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:539-543 | app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt:552-556 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:140 — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:140-148 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt:161-169 | app/src/main/java/eu/kanade/tachiyomi/data/coil/MergeMangaCoverFetcher.kt:60-68 — before extracting anything, compare `app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt` and `app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 164 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: :constants — :constants: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×1
  • Redirected process stream is never drained (deadlock) app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt:59 — The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `process.inputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `process.errorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a coroutine or thread per stream), merge them with `redirectErrorStream(true)` before `start()`, or discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`).
Minor — 134 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×63
  • Orphaned file app/src/main/java/org/nekomanga/presentation/components/sheets/FilterChapterSheet.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/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.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/org/nekomanga/presentation/components/sheets/TrackingDateSheet.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/eu/kanade/tachiyomi/data/updater/AppUpdateNotifier.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/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.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/eu/kanade/tachiyomi/source/online/merged/komga/Komga.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/eu/kanade/tachiyomi/widget/MaterialSpinnerView.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/eu/kanade/tachiyomi/source/online/handlers/FollowsHandler.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/eu/kanade/tachiyomi/data/download/DownloadPendingDeleter.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/eu/kanade/tachiyomi/data/track/mangaupdates/MangaUpdatesApi.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/eu/kanade/tachiyomi/util/view/ViewExtensions.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 core/src/main/kotlin/tachiyomi/core/network/DohProviders.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 core/src/main/kotlin/tachiyomi/core/preference/AndroidPreference.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/org/nekomanga/presentation/screens/onboarding/PermissionStep.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/eu/kanade/tachiyomi/source/model/MangaTag.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 core/src/main/kotlin/tachiyomi/core/util/lang/StringExtensions.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/eu/kanade/tachiyomi/data/track/kitsu/KitsuModels.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/org/nekomanga/presentation/extensions/RecomposeHighligher.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/org/nekomanga/presentation/InfoScreen.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/eu/kanade/tachiyomi/util/chapter/ChapterRecognition.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/org/nekomanga/presentation/components/TriStateComponents.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/org/nekomanga/presentation/components/ToolTipComponents.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/eu/kanade/tachiyomi/widget/TabbedBottomSheet.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/eu/kanade/tachiyomi/data/download/DownloadStore.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/eu/kanade/tachiyomi/network/services/MangaDexAuthorizedUserService.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.
  • + 38 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×33
  • Duplicated predicate app/src/main/java/org/nekomanga/presentation/screens/feed/history/HistoryCard.kt:186 — `!chapterItem.chapter.read && chapterItem.chapter.pagesLeft > 0` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/screens/feed/history/HistoryCard.kt, app/src/main/java/org/nekomanga/presentation/screens/feed/summary/ContinueReadingCard.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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:327 — `!config.volumeKeysEnabled || activity.menuVisible` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt, app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonViewer.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/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:143 — `!response.isSuccessful && response.code != HTTP_NOT_MODIFIED` appears character-identically in 3 files — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt, app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt, app/src/main/java/eu/kanade/tachiyomi/data/coil/MergeMangaCoverFetcher.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/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:76 — `!shouldFetchRemotely && coverFile.exists() && options.diskCachePolicy.readEnabled` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt, app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.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/eu/kanade/tachiyomi/data/database/models/Chapter.kt:55 — `!this.isLocalSource() && !this.bookmark && !this.isUnavailable` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/data/database/models/Chapter.kt, app/src/main/java/org/nekomanga/domain/chapter/Chapter.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/org/nekomanga/presentation/components/theme/ThemeSelector.kt:138 — `(darkAppTheme == theme && isDarkTheme) || (lightAppTheme == theme && !isDarkTheme)` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/components/theme/ThemeSelector.kt, app/src/main/java/org/nekomanga/presentation/screens/onboarding/ThemeStep.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/org/nekomanga/presentation/screens/main/BottomBar.kt:31 — `(index == 0 && libraryUpdating) || (index == 1 && downloaderRunning)` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/screens/main/BottomBar.kt, app/src/main/java/org/nekomanga/presentation/screens/main/NavigationSideBar.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/org/nekomanga/presentation/components/MangaGridView.kt:280 — `(showUnreadBadge && unreadCount > 0) || (showDownloadBadge && downloadCount > 0)` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/components/MangaGridView.kt, app/src/main/java/org/nekomanga/presentation/components/MangaListView.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/eu/kanade/tachiyomi/data/coil/MaxBitmapBytes.kt:147 — `bounds.outWidth <= 0 || bounds.outHeight <= 0` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/data/coil/MaxBitmapBytes.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerSmartBackground.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/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:193 — `cacheFile == null || !options.diskCachePolicy.writeEnabled` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt, app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:609 — `command.animated && config.animatedTransitions` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.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/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:265 — `cover.startsWith("/") || cover.startsWith("file://")` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt, app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.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/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt:264 — `cover.startsWith("http") || cover.startsWith("Custom-", true)` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/data/coil/AlternativeMangaCoverFetcher.kt, app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.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/org/nekomanga/presentation/screens/feed/history/FeedHistoryPage.kt:82 — `dateString.isNotEmpty() && timeSpan != dateString` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/screens/feed/history/FeedHistoryPage.kt, app/src/main/java/org/nekomanga/presentation/screens/feed/updates/FeedUpdatesPage.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/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt:376 — `displayOptions.showStartReadingButton && libraryItem.unreadCount > 0` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/screens/library/HorizontalCategoriesPage.kt, app/src/main/java/org/nekomanga/presentation/screens/library/VerticalCategoriesPage.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/eu/kanade/tachiyomi/data/database/models/Manga.kt:129 — `filterOutSafe && trimmed.equals("Content rating: safe", true)` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt, app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaUtil.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/eu/kanade/tachiyomi/data/external/ExternalLink.kt:57 — `id.isDigitsOnly() && id.toLong() <= 200591` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/data/external/ExternalLink.kt, app/src/main/java/eu/kanade/tachiyomi/data/track/mangaupdates/MangaUpdatesHelper.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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:524 — `it is ReaderUiItem.Page || it is ReaderUiItem.SplitPage` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:260 — `it is ReaderUiItem.Transition && it.transition is ChapterTransition.Next` appears character-identically in 3 files — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerOverscrollNavigation.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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:270 — `it is ReaderUiItem.Transition && it.transition is ChapterTransition.Prev` appears character-identically in 3 files — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerOverscrollNavigation.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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:246 — `item is ReaderUiItem.Transition && item.transition is ChapterTransition.Next && item.transition.to != null` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt, app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.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/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt:279 — `item is ReaderUiItem.Transition && item.transition is ChapterTransition.Prev && item.transition.to != null` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewer.kt, app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewers.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/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt:130 — `localManga.title.isBlank() && sourceManga.title.isNotBlank()` appears character-identically in 2 files — app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaExtensions.kt, app/src/main/java/org/nekomanga/presentation/screens/similar/SimilarRepo.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/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt:706 — `nextChapter != null && config.onNavigateToChapter != null` appears character-identically in 2 files — app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposePagerViewer.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.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/eu/kanade/tachiyomi/data/database/models/CategoryImpl.kt:27 — `other == null || javaClass != other.javaClass` appears character-identically in 6 files — app/src/main/java/eu/kanade/tachiyomi/data/database/models/CategoryImpl.kt, app/src/main/java/eu/kanade/tachiyomi/data/database/models/ChapterImpl.kt, app/src/main/java/eu/kanade/tachiyomi/data/database/models/MangaImpl.kt, app/src/main/java/eu/kanade/tachiyomi/data/database/models/MangaSimilarImpl.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.
  • + 8 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×10
  • Silent fallback default in catch REDACTED:299 — `parseDate` 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/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt:279 — `parseDate` 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/eu/kanade/tachiyomi/source/online/merged/atsumaru/dto/AtsumaruDto.kt:235 — `tryParse` 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/eu/kanade/tachiyomi/source/online/merged/mangaball/Dto.kt:114 — `parseDate` 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/eu/kanade/tachiyomi/source/online/merged/projectsuki/ProjectSuki.kt:287 — `parseDate` 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/eu/kanade/tachiyomi/source/online/models/dto/MangaDto.kt:132 — `asMdMap` swallows every exception into `emptyMap()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:76 — `getAvailableStorageSpace` 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 core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:89 — `getTotalStorageSpace` 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 core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:99 — `getAvailableStorageSpace` 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 core/src/main/kotlin/tachiyomi/core/util/storage/DiskUtil.kt:109 — `getTotalStorageSpace` 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.
AX6 · Interface segregation · Fat interface · ×8
  • Fat interface: TrackService (18 abstract methods) app/src/main/java/eu/kanade/tachiyomi/data/track/TrackService.kt:26 — `TrackService` declares 18 abstract methods: `nameRes`, `getLogo`, `getLogoColor`, `getStatusList`, `isCompletedStatus`, `completedStatus`, `readingStatus`, `planningStatus`, `getStatus`, `getGlobalStatus`, `getScoreList`, `displayScore`, `add`, `update`, `bind`, `search`, `refresh`, `login`. 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: MangaDexService (21 abstract methods) app/src/main/java/eu/kanade/tachiyomi/network/services/MangaDexService.kt:25 — `MangaDexService` declares 21 abstract methods: `search`, `searchAuthor`, `searchGroup`, `recentlyAdded`, `popularNewReleases`, `viewManga`, `mangaStatistics`, `getAggregate`, `chapterStatistics`, `relatedManga`, `recommendedManga`, `viewChapters`, `latestChapters`, `viewArtwork`, `viewChapter`, `randomManga`, `scanlatorGroup`, `scanlatorGroupByUuid`, `authorByUuid`, `viewList`, `getSeasonalList`. 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: ChapterDao (18 abstract methods) app/src/main/java/org/nekomanga/data/database/dao/ChapterDao.kt:15 — `ChapterDao` declares 18 abstract methods: `observeChaptersForManga`, `getChaptersForManga`, `getChaptersForMangaIds`, `getChapterById`, `getChapterByUrl`, `getChaptersByUrls`, `getChapterByUrlAndMangaId`, `insertChapter`, `insertChapters`, `updateChapters`, `deleteChapter`, `deleteChapters`, `updateProgress`, `updateSourceOrder`, `observeRecentChapters`, `getRecentChapters`, `updateChapterBackupByMangadexId`, `updateKnownChapterBackupById`. 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: HistoryDao (19 abstract methods) app/src/main/java/org/nekomanga/data/database/dao/HistoryDao.kt:13 — `HistoryDao` declares 19 abstract methods: `observeRecentHistoryUngrouped`, `getRecentHistoryUngrouped`, `observeRecentMangaLimit`, `getRecentMangaLimit`, `observeHistoryPerPeriod`, `observeAllRecentsTypes`, `getHistoryByMangaId`, `observeHistoryByMangaId`, `getHistoryByMangaIds`, `observeChapterHistoryByMangaId`, `getChapterHistoryByMangaId`, `getChapterHistoryByMangaIds`, `getHistoryByChapterUrl`, `getTotalReadDuration`, `getHistoryByChapterId`, `insertHistory`, `updateHistoryLastRead`, `deleteAllHistory`, `deleteHistoryNoLastRead`. 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: MangaDao (32 abstract methods) app/src/main/java/org/nekomanga/data/database/dao/MangaDao.kt:13 — `MangaDao` declares 32 abstract methods: `observeMangaList`, `getMangaList`, `observeFavoriteMangaList`, `getFavoriteMangaList`, `getMangaByIds`, `getMangaByUrlAndSourceSync`, `getMangaByUrls`, `getMangaByUrl`, `getMangaById`, `observeMangaById`, `insertManga`, `insertMangaList`, `updateManga`, `updateMangaList`, `deleteManga`, `deleteMangaList`, `deleteAllNotInLibrary`, `deleteAllNotInLibraryAndNotRead`, `deleteAllManga`, `observeReadNotInLibraryManga`, `getReadNotInLibraryManga`, `observeLastReadMangaIds`, `observeLastFetchedMangaIds`, `updateFavorite`, `updateDateAdded`, `updateViewerFlags`, `updateChapterFlags`, `updateMangaInfo`, `updateLastUpdated`, `updateNextUpdated`, `updateScanlatorFilter`, `updateLanguageFilter`. 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: ChapterRepository (20 abstract methods) app/src/main/java/org/nekomanga/data/database/repository/ChapterRepository.kt:7 — `ChapterRepository` declares 20 abstract methods: `observeChaptersForManga`, `getChaptersForManga`, `getChaptersForMangaIds`, `getChapterById`, `getChapterByUrl`, `getChaptersByUrls`, `getChapterByUrlAndMangaId`, `insertChapter`, `insertChapters`, `updateChapters`, `deleteChapter`, `deleteChapters`, `updateProgress`, `updateSourceOrder`, `observeRecentChapters`, `getRecentChapters`, `updateChaptersBackup`, `updateKnownChaptersBackup`, `updateChaptersProgress`, `fixChaptersSourceOrder`. 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: HistoryRepository (21 abstract methods) app/src/main/java/org/nekomanga/data/database/repository/HistoryRepository.kt:8 — `HistoryRepository` declares 21 abstract methods: `observeRecentHistoryUngrouped`, `getRecentHistoryUngrouped`, `observeRecentMangaLimit`, `getRecentMangaLimit`, `getHistoryPerPeriod`, `observeAllRecentsTypes`, `observeChapterHistoryByMangaId`, `getChapterHistoryByMangaId`, `getChapterHistoryByMangaIds`, `getHistoryByMangaId`, `observeHistoryByMangaId`, `getHistoryByMangaIds`, `getHistoryByChapterUrl`, `getTotalReadDuration`, `getHistoryByChapterId`, `insertHistory`, `updateHistoryLastRead`, `upsertHistory`, `upsertHistoryList`, `deleteAllHistory`, `deleteHistoryNoLastRead`. 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: MangaRepository (34 abstract methods) app/src/main/java/org/nekomanga/data/database/repository/MangaRepository.kt:7 — `MangaRepository` declares 34 abstract methods: `observeLibrary`, `getLibraryList`, `observeMangaList`, `getMangaList`, `observeFavoriteMangaList`, `getFavoriteMangaList`, `getMangaByIds`, `getMangaByUrlAndSource`, `getMangaByUrls`, `getMangaByUrl`, `getMangaById`, `observeMangaById`, `observeReadNotInLibraryManga`, `getReadNotInLibraryManga`, `observeLastReadMangaIds`, `observeLastFetchedMangaIds`, `insertManga`, `insertMangaList`, `updateManga`, `updateMangaList`, `deleteManga`, `deleteMangaList`, `deleteAllNotInLibrary`, `deleteAllNotInLibraryAndNotRead`, `deleteAllManga`, `updateFavorite`, `updateDateAdded`, `updateViewerFlags`, `updateChapterFlags`, `updateMangaInfo`, `updateLastUpdated`, `updateNextUpdated`, `updateScanlatorFilter`, `updateLanguageFilter`. 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.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 127 significant file(s) lose their only recent owner: app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt, app/src/main/java/org/nekomanga/presentation/components/FastScroller.kt, app/src/main/java/org/nekomanga/presentation/components/sheets/FilterBrowseSheet.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/ReaderSettingsSheet.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/ComposeWebtoonViewer.kt, app/src/main/java/org/nekomanga/presentation/screens/stats/StatsViewModel.kt, app/src/main/java/org/nekomanga/data/database/migration/DatabaseMigrations.kt, app/src/main/java/org/nekomanga/presentation/components/sheets/TrackingSheet.kt (+119 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 12 significant file(s) lose their only recent owner: app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/SmartBackground.kt, app/src/main/java/org/nekomanga/presentation/screens/reader/viewer/PagerSmartBackground.kt, app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt, app/src/main/java/eu/kanade/tachiyomi/data/coil/MaxBitmapBytes.kt, app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadJob.kt, app/src/main/java/org/nekomanga/data/database/dao/MangaDao.kt, app/src/main/java/org/nekomanga/presentation/components/storage/StorageLocation.kt, app/src/main/java/eu/kanade/tachiyomi/crash/CrashReport.kt (+4 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/external/MangaUpHandler.kt, app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixWafSolver.kt, app/src/main/java/eu/kanade/tachiyomi/source/online/merged/comix/ComixCipher.kt. Pair on, review, or document these before any departure.
D21 · Naming Consistency · `mangaID` spells `ID` where 499 names in the project spell it `Id` · ×1
  • `mangaID` spells `ID` where 499 names in the project spell it `Id` app/src/main/java/eu/kanade/tachiyomi/source/online/MangaDex.kt:73 — 499 of 504 names in project app spell the token `Id` (499 of 504; unit: names in project app containing `Id`). Peers: BackupTracking.syncId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:12); BackupTracking.libraryId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:14); BackupTracking.mediaIdInt (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:17); BackupTracking.mediaId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:30); CoverCache.getCustomCoverFile(mangaId) (app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:186). Rename to `mangaId`. [rule N6]
D21 · Naming Consistency · `bookID` spells `ID` where 499 names in the project spell it `Id` · ×1
  • `bookID` spells `ID` where 499 names in the project spell it `Id` app/src/main/java/eu/kanade/tachiyomi/source/online/merged/projectsuki/ProjectSuki.kt:146 — 499 of 504 names in project app spell the token `Id` (499 of 504; unit: names in project app containing `Id`). Peers: BackupTracking.syncId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:12); BackupTracking.libraryId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:14); BackupTracking.mediaIdInt (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:17); BackupTracking.mediaId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:30); CoverCache.getCustomCoverFile(mangaId) (app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:186). Rename to `bookId`. [rule N6]
D21 · Naming Consistency · `chapterID` spells `ID` where 499 names in the project spell it `Id` · ×1
  • `chapterID` spells `ID` where 499 names in the project spell it `Id` app/src/main/java/eu/kanade/tachiyomi/source/online/merged/projectsuki/ProjectSuki.kt:147 — 499 of 504 names in project app spell the token `Id` (499 of 504; unit: names in project app containing `Id`). Peers: BackupTracking.syncId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:12); BackupTracking.libraryId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:14); BackupTracking.mediaIdInt (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:17); BackupTracking.mediaId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:30); CoverCache.getCustomCoverFile(mangaId) (app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:186). Rename to `chapterId`. [rule N6]
D21 · Naming Consistency · `isRTL` spells `RTL` where 30 names in the project spell it `Rtl` · ×1
  • `isRTL` spells `RTL` where 30 names in the project spell it `Rtl` app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSlider.kt:14 — 30 of 31 names in project app spell the token `Rtl` (30 of 31; unit: names in project app containing `Rtl`). Peers: ReaderViewModel.updatePagerActiveIndex(isRtl) (app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:1591); BuildPagerItemsUseCase.invoke(isRtl) (app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/BuildPagerItemsUseCase.kt:20); BuildPagerItemsUseCase.invoke(isRtl) (app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/BuildPagerItemsUseCase.kt:90); BuildPagerItemsUseCase.joinItems(isRtl) (app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/BuildPagerItemsUseCase.kt:112); BuildPagerItemsUseCase.joinItems(isRtl) (app/src/main/java/eu/kanade/tachiyomi/ui/reader/domain/BuildPagerItemsUseCase.kt:287). Rename to `isRtl`. [rule N6]
D21 · Naming Consistency · `loadChapterURL` spells `URL` where 191 names in the project spell it `Url` · ×1
  • `loadChapterURL` spells `URL` where 191 names in the project spell it `Url` app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt:484 — 191 of 192 names in project app spell the token `Url` (191 of 192; unit: names in project app containing `Url`). Peers: BackupManga.thumbnailUrl (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt:26); BackupManga.mergedMangaUrl (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt:47); BackupManga.mergedMangaImageUrl (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt:49); BackupMergeManga.coverUrl (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupMergeManga.kt:12); BackupTracking.trackingUrl (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:19). Rename to `loadChapterUrl`. [rule N6]
D21 · Naming Consistency · `getExternalID` spells `ID` where 499 names in the project spell it `Id` · ×1
  • `getExternalID` spells `ID` where 499 names in the project spell it `Id` app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaMappings.kt:44 — 499 of 504 names in project app spell the token `Id` (499 of 504; unit: names in project app containing `Id`). Peers: BackupTracking.syncId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:12); BackupTracking.libraryId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:14); BackupTracking.mediaIdInt (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:17); BackupTracking.mediaId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:30); CoverCache.getCustomCoverFile(mangaId) (app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:186). Rename to `getExternalId`. [rule N6]
D21 · Naming Consistency · `getMuNewForMuID` spells `ID` where 499 names in the project spell it `Id` · ×1
  • `getMuNewForMuID` spells `ID` where 499 names in the project spell it `Id` app/src/main/java/eu/kanade/tachiyomi/util/manga/MangaMappings.kt:50 — 499 of 504 names in project app spell the token `Id` (499 of 504; unit: names in project app containing `Id`). Peers: BackupTracking.syncId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:12); BackupTracking.libraryId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:14); BackupTracking.mediaIdInt (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:17); BackupTracking.mediaId (app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupTracking.kt:30); CoverCache.getCustomCoverFile(mangaId) (app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt:186). Rename to `getMuNewForMuId`. [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` (104488 LoC, 2378 module-visible types across 153 directories) overshoots its size bounds. 1 of 5 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 6.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 63 of 465 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; 465 of the 916 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/org/nekomanga/presentation/components/sheets/FilterChapterSheet.kt, app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/SearchHandler.kt, app/src/main/java/org/nekomanga/presentation/components/sheets/TrackingDateSheet.kt, app/src/main/java/eu/kanade/tachiyomi/source/online/merged/komga/Komga.kt, app/src/main/java/eu/kanade/tachiyomi/widget/MaterialSpinnerView.kt, app/src/main/java/eu/kanade/tachiyomi/source/online/handlers/FollowsHandler.kt, app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt, core/src/main/kotlin/tachiyomi/core/network/DohProviders.kt (and 55 more). 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
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:3 — 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 5 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.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
PF1 · Benchmark discipline · Benchmarks don't track allocations · ×1
  • Benchmarks don't track allocations — A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure app/src/main/java/eu/kanade/tachiyomi/util/system/DateExtensions.kt:27 — `tryParse` answers `0L` when `ParseException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.

Appendix B — Reproduction & audit trail

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

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-df984181166c49149d4111d6cf0b5c99/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-df984181166c49149d4111d6cf0b5c99/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3200" --report-format json --report-path /tmp/watchdog-gitleaks-df984181166c49149d4111d6cf0b5c99/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=5957" --report-format json --report-path /tmp/watchdog-gitleaks-df984181166c49149d4111d6cf0b5c99/history-3.json --exit-code 0 --source .8artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-df984181166c49149d4111d6cf0b5c99/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 .41artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) and a Gradle version catalogue — not scanned yet).0—
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 12 file(s) — `app/src/main/java/eu/kanade/tachiyomi/data/coil/SharedFullDecodes.kt`, `app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateJob.kt`, `app/src/main/java/eu/kanade/tachiyomi/source/online/merged/suwayomi/Suwayomi.kt`, `app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt`, `app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPanDelegate.kt`, … (+7 more) — 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 Dependenciesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) and a Gradle version catalogue — not scanned yet).0—

Run 01a1e9d5-784c-79a7-8442-d2af491356d0 · 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