Public report of Automattic/pocket-casts-ios, 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, 09:59 UTC · Survey ID cd_dfe4104dead54192bf60915c73883df5

Automattic/pocket-casts-ios

Measured 17 November 2026, 09:58 UTC, at code version d67daea

Test reliability is not measured: The suite could not be re-run, but the repository declares tests of its own unreliable.

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 38.6out of 100 Weak
CriticalWeakAdequateStrongExemplary

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

A large codebase: 176,718 lines of product code in 19 projects, tests not counted · Estimated rebuild effort: about 1.2 person-years · Weakest lens: Event-Driven, 10.0

Findings by how serious they are

5 critical 1276 serious 217 minor

16 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, 09:58 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 ▸

53of 53 dimensions measured by tools.
1481of 1498 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
53dimensions across 9 lenses, read from 176,718 lines of product code in 19 projects.
Chapters

Executive summary

Automattic/pocket-casts-ios falls short of our standard for production, held back most by its Event-Driven lens, the way the code's parts exchange events. It scores 38.6 out of 100 and is rated Weak, and two of its five critical findings are security problems in its automatic dependency updates and in the build pipeline.

Event-Driven, at 10.0, is the weakest lens and counts most in the score. The best first step is stopping the event handlers from waiting on other services, worth about 23.7 points. Raising Event-Driven to 70 would lift the score to about 60.4.

One automatic update takes new releases before a bad one can be spotted. One pipeline tool is referenced by a changeable name, so the build pipeline can be tampered with. Setting a waiting period for automatic updates and pinning the tool to an exact version would close both risks. Letting the handler publish a message instead of waiting for the reply would take care of the message handler that waits for another service.

The product code is 176,718 lines, about €170,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.
Event-Driven 10.0 · counts for 45%Code Health 51.4 · counts for 25%Production Readiness 60.5 · counts for 14%Maturity 63.3 · counts for 8%Architecture 91.1 · counts for 4%Security and Compliance 94.7 · counts for 2%Domain Modelling 100.0 · counts for 1%Accessibility 100.0 · counts for 1%Performance 100.0 · counts for 0%

If Event-Driven rose from 10.0 to 70, the lowest score rated Strong, the score would rise from 38.6 to about 60.4.

Code composition: what the lines of code are
Product code 88%Tests 12%
Rebuild cost: about €170,000 · Estimate
Cost to rebuild€56,000 to €280,000, for 941 to 2,986 hours of work, about 1.2 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 39. 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: 176,718 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
Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource.
Raises the score by about 23.7 points · Medium effort · Handler temporal coupling
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.
Raises the score by about 2.3 points · Low effort · ADR Quality
3
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`.
Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.
Raises the score by about 3.5 points · Medium effort · Nullable reference types

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 €170,000 to build again, about 1.2 person-years of work. Its weakest lens is Event-Driven, at 10.0 (Critical). Event-Driven is about whether the parts of the system can rely on the messages they send each other. Because the weakest lens counts most in the score, work on Event-Driven also moves the score most.
Based on: the rebuild estimate · the Event-Driven grade · how much each lens counts
What to do: Start with the Event-Driven actions in Top priorities.
If you do one thing first · First action
Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource. Of all the actions in this report, it raises the score most for the work it takes: about 23.7 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 10% on every change. The history of the code shows how much it changes: about 58,386 lines over the last 90 days, which is about 236,788 lines a year. At that pace, the extra work comes to an estimated 25.5 to 152.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — 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 AEXML AEXML BuildTools BuildTools EndOfYear EndOfYear PocketCastsDataModel PocketCastsDataModel EndOfYear->PocketCastsDataModel PocketCastsServer PocketCastsServer EndOfYear->PocketCastsServer PocketCastsUtils PocketCastsUtils EndOfYear->PocketCastsUtils MNAVChapters MNAVChapters NotificationContent NotificationContent Pocket Casts App Clip Pocket Casts App Clip Pocket Casts TV App Pocket Casts TV App Pocket Casts Watch App Pocket Casts Watch App PocketCastsAnalytics PocketCastsAnalytics PocketCastsAnalytics->PocketCastsDataModel PocketCastsAnalytics->PocketCastsServer PocketCastsAnalytics->PocketCastsUtils PocketCastsDataModel->PocketCastsUtils PocketCastsServer->PocketCastsDataModel PocketCastsServer->PocketCastsUtils PodcastsIntents PodcastsIntents PodcastsIntentsUI PodcastsIntentsUI SJUtils SJUtils Share Extension Share Extension VoiceBoostN VoiceBoostN WidgetExtension WidgetExtension podcasts podcasts

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.

8 modules, with 21 dependencies between them. One loop runs through 7 of the modules, marked above the diagonal.

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 (global)2 Modules~EndOfYear3 Modules~PocketCastsAnalytics4 repository5 Modules~PocketCastsServer6 Modules~PocketCastsDataModel7 Modules~PocketCastsUtils8 Modules~AEXML
1 (global)
2 Modules~EndOfYear264
3 Modules~PocketCastsAnalytics1185
4 repository252038159710931
5 Modules~PocketCastsServer48962365
6 Modules~PocketCastsDataModel1515114
7 Modules~PocketCastsUtils761
8 Modules~AEXML101
Uses a module listed above itPart of a loopThe module itself
1 (global)2 Modules~EndOfYear3 Modules~PocketCastsAnalytics4 repository5 Modules~PocketCastsServer6 Modules~PocketCastsDataModel7 Modules~PocketCastsUtils8 Modules~AEXML(global)1Modules~EndOfYear2Modules~PocketCastsAnalytics3repository4Modules~PocketCastsServer5Modules~PocketCastsDataModel6Modules~PocketCastsUtils7Modules~AEXML82641185252038159710931489623651515114761101

At a glance — Code Health · 51.4 · Adequate · gated by X5 ·

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

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

At a glance — Readiness · 60.5 · Adequate · gated by P3 ·

At a glance — Security · 94.7 · Checked 5 of 11 ·

At a glance — Domain Modelling · 100.0 · Exemplary ·

At a glance — Event-Driven · 10.0 · Critical · gated by ED1 ·

At a glance — Accessibility · 100.0 · Exemplary ·

At a glance — Performance · 100.0 · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection4High / Critical

Roadmap

Top priorities: Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource; Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive; Swallowed exception (empty catch).

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

Do thisHelpsEffortDimension
Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource.+23.7 ptsMediumHandler temporal coupling
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.+2.3 ptsLowADR Quality
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.+3.5 ptsMediumNullable reference types
Swallowed exception (empty catch)+2.3 ptsMediumException handling
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.+1.7 ptsMediumArchitecture documentation
Resolve the 2 Floating branch dependency finding(s) in Dependency Hygiene.+0.7 ptsLowDependency Hygiene
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+1.1 ptsMediumSecurity & performance tooling
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+0.7 ptsMediumDeployment & Rollback

File quality

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

FileScoreBandWorst signal
podcasts/Main/MainTabBarController.swift4.8MixedGod Classes: TooManyMethods: MainTabBarController
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift5.5MixedCognitive Complexity: EpisodeDataManager.saveBulkEpisodeSyncInfo (cognitive 27)
podcasts/DefaultPlayer.swift5.5MixedCyclomatic Complexity: DefaultPlayer.configurePlayer (cyclomatic 33)
podcasts/DownloadManager.swift5.5MixedCyclomatic Complexity: DownloadManager.downloadParallelToStream (cyclomatic 32)
podcasts/PlaylistShortcutsViewController.swift5.5MixedCognitive Complexity: PlaylistShortcutsViewController.getEnabledShortcuts (cognitive 48)
podcasts/MiniPlayerViewController.swift5.5MixedCognitive Complexity: MiniPlayerViewController.playbackProgressDidChange (cognitive 19)
Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift5.5MixedGod Classes: TooManyMethods: PodcastDataManager
podcasts/LargeListSummaryViewController.swift5.5MixedCode Duplication: Edited copy of a member (14 corresponding lines)
podcasts/GeneralSettingsViewController.swift5.5MixedCyclomatic Complexity: GeneralSettingsViewController.tableView (cyclomatic 28)
podcasts/PlayerCell.swift5.5MixedCode Duplication: Edited copy of a member (35 corresponding lines)
podcasts/TranscriptViewController.swift5.6MixedCognitive Complexity: TranscriptViewController.styleText (cognitive 22)
podcasts/DownloadsViewController.swift5.6MixedGod Classes: TooManyMethods: DownloadsViewController
podcasts/UploadedSettingsViewController.swift5.6MixedCode Duplication: Edited copy of a member (16 corresponding lines)
podcasts/New Detail/PlaylistDetailViewController.swift5.6MixedGod Classes: TooManyMethods: PlaylistDetailViewController
podcasts/SiriShortcutsManager.swift5.6MixedGod Classes: TooManyMethods: SiriShortcutsManager
podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift5.6MixedCode Duplication: Edited copy of a member (56 corresponding lines)
podcasts/DiscoverCollectionViewController.swift5.7MixedCyclomatic Complexity: DiscoverCollectionViewController.populateFrom (cyclomatic 18)
Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift5.7MixedCognitive Complexity: ServerPodcastManager.addEpisode (cognitive 19)
Pocket Casts Watch App/UI/Play Source/PhoneSourceViewModel.swift5.7MixedGod Classes: TooManyMethods: PhoneSourceViewModel

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

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

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

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

Could not be resolved — 16

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

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

What we checked — 53 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D19D20D21D26D27D28D29D30D34D35D37D43D44AC2AC3AC6AX10AX3AX4AX6AX8AX9DM4DM5DM6ED1M1M2M3M4P1P2P3P4P6PF3X26X28X3X5

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, 1481 of 1498 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 01a1e8f1-9fca-7621-88aa-cd9fac46e324.

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: the Swift half could not be measured — the Swift suite in Modules produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, 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. This repository declares 1 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.swift), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Swift Package.swift/Package.resolved, but the licence verdict published here was taken over its gem dependencies. Nothing was read about its SwiftPM dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • 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 a COLLECTOR gap, not an environment fault: it declares a published package (Modules/Package.swift), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • 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. `Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift`, `Modules/Sources/PocketCastsServer/Public/ApiSetting.swift`, `Modules/Sources/PocketCastsServer/Public/Cache/ShowInfoDataRetriever.swift`, `Modules/Sources/PocketCastsServer/Public/WhatsNew/WhatsNewManager.swift`, `Modules/Sources/PocketCastsUtils/General/Mutex.swift`, … (+167 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: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. 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).
  • C1 Data Protection — 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 personal data 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 personal data controls.
  • 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.
  • C3 Audit Trail — 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 audit 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 audit controls.
  • C4 Data Retention — 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. 'GRDB' is imported (Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:1), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — 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. 'GRDB' is imported (Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:1), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P8 Schema migrations — 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 schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
  • 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.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X2 Cancellation propagation — 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, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 7 further occurrence(s) are not listed individually; the score already reflects all 47.

Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

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.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.7 / 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 5.7 / 10 · rule-coverage 100% · ceiling Prevented

62 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DatabaseHelper.upgradeIfRequired at 134. A further 20 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 AppTheme.colorForStyle at 113 — they are counted neither in the figure above nor in this dimension's score. 11 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: podcasts/AppTheme.swift (AppTheme.colorForStyle at 113), Modules/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift (FeatureFlag.`default` at 97), podcasts/LocalizationHelpers.swift (String.localized at 73), podcasts/Extensions/Server+Strings.swift (APIError.localizedDescription at 30), podcasts/DownloadManager+Logging.swift (tls_ciphersuite_t.debugDescription at 27), and 6 more not listed here. 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.

DatabaseHelper.upgradeIfRequired (cyclomatic 134)Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:31
NavigationManager.performNavigation (cyclomatic 70)podcasts/Main/NavigationManager.swift:121
AppDelegate.setupRoutes (cyclomatic 69)podcasts/AppDelegate+UrlHandling.swift:72
ServerPodcastManager.update (cyclomatic 61)Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:36
PlaylistQueryBuilder.queryFor (cyclomatic 48)Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:888

+ 57 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 DatabaseHelper.upgradeIfRequired (cyclomatic 134), NavigationManager.performNavigation (cyclomatic 70), AppDelegate.setupRoutes (cyclomatic 69). — 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 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: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

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

128 method(s) exceeded the cognitive complexity threshold of 15; the worst was DatabaseHelper.upgradeIfRequired at 198.

DatabaseHelper.upgradeIfRequired (cognitive 198)Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:31
ServerPodcastManager.update (cognitive 97)Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:36
NavigationManager.performNavigation (cognitive 92)podcasts/Main/NavigationManager.swift:121
AppDelegate.setupRoutes (cognitive 82)podcasts/AppDelegate+UrlHandling.swift:72
PlaylistQueryBuilder.queryFor (cognitive 76)Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:888

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with DatabaseHelper.upgradeIfRequired (cognitive 198). — Refactoring it lifts Cognitive Complexity from 5.3 to about 5.8/10.

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

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

107 god class(es) detected.

TooManyMethods: DataManager · ×52Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:7
MethodTooLong: DatabaseHelper.upgradeIfRequired · ×20Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:31
ClassTooLong: PlaybackManager · ×20podcasts/PlaybackManager.swift:9
FileTooLong: podcasts/PlaybackManager.swift · ×15podcasts/PlaybackManager.swift

What to do

  1. Resolve the 52 TooManyMethods finding(s) in God Classes — start with DataManager.swift, PodcastViewController.swift, PlaybackManager.swift. — One of this dimension's main actionable groups (52 warning-level).
  2. Resolve the 20 MethodTooLong finding(s) in God Classes — start with PlaylistQueryBuilder.swift (2), DatabaseHelper.swift, AppDelegate+UrlHandling.swift. — One of this dimension's main actionable groups (20 warning-level).
  3. Resolve the 20 ClassTooLong finding(s) in God Classes — start with PlaybackManager.swift, FingerprintTimingManager.swift, PodcastViewController.swift. — One of this dimension's main actionable groups (20 warning-level).

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

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

307 duplicated block group(s) detected. 9.1 % of the production lines (16,088 of 176,718) are in a reported copy. A further 449 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (6 lines × 2) · ×35Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:730
Duplicated block (7 lines × 2) · ×31Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:69
Edited copy of a member (4 corresponding lines) · ×27podcasts/Onboarding/Plus/UpgradeTier.swift:31
Edited copy of a member (5 corresponding lines) · ×27podcasts/Common Components/SettingsTableHeader.swift:11
Edited copy of a member (9 corresponding lines) · ×24podcasts/Folders/FolderViewController+ContextMenu.swift:93

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

What to do

  1. Resolve the 35 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with DiscoverSectionEpisodesModel.swift (2), DataManager.swift, RetrievePlaylistsTask.swift. — One of this dimension's main actionable groups (35 warning-level).
  2. Resolve the 31 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with Episode+Encoding.swift (2), Episode.swift (2), CustomStepper.swift (2). — One of this dimension's main actionable groups (31 warning-level).
  3. Resolve the 27 Edited copy of a member (4 corresponding lines) finding(s) in Code Duplication — start with EpisodeDataManager.swift (3), UpgradeTier.swift, ServerPodcastManager+Subscription.swift. — One of this dimension's main actionable groups (27 warning-level).

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

D5 · Coupling9.6 / 10Stronggated by 1 serious finding✓ 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 9.6 / 10 · rule-coverage 100% · ceiling Prevented

19 production modules (SwiftPM+Xcode), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 1 module(s) off the main sequence, with abstractness counted on 7 of the 19 (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: PocketCastsUtils

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)7.8 / 10Strong✓ 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 7.8 / 10 · rule-coverage 100% · ceiling Verified

114 of 612 classes have LCOM4 above 3.

Low cohesion: View (LCOM4 62) · ×114podcasts/PCHostingController.swift:118

What to do

  1. Resolve the 114 Low cohesion finding(s) in Cohesion (LCOM4) — start with PCHostingController.swift, WatchSourceViewModel.swift, PhoneSourceViewModel.swift. — One of this dimension's main actionable groups (114 warning-level).

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

D10 · Test Quality9.8 / 10Stronggated by 13 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

0 skipped, 13 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 930 tests.

No assertions: testQueryPerformance · ×13Modules/Tests/PocketCastsDataModelTests/AutoAddCandidatesDataManagerTests.swift:42

What to do

  1. Resolve the 13 No assertions finding(s) in Test Quality — start with AudioUtilsTests.swift (4), ShowWhatsNewDotSettingTests.swift (2), ISO8601DateParserTests.swift (2). — One of this dimension's main actionable groups (13 warning-level).

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

D12 · Dependency Hygiene9.2 8.3 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 8.3 / 10 · rule-coverage 90% · ceiling Verified

6 outdated direct SwiftPM dependencies, 2 pinning defect(s). 19 of 21 direct dependencies had their releases listed (0 naming no readable repository, 2 pinned to a branch or a revision rather than a version). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.

Floating branch dependency: swime · ×2
Outdated: automattic-tracks-ios · ×6

What to do

  1. Resolve the 2 Floating branch dependency finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (2 warning-level).

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 158 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 158 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed Gemfile.lock. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. 1 of them publish no licence on rubygems.org; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares a Swift Package.swift/Package.resolved, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 28 serious findings✓ Tool-verified

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

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

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

Top hotspots: podcasts/PlaybackManager.swift (29×27=783); podcasts/Podcasts/Podcast Page/PodcastViewController.swift (26×27=702); Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift (10×61=610)

Hotspot: podcasts/PlaybackManager.swift · ×28podcasts/PlaybackManager.swift:2015

What to do

  1. Resolve the 28 Hotspot finding(s) in Churn × Complexity Hotspots — start with PlaybackManager.swift, PodcastViewController.swift, ServerPodcastManager+Update.swift. — One of this dimension's main actionable groups (28 warning-level).

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

D16 · Bus Factor8.1 / 10Strong✓ 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 8.1 / 10 · rule-coverage 100% · ceiling Documented

165 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is podcasts/MiniPlayerViewController.swift. Counted over 880 of the 1666 production source files in this repository: 781 are under the ~2,400-byte size floor this dimension measures over, and the remaining 5 have no attributable history left to measure.

Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)

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).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

29 deducted task-comment markers across 176718 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 · ×27podcasts/AddCustomViewController.swift:238
HackComment · ×2podcasts/Folders/Create & Edit/Views/SuggestedFolderPodcastView.swift:21

What to do

  1. Resolve the 27 TodoComment finding(s) in Explicit Debt — start with PlayerContainerViewController.swift (3), ManualPlaylistsChooserViewController.swift (2), GRDBDatabase.swift (2). — One of this dimension's main actionable groups (27 warning-level).
  2. Resolve the 2 HackComment finding(s) in Explicit Debt — start with SuggestedFolderPodcastView.swift, SuggestedFoldersView.swift. — One of this dimension's main actionable groups (2 warning-level).

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

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

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

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

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

1 of 1 documentation facets pass in full. 4 document(s) read across 3 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundpodcasts.xcodeproj/project.pbxproj:1

What to do

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

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

D21 · Naming Consistency9.1 / 10Exemplary✓ 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 9.1 / 10 · rule-coverage 100% · ceiling Verified

3 naming inconsistencies among 343 declarations measured against a convention their peers follow.

`lastUiUpdateTime` spells `Ui` where 67 names in the project spell it `UI`podcasts/DownloadProgress.swift:8
`showINAddVoiceShortcutVC` spells `IN` where 295 names in the project spell it `In`podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift:424
`addUiNotificationObservers` spells `Ui` where 67 names in the project spell it `UI`podcasts/VideoViewController.swift:301

✓ On the Gold path — maintain.

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

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

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

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

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

2 of 3 build units (Bundler, SwiftPM) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×2Gemfile:1

What to do

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

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

D27 · Navigability9.8 / 10Exemplary✓ Tool-verified

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)7.9 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

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

4 finding(s): 0 critical, 2 high, 1 medium, 1 low. 1 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 5 file(s) — `Modules/Sources/MNAVChapters/include/MNAVChapterReader.h` (line 32, lines 32–33, lines 33–34, …), `Modules/Sources/PocketCastsServer/Public/WhatsNew/WhatsNewManager.swift` (line 38), `Modules/Tests/PocketCastsUtilsTests/ShowNotesFormatterUtilsTests.swift`, `podcasts/InAppPurchases/IAPHelper.swift` (lines 427–431), `podcasts/UserSatisfactionSurveyManager.swift` (line 225) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

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

160 of 885 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is podcasts/Onboarding/Patron/PatronAppIconUnlock.swift. Counted over 885 of the 1666 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×160podcasts/Onboarding/Patron/PatronAppIconUnlock.swift:1
Orphaned files with no living knowledge

What to do

  1. Resolve the 160 Orphaned file finding(s) in Knowledge Freshness — start with PatronAppIconUnlock.swift, LocalSearchViewModel.swift, UserSatisfactionSurveyManager.swift. — One of this dimension's main actionable groups (160 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 / 10Adequategated by 1 critical finding✓ 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: BookmarkManager+TitleSuggestion.swift↔BookmarkEditViewModel.swift 57%; MainTabBarController.swift↔InformationalModalViewModel.swift 55%; CreateAccountView.swift↔SignInView.swift 50%

Boundary-crossing change coupling: SleepTimerLiveActivityWidget.swift ↔ PlaybackManager.swiftWidgetExtension/Sleep Timer/SleepTimerLiveActivityWidget.swift:1
Change coupling: BookmarkManager+TitleSuggestion.swift ↔ BookmarkEditViewModel.swift · ×4podcasts/Bookmarks/BookmarkManager+TitleSuggestion.swift:1

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with SleepTimerLiveActivityWidget.swift. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 4 Change coupling finding(s) in Change Coupling — start with BookmarkManager+TitleSuggestion.swift, MainTabBarController.swift, CreateAccountView.swift. — One of this dimension's main actionable groups (4 warning-level).

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • `BaseEpisode` declares 17 requirements: `displayableTitle`, `parentIdentifier`, `downloaded`, `bufferedForStreaming`, `downloadFailed`, `downloading`, `queued`, `waitingForWifi`, `exemptFromAutoDownload`, `pathToDownloadedFile`, `pathToTempFile`, `inProgress`, `played`, `unplayed`, `playbackError`, `videoPodcast`, `mayContainChapters`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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. — Modules/Sources/PocketCastsDataModel/Public/Model/BaseEpisode.swift:3
  • `ServerSyncDelegate` declares 27 requirements: `podcastUpdated`, `podcastAdded`, `checkForUnusedPodcasts`, `applyAutoArchivingToAllPodcasts`, `subscribedToPodcast`, `playlistChanged`, `episodeStarredChanged`, `archiveEpisodeExternal`, `markEpisodeAsPlayedExternal`, `deselectedChaptersChanged`, `episodeCanBeCleanedUp`, `autoDownloadLatestEpisodes`, `cleanupAllUnusedEpisodeBuffers`, `deleteFromDevice`, `autoDownloadUserEpisodes`, `userEpisodeFileProtocol`, `cleanupCloudOnlyFiles`, `performActionsAfterSync`, `isPushEnabled`, `isNewEpisodeNotificationsEnabled`, `defaultPodcastGrouping`, `defaultShowArchived`, `uniqueAppId`, `appVersion`, `privateUserAgent`, `minTimeBetweenProgressSaves`, `production`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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. — Modules/Sources/PocketCastsServer/Public/Sync/ServerSyncDelegateProtocol.swift:4
  • `NavigationProtocol` declares 38 requirements: `navigateToPodcastList`, `navigateToPodcast`, `navigateToPodcastInfo`, `navigateTo`, `navigateToFolder`, `navigateToSuggestedFolders`, `navigateToEpisode`, `navigateToDiscover`, `navigateToDiscoverNetworks`, `navigateToProfile`, `navigateToFilter`, `navigateToAddFilter`, `presentManualPlaylistsChooser`, `navigateToUpNext`, `navigateToFiles`, `navigateToAddCustom`, `showSubscriptionCancelledAcknowledge`, `showSubscriptionRequired`, `showPlusMarketingPage`, `showSettings`, `showSettingsAppearance`, `showPromotionPage`, `showPromotionFinishedAcknowledge`, `showHeadphoneSettings`, `showGeneralSettings`, `showRedeemGuestPass`, `showSignUp`, `showSupporterSignIn`, `showSupporterBundleDetails`, `showTermsOfUse`, `showPrivacyPolicy`, `showWhatsNew`, `showApproveDevice`, `showInSafariViewController`, `showEndOfYearStories`, `dismissPresentedViewController`, `showOnboardingFlow`, `showNotificationsPermissions`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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. — podcasts/Main/NavigationProtocol.swift:6
  • `PlaySourceViewModel` declares 34 requirements: `fetchEpisode`, `requiresConfirmation`, `isPlaying`, `inUpNext`, `isCurrentlyPlaying`, `supportsPodcastNavigation`, `playPauseTapped`, `skip`, `changeChapter`, `increasePlaybackSpeed`, `decreasePlaybackSpeed`, `changeSpeedInterval`, `downloaded`, `download`, `pauseDownload`, `deleteDownload`, `removeFromUpNext`, `addToUpNext`, `archive`, `unarchive`, `setStarred`, `markPlayed`, `markAsUnplayed`, `fetchDownloadedEpisodes`, `fetchUserEpisodes`, `fetchPlaylists`, `fetchPlaylist`, `fetchPlaylistEpisodes`, `episodeCount`, `clearUpNext`, `nowPlayingTitle`, `nowPlayingSubTitle`, `nowPlayingTimeRemaining`, `nowPlayingTint`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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. — Pocket Casts Watch App/UI/Play Source/PlaySourceViewModel.swift:17
  • `PodcastActionsDelegate` declares 18 requirements: `isSummaryExpanded`, `setSummaryExpanded`, `tableView`, `displayedPodcast`, `settingsTapped`, `fundingTapped`, `folderTapped`, `notificationTapped`, `categoryTapped`, `networkTapped`, `subscribe`, `unsubscribe`, `refreshArtwork`, `showBookmarks`, `showEpisodes`, `showYouMightLike`, `showLogin`, `open`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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. — podcasts/Podcasts/Podcast Page/PodcastViewController.swift:41

What to do

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

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

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

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.

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

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

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.

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

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

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

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. 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.

ED1 · Handler temporal coupling1.0 / 10Critical✓ Tool-verified

Other · Event-Driven — Whether event/message handlers avoid synchronous blocking waits — a blocking wait inside a handler stalls throughput and risks deadlock.

Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.

  • `AudioReadTask.handleReachedEndOfFile` is an event/message handler that blocks on a synchronous wait (a semaphore/queue `.wait`/`.sync`) — it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (`async`/`await`) instead of blocking the handler. — podcasts/AudioReadTask.swift:186

What to do

  • Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource.
M1 · Documentation (README)6.7 / 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

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

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

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

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

What to do

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

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

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

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

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

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

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

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

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

P2 · Observability6.0 / 10Adequate✓ Tool-verified

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

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

  • Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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 CodeQL's Swift pack (Swift/Xcode) (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 6 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. — .github/workflows/claude-code-review.yml:9

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — 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 & Rollback5.0 / 10Adequate✓ 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.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene10.0 / 10Exemplary✓ 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.

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.

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.

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.7 / 10Adequate✓ Tool-verified

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

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

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×21) — podcasts/AddCustomViewController.swift:289, podcasts/DownloadManager.swift:710, podcasts/EpisodeManager.swift:506, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×19) — podcasts/AddCustomViewController.swift:354, podcasts/AddCustomViewController.swift:367, podcasts/TranscriptFilter.swift:60, …

What to do

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

Other · Code Health — Whether Ruby's type checker checks nil and is not undermined by assertions — a file Sorbet reads at `# typed: true` or above, or a Steep target `check`s under its default or strict diagnostics, is one where a method call on a `T.nilable(String)` / `String?` is an error, and each `T.must`, `#: as !nil` or `# steep:ignore NoMethod` is the author telling the checker a value cannot be nil.

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

  • This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 2 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.

What to do

  • Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health51.4Adequate — gated by X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture91.1Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity63.3Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness60.5Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security94.7Checked 5 of 11Solid.
Domain Modelling100.0ExemplaryStrongest area.
Event-Driven10.0Critical — gated by ED1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility100.0ExemplarySolid.
Performance100.0ExemplarySolid.
Unscored — 4 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.

  • D11 Test Reliability — 1 observation(s) recorded · This repository declares 1 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.swift), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
  • D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • X10 Duplicated predicate — 29 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit 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 audit 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.
  • C4 Data Retention — Not assessed: this repository stores data through 'GRDB' (Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:1) but declares no persisted model this check reads (SwiftData @Model, Core Data, Realm, GRDB and Fluent types, GRDB and SQLite.swift columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'GRDB' (Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:1) but declares no persisted model this check reads (SwiftData @Model, Core Data NSManagedObject, Realm Object, GRDB record and Fluent Model properties, GRDB and SQLite.swift columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL files). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 61 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's Ruby imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads.
  • 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
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data 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 personal data 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.
  • 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.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .rb, .swift, 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
  • 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) — 172 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — Swift suite
  • DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
  • DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
  • DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
  • DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Ruby, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — GRDB is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 0% of this repository's production lines — swift (176,305 lines), c (738 lines), objectivec (561 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — 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
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Ruby was read, and it logs through none: the standard library's Logger, which Rails.logger is, takes one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. The console gem (`Console.info`), SemanticLogger, Ougai and dry-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 — 5 finding(s)
D11 · Test Reliability · Test declared unreliable · ×1
  • Test declared unreliable: testRetryWithoutUserAgent_ResetsStateAndRetries PocketCastsTests/Tests/Utilities/MediaExporterResourceLoaderDelegateRetryTests.swift:160 — This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Test is flaky due to async timing issues". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: SleepTimerLiveActivityWidget.swift ↔ PlaybackManager.swift WidgetExtension/Sleep Timer/SleepTimerLiveActivityWidget.swift:1 — `WidgetExtension/Sleep Timer/SleepTimerLiveActivityWidget.swift` (context WidgetExtension) and `podcasts/PlaybackManager.swift` (context podcasts) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `ce7c4b47` Remove redundant #available checks and the dead code they guarded; `8e15bcf1` Remove the Live Activity for the end-of-episode sleep timer; `dd2c6b06` Address sleep timer Live Activity PR review comments — run `git show` on any of them.
ED1 · Handler temporal coupling · Blocking wait inside a handler · ×1
  • Blocking wait inside a handler: AudioReadTask.handleReachedEndOfFile podcasts/AudioReadTask.swift:186 — `AudioReadTask.handleReachedEndOfFile` is an event/message handler that blocks on a synchronous wait (a semaphore/queue `.wait`/`.sync`) — it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (`async`/`await`) instead of blocking the handler.
Serious — 1276 finding(s)
D6 · Cohesion (LCOM4) · Low cohesion · ×114
  • Low cohesion: View (LCOM4 62) podcasts/PCHostingController.swift:118 — View's methods fall into 62 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 62 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: WatchSourceViewModel (LCOM4 36) Pocket Casts Watch App/UI/Play Source/WatchSourceViewModel.swift:7 — WatchSourceViewModel's methods fall into 36 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 36 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: PhoneSourceViewModel (LCOM4 33) Pocket Casts Watch App/UI/Play Source/PhoneSourceViewModel.swift:7 — PhoneSourceViewModel's methods fall into 33 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 33 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: EpisodeDataManager (LCOM4 28) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:5 — EpisodeDataManager's methods fall into 28 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 28 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: WatchSyncManager (LCOM4 25) Pocket Casts Watch App/UI/WatchSyncManager.swift:8 — WatchSyncManager's methods fall into 25 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 25 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: MainTabBarController (LCOM4 25) podcasts/Main/MainTabBarController.swift:10 — MainTabBarController's methods fall into 25 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 25 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: GoogleCastManager (LCOM4 23) podcasts/Google Cast/GoogleCastManager.swift:6 — GoogleCastManager's methods fall into 23 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 23 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: String (LCOM4 20) podcasts/LocalizationHelpers.swift:3 — String's methods fall into 20 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 20 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: GeneralSettingsViewController (LCOM4 18) podcasts/GeneralSettingsViewController.swift:6 — GeneralSettingsViewController's methods fall into 18 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 18 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: PodcastViewController (LCOM4 16) podcasts/Podcasts/Podcast Page/PodcastViewController.swift:70 — PodcastViewController's methods fall into 16 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 16 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: PlaylistDetailViewController (LCOM4 15) podcasts/New Detail/PlaylistDetailViewController.swift:9 — PlaylistDetailViewController's methods fall into 15 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 15 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: DownloadsViewController (LCOM4 14) podcasts/DownloadsViewController.swift:8 — DownloadsViewController's methods fall into 14 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 14 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: SiriShortcutsManager (LCOM4 14) podcasts/SiriShortcutsManager.swift:8 — SiriShortcutsManager's methods fall into 14 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 14 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: PodcastDataManager (LCOM4 13) Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:15 — PodcastDataManager's methods fall into 13 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 13 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: StatsManager (LCOM4 13) Modules/Sources/PocketCastsServer/Public/StatsManager.swift:5 — StatsManager's methods fall into 13 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 13 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: UploadedViewController (LCOM4 13) podcasts/UploadedViewController.swift:8 — UploadedViewController's methods fall into 13 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 13 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: DownloadSettingsViewController (LCOM4 12) podcasts/DownloadSettingsViewController.swift:5 — DownloadSettingsViewController's methods fall into 12 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 12 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: ListeningHistoryViewController (LCOM4 12) podcasts/ListeningHistoryViewController.swift:8 — ListeningHistoryViewController's methods fall into 12 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 12 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: UpNextViewController (LCOM4 12) podcasts/UpNextViewController.swift:6 — UpNextViewController's methods fall into 12 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 12 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: AppDelegate (LCOM4 11) podcasts/AppDelegate.swift:12 — AppDelegate's methods fall into 11 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 11 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: SleepTimerViewController (LCOM4 11) podcasts/SleepTimerViewController.swift:4 — SleepTimerViewController's methods fall into 11 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 11 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: PodcastListViewController (LCOM4 11) podcasts/Podcasts/All Podcasts/PodcastListViewController.swift:9 — PodcastListViewController's methods fall into 11 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 11 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: Array (LCOM4 11) fastlane/download_metadata.swift:153 — Array's methods fall into 11 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 11 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: EffectsPlayer (LCOM4 10) podcasts/EffectsPlayer.swift:8 — EffectsPlayer's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PlaylistsViewController (LCOM4 10) podcasts/PlaylistsViewController.swift:10 — PlaylistsViewController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • + 89 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×52
  • TooManyMethods: DataManager Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:7 — TooManyMethods — 248 methods, declared across 4 files: Public/DataManager.swift (244), Public/DataManager+ManualPlaylist.swift (2), History/ListeningHistoryViewModel.swift (1), Starred/StarredEpisodesViewModel.swift (1). The bar is 30 methods; this is 218 over it, 8.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: PodcastViewController podcasts/Podcasts/Podcast Page/PodcastViewController.swift:70 — TooManyMethods — 167 methods, declared across 8 files: Podcast Page/PodcastViewController.swift (97), Podcast Page/PodcastViewController+TableData.swift (25), Podcast Page/PodcastViewController+MultiSelect.swift (12), Podcast Page/PodcastViewController+Search.swift (9), +4 more file(s). The bar is 30 methods; this is 137 over it, 5.57× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: PlaybackManager podcasts/PlaybackManager.swift:9 — TooManyMethods — 143 methods, declared across 2 files: podcasts/PlaybackManager.swift (142), podcasts/TranscriptPlaybackManaging.swift (1). The bar is 30 methods; this is 113 over it, 4.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: MainTabBarController podcasts/Main/MainTabBarController.swift:10 — TooManyMethods — 123 methods, declared across 4 files: Main/MainTabBarController.swift (93), Main/MainTabBarController+shortcuts.swift (16), Main/MainTabBarController+Animations.swift (12), Main/MainTabBarController+Alert.swift (2). The bar is 30 methods; this is 93 over it, 4.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: NowPlayingPlayerItemViewController podcasts/NowPlayingPlayerItemViewController.swift:11 — TooManyMethods — 112 methods, declared across 5 files: podcasts/NowPlayingPlayerItemViewController+Shelf.swift (48), podcasts/NowPlayingPlayerItemViewController.swift (39), podcasts/NowPlayingPlayerItemViewController+Update.swift (19), podcasts/NowPlayingPlayerItemViewController+Seek.swift (4), +1 more file(s). The bar is 30 methods; this is 82 over it, 3.73× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: PlaylistDetailViewController podcasts/New Detail/PlaylistDetailViewController.swift:9 — TooManyMethods — 104 methods, declared across 9 files: New Detail/PlaylistDetailViewController.swift (30), New Detail/PlaylistDetailViewController+EditActions.swift (20), New Detail/PlaylistDetailViewController+TableView.swift (20), New Detail/PlaylistDetailViewController+MultiSelect.swift (11), +5 more file(s). The bar is 30 methods; this is 74 over it, 3.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: EpisodeDataManager Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:5 — TooManyMethods — 93 methods. The bar is 30 methods; this is 63 over it, 3.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: PodcastListViewController podcasts/Podcasts/All Podcasts/PodcastListViewController.swift:9 — TooManyMethods — 85 methods, declared across 6 files: All Podcasts/PodcastListViewController.swift (36), All Podcasts/PodcastListViewController+CollectionView.swift (14), All Podcasts/PodcastListViewController+Edit.swift (13), All Podcasts/PodcastListViewController+Search.swift (9), +2 more file(s). The bar is 30 methods; this is 55 over it, 2.83× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: MiniPlayerViewController podcasts/MiniPlayerViewController.swift:7 — TooManyMethods — 78 methods, declared across 4 files: podcasts/MiniPlayerViewController.swift (56), podcasts/MiniPlayerViewController+Gestures.swift (11), podcasts/MiniPlayerViewController+Positioning.swift (8), podcasts/MiniPlayerViewController+TransitionDelegate.swift (3). The bar is 30 methods; this is 48 over it, 2.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: TranscriptViewController podcasts/TranscriptViewController.swift:7 — TooManyMethods — 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UpNextViewController podcasts/UpNextViewController.swift:6 — TooManyMethods — 76 methods, declared across 5 files: podcasts/UpNextViewController.swift (37), podcasts/UpNextViewController+Table.swift (24), podcasts/UpNextViewController+MultiSelectActions.swift (8), podcasts/UpNextViewController+UserEpisode.swift (4), +1 more file(s). The bar is 30 methods; this is 46 over it, 2.53× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: ServerSettings Modules/Sources/PocketCastsServer/Public/ServerSettings.swift:4 — TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Settings podcasts/Settings.swift:10 — TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlayerContainerViewController podcasts/PlayerContainerViewController.swift:4 — TooManyMethods — 70 methods, declared across 6 files: podcasts/PlayerContainerViewController.swift (36), podcasts/PlayerContainerViewController+LargeScreen.swift (18), podcasts/PlayerContainerViewController+Gestures.swift (6), podcasts/PlayerContainerViewController+Update.swift (5), +2 more file(s). The bar is 30 methods; this is 40 over it, 2.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: View podcasts/PCHostingController.swift:118 — TooManyMethods — 66 methods, declared across 46 files: podcasts/SwiftUI+Previews.swift (6), podcasts/Themeable+SwiftUI.swift (5), podcasts/Styles.swift (3), Views/View+Snapshot.swift (2), +42 more file(s). The bar is 30 methods; this is 36 over it, 2.20× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: EpisodeDetailViewController podcasts/Episode/EpisodeDetailViewController.swift:10 — TooManyMethods — 62 methods, declared across 3 files: Episode/EpisodeDetailViewController.swift (42), Episode/EpisodeDetailViewController+Actions.swift (11), Episode/EpisodeDetailViewController+ShowNotes.swift (9). The bar is 30 methods; this is 32 over it, 2.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: ListeningHistoryViewController podcasts/ListeningHistoryViewController.swift:8 — TooManyMethods — 62 methods, declared across 4 files: podcasts/ListeningHistoryViewController.swift (27), podcasts/ListeningHistoryViewController+Table.swift (16), podcasts/ListeningHistoryViewController+MultiSelect.swift (11), podcasts/ListeningHistoryViewController+Swipe.swift (8). The bar is 30 methods; this is 32 over it, 2.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: DownloadsViewController podcasts/DownloadsViewController.swift:8 — TooManyMethods — 59 methods, declared across 4 files: podcasts/DownloadsViewController.swift (22), podcasts/DownloadsViewController+Table.swift (18), podcasts/DownloadsViewController+MultiSelect.swift (11), podcasts/DownloadsViewController+Swipe.swift (8). The bar is 30 methods; this is 29 over it, 1.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: FingerprintTimingManager podcasts/Fingerprint/FingerprintTimingManager.swift:8 — TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UploadedViewController podcasts/UploadedViewController.swift:8 — TooManyMethods — 57 methods, declared across 4 files: podcasts/UploadedViewController.swift (27), podcasts/UploadedViewController+Table.swift (12), podcasts/UploadedViewController.+MultiSelect.swift (10), podcasts/UploadedViewController+Swipe.swift (8). The bar is 30 methods; this is 27 over it, 1.90× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: AppDelegate podcasts/AppDelegate.swift:12 — TooManyMethods — 56 methods, declared across 5 files: podcasts/AppDelegate.swift (28), podcasts/AppDelegate+UrlHandling.swift (12), podcasts/AppDelegate+SiriShortcuts.swift (8), podcasts/AppDelegate+Analytics.swift (5), +1 more file(s). The bar is 30 methods; this is 26 over it, 1.87× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: ApiServerHandler Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler.swift:6 — TooManyMethods — 55 methods, declared across 11 files: API/ApiServerHandler+Account.swift (13), API/ApiServerHandler.swift (12), API/ApiServerHandler+UserFiles.swift (9), API/ApiServerHandler+DeviceAuth.swift (5), +7 more file(s). The bar is 30 methods; this is 25 over it, 1.83× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: PodcastDataManager Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:15 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DiscoverCollectionViewController podcasts/DiscoverCollectionViewController.swift:6 — TooManyMethods — 52 methods, declared across 4 files: podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift (19), podcasts/DiscoverCollectionViewController.swift (19), podcasts/DiscoverCollectionViewController+Search.swift (12), podcasts/DiscoverCollectionViewController+Categories.swift (2). The bar is 30 methods; this is 22 over it, 1.73× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: WatchManager podcasts/Watch Communication/WatchManager.swift:29 — TooManyMethods — 52 methods, declared across 2 files: Watch Communication/WatchManager.swift (47), Watch Communication/WatchManager+Send.swift (5). The bar is 30 methods; this is 22 over it, 1.73× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
  • + 27 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×35
  • Duplicated block (6 lines × 2) Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:730 — Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:730-735 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:758-763 — both copies are in the same file, so extract the 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 (6 lines × 2) Modules/Sources/PocketCastsServer/Private/API Tasks/RetrievePlaylistsTask.swift:14 — Modules/Sources/PocketCastsServer/Private/API Tasks/RetrievePlaylistsTask.swift:14-19 | Modules/Sources/PocketCastsServer/Private/API Tasks/RetrievePodcastsTask.swift:15-20 — 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 `Modules/Sources/PocketCastsServer/Private/API Tasks/RetrievePlaylistsTask.swift:14` 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) Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveRatingsTask.swift:13 — Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveRatingsTask.swift:13-19 | Modules/Sources/PocketCastsServer/Private/API Tasks/SubscriptionStatusTask.swift:9-14 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveRatingsTask.swift:13` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsServer/Private/API Tasks/SubscriptionStatusTask.swift:15` calls `addMessage` and `Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveRatingsTask.swift:20` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) Pocket Casts TV App/Analytics/AnalyticsSetup.swift:36 — Pocket Casts TV App/Analytics/AnalyticsSetup.swift:36-41 | podcasts/AppDelegate+Analytics.swift:73-78 — 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 `Pocket Casts TV App/Analytics/AnalyticsSetup.swift:36` 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, `podcasts/AppDelegate+Analytics.swift:80` calls `addObserver`, `setupAnalytics` and `Pocket Casts TV App/Analytics/AnalyticsSetup.swift:42` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) Pocket Casts TV App/UI/Home/HomeView.swift:56 — Pocket Casts TV App/UI/Home/HomeView.swift:56-61 | Pocket Casts TV App/UI/Search/SearchResultsView.swift:77-82 — 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 `Pocket Casts TV App/UI/Home/HomeView.swift:56` 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) podcasts/AppDelegate+UrlHandling.swift:216 — podcasts/AppDelegate+UrlHandling.swift:216-221 | podcasts/AppDelegate+UrlHandling.swift:235-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/AppDelegate+UrlHandling.swift:216` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) podcasts/CheckboxCell.swift:33 — podcasts/CheckboxCell.swift:33-38 | podcasts/CheckboxSubtitleCell.swift:35-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/CheckboxCell.swift:33` 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, `podcasts/CheckboxCell.swift:29` calls `registerForTraitChanges`, `updateSize` and `podcasts/CheckboxSubtitleCell.swift:34` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) podcasts/DeviceApprove/DeviceApproveView.swift:291 — podcasts/DeviceApprove/DeviceApproveView.swift:291-296 | podcasts/HorizontalCollectionListRowView.swift:130-135 — 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 `podcasts/DeviceApprove/DeviceApproveView.swift:291` 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) podcasts/DownloadsViewController+Table.swift:146 — podcasts/DownloadsViewController+Table.swift:146-151 | podcasts/ListeningHistoryViewController+Table.swift:131-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) podcasts/LargeListSummaryViewController.swift:214 — podcasts/LargeListSummaryViewController.swift:214-219 | podcasts/LargeListSummaryViewController.swift:228-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/LargeListSummaryViewController.swift:214` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) podcasts/MiniPlayerViewController.swift:98 — podcasts/MiniPlayerViewController.swift:98-103 | podcasts/TranscriptSearchAccessoryView.swift:182-187 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/MiniPlayerViewController.swift:98` 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) podcasts/New Creation/New Preview/PlaylistPreviewViewController.swift:182 — podcasts/New Creation/New Preview/PlaylistPreviewViewController.swift:182-187 | podcasts/PodcastFilterOverlayController.swift:162-167 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) podcasts/NotificationsViewController.swift:111 — podcasts/NotificationsViewController.swift:111-116 | podcasts/StorageAndDataUseViewController.swift:6-11 — 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 `podcasts/NotificationsViewController.swift:111` 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) podcasts/PlayerCell.swift:140 — podcasts/PlayerCell.swift:140-145 | podcasts/UpNextNowPlayingCell.swift:108-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Pocket Casts TV App/UI/Playlists/PlaylistDetailView.swift:163 — Pocket Casts TV App/UI/Playlists/PlaylistDetailView.swift:163-168 | Pocket Casts TV App/UI/Playlists/PlaylistDetailView.swift:169-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) podcasts/DownloadsViewController.swift:227 — podcasts/DownloadsViewController.swift:227-232 | podcasts/UploadedViewController.swift:183-188 — 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 `podcasts/DownloadsViewController.swift:227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `podcasts/DownloadsViewController.swift:234` calls `doneTapped`, `dismiss` and `podcasts/UploadedViewController.swift:190` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) podcasts/UploadedSettingsViewController.swift:159 — podcasts/UploadedSettingsViewController.swift:159-164 | podcasts/WatchSettingsViewController.swift:144-149 — 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 `podcasts/UploadedSettingsViewController.swift:159` 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) Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:25 — Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:25-30 | Pocket Casts TV App/UI/Discover/DiscoverSectionModel.swift:31-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Pocket Casts TV App/UI/Discover/DiscoverSectionModel.swift:27` calls `private` and `Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:21` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:32 — Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:32-37 | Pocket Casts TV App/UI/Discover/DiscoverSectionModel.swift:38-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Pocket Casts Watch App/UI/ExtensionDelegate.swift:124 — Pocket Casts Watch App/UI/ExtensionDelegate.swift:124-129 | podcasts/Analytics/Adapters/Crash Logging/CrashLoggingDataProvider.swift:9-15 — 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 (6 lines × 2) Pocket Casts Watch App/UI/WatchSyncManager.swift:72 — Pocket Casts Watch App/UI/WatchSyncManager.swift:72-77 | podcasts/AppDelegate+Defaults.swift:150-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) podcasts/Cancel Subscription/Cancel Subscription/Plans View/CancelSubscriptionPlansViewModel.swift:36 — podcasts/Cancel Subscription/Cancel Subscription/Plans View/CancelSubscriptionPlansViewModel.swift:36-41 | podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:29-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) podcasts/Common SwiftUI/BookmarksLockedStateView.swift:51 — podcasts/Common SwiftUI/BookmarksLockedStateView.swift:51-56 | podcasts/Whats New/SlumberViews.swift:129-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:198 — podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:198-203 | podcasts/ExpandedEpisodeListViewController.swift:101-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) podcasts/Folders/FolderViewController+Edit.swift:114 — podcasts/Folders/FolderViewController+Edit.swift:114-119 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Edit.swift:102-107 — 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.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×31
  • Duplicated block (7 lines × 2) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:69 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:69-77 | Modules/Sources/PocketCastsServer/Public/API/ValidatePromoCodeHandler.swift:15-21 — 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 `Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (_ success: Bool, _ userId: String?, _ error: APIError?) -> Void` in one and `@escaping (Bool, String?, APIError?) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) Modules/Sources/PocketCastsServer/Public/Headers/EpisodeHeader.swift:26 — Modules/Sources/PocketCastsServer/Public/Headers/EpisodeHeader.swift:26-32 | Modules/Sources/PocketCastsServer/Public/Headers/PodcastHeader.swift:11-17 — 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 `Modules/Sources/PocketCastsServer/Public/Headers/EpisodeHeader.swift:26` 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) podcasts/ChangeEmailViewController.swift:170 — podcasts/ChangeEmailViewController.swift:170-176 | podcasts/Syncing/SyncSigninViewController.swift:144-150 — 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 (7 lines × 2) podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:233 — podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:233-240 | podcasts/Podcasts/Podcast Page/PodcastViewController+Options.swift:86-92 — 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 `podcasts/Common Components/MultiSelect/MultiSelectHelper.swift: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 (7 lines × 2) podcasts/End of Year/Stories/2025/NumberListened2025.swift:70 — podcasts/End of Year/Stories/2025/NumberListened2025.swift:70-76 | podcasts/End of Year/Stories/2025/TopSpotStory2025.swift:87-93 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) podcasts/MiniPlayerViewController.swift:468 — podcasts/MiniPlayerViewController.swift:468-474 | podcasts/MiniPlayerViewController.swift:485-491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) podcasts/Onboarding/Plus/UpgradeCard.swift:117 — podcasts/Onboarding/Plus/UpgradeCard.swift:117-123 | podcasts/Onboarding/Plus/UpgradeLandingView.swift:138-144 — 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 `podcasts/Onboarding/Plus/UpgradeCard.swift:117` 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) podcasts/PlayerContainerViewController+LargeScreen.swift:455 — podcasts/PlayerContainerViewController+LargeScreen.swift:455-461 | podcasts/PlayerContainerViewController+Update.swift:112-119 — 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 `podcasts/PlayerContainerViewController+LargeScreen.swift:455` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) podcasts/PodcastImageView.swift:74 — podcasts/PodcastImageView.swift:74-80 | podcasts/PodcastImageView.swift:90-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1176 — podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1176-1182 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1200-1206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) Modules/Sources/PocketCastsDataModel/Public/Model/Episode+Encoding.swift:44 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode+Encoding.swift:44-50 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode+Encoding.swift:39-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) podcasts/New Search/Views/Results/PredictiveList.swift:41 — podcasts/New Search/Views/Results/PredictiveList.swift:41-47 | podcasts/New Search/Views/Results/SearchResultsView.swift:196-202 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `podcasts/New Search/Views/Results/PredictiveList.swift:48` calls `ForEach`, `predictiveRow` and `podcasts/New Search/Views/Results/SearchResultsView.swift:203` 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 (7 lines × 2) podcasts/LargeListSummaryViewController.swift:168 — podcasts/LargeListSummaryViewController.swift:168-174 | podcasts/SmallPagedListSummaryViewController.swift:145-151 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:89 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:89-95 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift:82-88 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift` and `Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 39 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 (7 lines × 2) Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:159 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:159-165 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift:130-136 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift` and `Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 39 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 (7 lines × 2) Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift:52 — Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift:52-58 | podcasts/SimpleNotificationsViewController.swift:6-12 — before extracting anything, compare `Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift` and `podcasts/SimpleNotificationsViewController.swift` as WHOLE FILES: 87% 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 3 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.
  • Duplicated block (7 lines × 2) podcasts/Common Components/FullSyncRefreshController.swift:64 — podcasts/Common Components/FullSyncRefreshController.swift:64-70 | podcasts/Common Components/UploadedFilesRefreshController.swift:46-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) podcasts/CustomStepper.swift:151 — podcasts/CustomStepper.swift:151-157 | podcasts/CustomTimeStepper.swift:151-157 — before extracting anything, compare `podcasts/CustomStepper.swift` and `podcasts/CustomTimeStepper.swift` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (7 lines × 2) podcasts/CustomStepper.swift:163 — podcasts/CustomStepper.swift:163-169 | podcasts/CustomTimeStepper.swift:163-169 — before extracting anything, compare `podcasts/CustomStepper.swift` and `podcasts/CustomTimeStepper.swift` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (7 lines × 2) podcasts/DiscoverCollectionHeader.swift:60 — podcasts/DiscoverCollectionHeader.swift:60-66 | podcasts/EpisodeListHeaderView.swift:26-32 — 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 `podcasts/DiscoverCollectionHeader.swift:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) podcasts/DownloadSettingsViewController.swift:42 — podcasts/DownloadSettingsViewController.swift:42-48 | podcasts/StorageAndDataUseViewController.swift:38-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) podcasts/Folders/FolderViewController+Edit.swift:22 — podcasts/Folders/FolderViewController+Edit.swift:22-28 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Edit.swift:22-28 — 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) podcasts/Theme/Themable Views/ThemeableCell.swift:54 — podcasts/Theme/Themable Views/ThemeableCell.swift:54-60 | podcasts/Theme/Themable Views/ThemeableSwipeCell.swift:44-50 — before extracting anything, compare `podcasts/Theme/Themable Views/ThemeableCell.swift` and `podcasts/Theme/Themable Views/ThemeableSwipeCell.swift` 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 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.
  • Duplicated block (7 lines × 2) podcasts/UploadedSettingsViewController.swift:35 — podcasts/UploadedSettingsViewController.swift:35-41 | podcasts/WatchSettingsViewController.swift:39-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `podcasts/WatchSettingsViewController.swift:36` calls `track` and `podcasts/UploadedSettingsViewController.swift:32` 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 (7 lines × 2) podcasts/UploadedSettingsViewController.swift:192 — podcasts/UploadedSettingsViewController.swift:192-198 | podcasts/WatchSettingsViewController.swift:175-181 — 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.
  • + 6 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×28
  • Hotspot: podcasts/PlaybackManager.swift podcasts/PlaybackManager.swift:2015 — podcasts/PlaybackManager.swift changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in PlaybackManager.setupRemoteControlSupport at line 2015. 3 of those changes were fix/bug commits, and the other 26 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/PlaybackManager.swift`: 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: podcasts/Podcasts/Podcast Page/PodcastViewController.swift podcasts/Podcasts/Podcast Page/PodcastViewController.swift:643 — podcasts/Podcasts/Podcast Page/PodcastViewController.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in PodcastViewController.loadLocalEpisodes at line 643. 1 of those changes was a fix/bug commit, and the other 25 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/Podcasts/Podcast Page/PodcastViewController.swift`: 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: Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:36 — Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in ServerPodcastManager.update at line 36. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift`: 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: podcasts/Main/NavigationManager.swift podcasts/Main/NavigationManager.swift:121 — podcasts/Main/NavigationManager.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in NavigationManager.performNavigation at line 121. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/Main/NavigationManager.swift`: 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: podcasts/AppDelegate+UrlHandling.swift podcasts/AppDelegate+UrlHandling.swift:72 — podcasts/AppDelegate+UrlHandling.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in AppDelegate.setupRoutes at line 72. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/AppDelegate+UrlHandling.swift`: 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: Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:31 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 134 in DatabaseHelper.upgradeIfRequired at line 31. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift`: 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: podcasts/DefaultPlayer.swift podcasts/DefaultPlayer.swift:826 — podcasts/DefaultPlayer.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in DefaultPlayer.configurePlayer at line 826. 2 of those changes were fix/bug commits, and the other 14 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/DefaultPlayer.swift`: 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: podcasts/AudioReadTask.swift podcasts/AudioReadTask.swift:189 — podcasts/AudioReadTask.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in AudioReadTask.readFromFile at line 189. 1 of those changes was a fix/bug commit, 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/AudioReadTask.swift`: 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: podcasts/PlayerContainerViewController+LargeScreen.swift podcasts/PlayerContainerViewController+LargeScreen.swift:210 — podcasts/PlayerContainerViewController+LargeScreen.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in PlayerContainerViewController.updateLargeScreenTabs at line 210. 2 of those changes were fix/bug commits, and the other 12 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/PlayerContainerViewController+LargeScreen.swift`: 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: podcasts/DownloadManager.swift podcasts/DownloadManager.swift:329 — podcasts/DownloadManager.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in DownloadManager.downloadParallelToStream at line 329. 1 of those changes was a fix/bug commit, 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/DownloadManager.swift`: 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: podcasts/Episode Cells/EpisodeCell.swift podcasts/Episode Cells/EpisodeCell.swift:242 — podcasts/Episode Cells/EpisodeCell.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in EpisodeCell.populate at line 242. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/Episode Cells/EpisodeCell.swift`: 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: podcasts/AppDelegate+SiriShortcuts.swift podcasts/AppDelegate+SiriShortcuts.swift:132 — podcasts/AppDelegate+SiriShortcuts.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in AppDelegate.handlePlayMediaIntent at line 132. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/AppDelegate+SiriShortcuts.swift`: 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: podcasts/NowPlayingPlayerItemViewController+Shelf.swift podcasts/NowPlayingPlayerItemViewController+Shelf.swift:55 — podcasts/NowPlayingPlayerItemViewController+Shelf.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in NowPlayingPlayerItemViewController.loadActionIntoShelf at line 55. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/NowPlayingPlayerItemViewController+Shelf.swift`: 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: podcasts/GeneralSettingsViewController.swift podcasts/GeneralSettingsViewController.swift:91 — podcasts/GeneralSettingsViewController.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in GeneralSettingsViewController.tableView at line 91. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/GeneralSettingsViewController.swift`: 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: podcasts/MiniPlayerToFullPlayerAnimator.swift podcasts/MiniPlayerToFullPlayerAnimator.swift:62 — podcasts/MiniPlayerToFullPlayerAnimator.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in MiniPlayerToFullPlayerAnimator.animateTransition at line 62. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/MiniPlayerToFullPlayerAnimator.swift`: 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: Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift:270 — Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in SyncTask.importPlaylist at line 270. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift`: 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: podcasts/Watch Communication/WatchManager.swift podcasts/Watch Communication/WatchManager.swift:583 — podcasts/Watch Communication/WatchManager.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in WatchManager.sendStateToWatch at line 583. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/Watch Communication/WatchManager.swift`: 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: Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:888 — Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in PlaylistQueryBuilder.queryFor at line 888. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift`: 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: Pocket Casts TV App/UI/Search/SearchViewModel.swift Pocket Casts TV App/UI/Search/SearchViewModel.swift:182 — Pocket Casts TV App/UI/Search/SearchViewModel.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in SearchViewModel.search at line 182. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- Pocket Casts TV App/UI/Search/SearchViewModel.swift`: 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: podcasts/Utilities/NotificationsHelper.swift podcasts/Utilities/NotificationsHelper.swift:140 — podcasts/Utilities/NotificationsHelper.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in NotificationsHelper.handleEpisodeNotification at line 140. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/Utilities/NotificationsHelper.swift`: 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: podcasts/Common Components/MainEpisodeActionView.swift podcasts/Common Components/MainEpisodeActionView.swift:96 — podcasts/Common Components/MainEpisodeActionView.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in MainEpisodeActionView.populateFrom at line 96. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/Common Components/MainEpisodeActionView.swift`: 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: podcasts/SupporterContributionsViewController.swift podcasts/SupporterContributionsViewController.swift:47 — podcasts/SupporterContributionsViewController.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in SupporterContributionsViewController.tableView at line 47. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/SupporterContributionsViewController.swift`: 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: podcasts/HomeGridDataHelper.swift podcasts/HomeGridDataHelper.swift:16 — podcasts/HomeGridDataHelper.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in HomeGridDataHelper.gridListItems at line 16. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/HomeGridDataHelper.swift`: 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: podcasts/New Search/Views/Results/SearchResultCell.swift podcasts/New Search/Views/Results/SearchResultCell.swift:153 — podcasts/New Search/Views/Results/SearchResultCell.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in SearchResultCell.rowContent at line 153. 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:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/New Search/Views/Results/SearchResultCell.swift`: 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: podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift:32 — podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in PodcastSettingsViewController.tableView at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 12:11:45 +00:00' --until='2026-11-13 12:11:45 +00:00' --full-history --no-merges -- podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift`: 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.
  • + 3 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×27
  • TodoComment podcasts/AddCustomViewController.swift:238 — // TODO: update error meessage — 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 podcasts/AppTheme.swift:506 — // TODO: there probably is a more elegant way to do this... — 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 podcasts/DownloadManager+URLSessionDelegate.swift:25 — //TODO: Check this and see whether anything should be done — 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 podcasts/EffectsPlayer.swift:481 — // TODO: needs to be implemented here — 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 podcasts/NowPlayingPlayerItemViewController.swift:711 — //TODO: Prompt to install app — 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 podcasts/PlayerContainerViewController.swift:256 — //TODO: Show install banner — 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 podcasts/PlayerContainerViewController.swift:301 — //TODO: Show install banner — 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 podcasts/PlayerContainerViewController.swift:365 — //TODO: Show install banner — 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 podcasts/PlaylistsViewController+Table.swift:238 — //TODO: Add analytics — 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 podcasts/UploadedViewController.swift:168 — // TODO: a table diff might be more efficient here (and have nicer animations) — 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 podcasts/UserEpisodeDetailViewController.swift:107 — // TODO: consider making this optional — 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 podcasts/UserEpisodeManager.swift:216 — // TODO: handle failure to remove image — 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 podcasts/Utilities/SwiftUI/HolographicEffect.swift:7 — // TODO: Modernization - UIScreen.main assumes one display. Have callers pass parentSize from the window — 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 podcasts/Podcasts/Share Podcast List/IncomingShareListViewController.swift:157 — // TODO: — 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 podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1335 — //TODO: Add analytics based on source — 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 podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift:340 — // TODO: Add analytics — 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 podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift:349 — // TODO: Add analytics — 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 podcasts/Folders/FolderViewController.swift:249 — // TODO: change this to be diff based and see if we can use the new iOS diffable stuff — 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 podcasts/End of Year/Stories/2025/YearOverYearCompare2025Story.swift:61 — // TODO: This part, images and text, need to be updated — 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 podcasts/Common Components/TopShadowView.swift:15 — // TODO: fix for theme — 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 PodcastsIntents/ChapterIntentHandler.swift:9 — // TODO: we should really open the app to the episode screen — 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 Pocket Casts TV App/Data/TVDataManager.swift:25 — //TODO: trigger refresh here? — 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 Modules/Sources/PocketCastsServer/Public/Upload/UploadManager+URLSessionDelegate.swift:75 — // TODO: allow image upload — 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 Modules/Sources/PocketCastsServer/Public/Upload/UploadManager.swift:226 — // TODO: handle this failure — 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 Modules/Sources/PocketCastsServer/Private/ServerNotificationsHelper.swift:19 — // TODO: this is the same notification as above, since it's what the app expects, but in future should we make it its own thing? — 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.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×27
  • Edited copy of a member (4 corresponding lines) podcasts/Onboarding/Plus/UpgradeTier.swift:31 — podcasts/Onboarding/Plus/UpgradeTier.swift:31-34 | podcasts/Onboarding/Plus/UpgradeTier.swift:36-39 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/ServerPodcastManager+Subscription.swift:7 — podcasts/ServerPodcastManager+Subscription.swift:7-10 | podcasts/ServerPodcastManager+Subscription.swift:12-15 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/SharingHelper.swift:63 — podcasts/SharingHelper.swift:63-66 | podcasts/SharingHelper.swift:68-71 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/Lists/EpisodeTableHelper.swift:7 — podcasts/Lists/EpisodeTableHelper.swift:7-10 | podcasts/Lists/EpisodeTableHelper.swift:12-15 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:647 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:647-650 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:275-278 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:64 — Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:64-67 | Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:74-77 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/NowPlayingPlayerItemViewController+Update.swift:179 — podcasts/NowPlayingPlayerItemViewController+Update.swift:179-182 | podcasts/VideoViewController.swift:373-376 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:807 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:807-810 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:226-229 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/End of Year/Stories/2025/Ratings2025Story.swift:257 — podcasts/End of Year/Stories/2025/Ratings2025Story.swift:257-260 | podcasts/End of Year/Stories/2025/YearOverYearCompare2025Story.swift:183-186 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:564 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:564-567 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:301-304 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Modules/Sources/PocketCastsServer/Public/ServerSettings.swift:131 — Modules/Sources/PocketCastsServer/Public/ServerSettings.swift:131-134 | Modules/Sources/PocketCastsServer/Public/SubscriptionHelper.swift:147-150 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/Podcasts/Share Podcast List/Collection View Cells/SelectPodcastCell.swift:26 — podcasts/Podcasts/Share Podcast List/Collection View Cells/SelectPodcastCell.swift:26-30 | podcasts/Podcasts/Share Podcast List/Collection View Cells/SelectedPodcastCell.swift:23-26 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/Podcasts/Share Podcast List/SharePodcastsViewController.swift:22 — podcasts/Podcasts/Share Podcast List/SharePodcastsViewController.swift:22-25 | podcasts/Podcasts/Share Podcast List/SharePublishViewController.swift:56-59 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Pocket Casts TV App/UI/Discover/DiscoverEpisodeCell.swift:105 — Pocket Casts TV App/UI/Discover/DiscoverEpisodeCell.swift:105-108 | Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodeCell.swift:126-129 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/Common Components/Podcast Selection/PodcastChooserCell.swift:29 — podcasts/Common Components/Podcast Selection/PodcastChooserCell.swift:29-32 | podcasts/PodcastFilterSelectionCell.swift:56-59 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Pocket Casts TV App/UI/Playlists/PlaylistDetailsViewModel.swift:176 — Pocket Casts TV App/UI/Playlists/PlaylistDetailsViewModel.swift:176-179 | podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel+PlayAll.swift:36-39 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/Bookmarks/List/BookmarksListView.swift:245 — podcasts/Bookmarks/List/BookmarksListView.swift:245-248 | podcasts/Bookmarks/Player/BookmarksPlayerTab.swift:16-19 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController.swift:68 — podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController.swift:68-71 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:85-88 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/New Detail/PlaylistDetailViewController+MultiSelect.swift:43 — podcasts/New Detail/PlaylistDetailViewController+MultiSelect.swift:43-46 | podcasts/Podcasts/Podcast Page/PodcastViewController+MultiSelect.swift:44-47 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Pocket Casts TV App/UI/Auth/SigningInViewModel.swift:43 — Pocket Casts TV App/UI/Auth/SigningInViewModel.swift:43-46 | Pocket Casts TV App/UI/UpNext/UpNextViewModel.swift:21-25 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:83 — Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:83-86 | Pocket Casts TV App/UI/Discover/DiscoverSectionModel.swift:97-100 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/Episode Cells/EpisodeCell.swift:74 — podcasts/Episode Cells/EpisodeCell.swift:74-77 | podcasts/PlayerCell.swift:52-55 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/NewEmailViewController.swift:146 — podcasts/NewEmailViewController.swift:146-149 | podcasts/Syncing/SyncSigninViewController.swift:260-263 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/CheckboxSubtitleCell.swift:6 — podcasts/CheckboxSubtitleCell.swift:6-9 | podcasts/UpNextNowPlayingCell.swift:45-49 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) podcasts/Episode/EpisodeDetailViewController.swift:26 — podcasts/Episode/EpisodeDetailViewController.swift:26-29 | podcasts/ShowNotesPlayerItemViewController.swift:12-16 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×27
  • Edited copy of a member (5 corresponding lines) podcasts/Common Components/SettingsTableHeader.swift:11 — podcasts/Common Components/SettingsTableHeader.swift:11-15 | podcasts/Common Components/SettingsTableHeader.swift:17-21 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:169 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:169-177 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift:138-142 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/Bookmarks/Editing/BookmarkEditTitleView.swift:269 — podcasts/Bookmarks/Editing/BookmarkEditTitleView.swift:269-273 | podcasts/Bookmarks/Editing/BookmarkEditView.swift:449-455 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/DownloadSettingsViewController.swift:232 — podcasts/DownloadSettingsViewController.swift:232-237 | podcasts/NotificationsViewController.swift:257-261 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Pocket Casts TV App/UI/Podcasts/EpisodeRow.swift:407 — Pocket Casts TV App/UI/Podcasts/EpisodeRow.swift:407-412 | Pocket Casts TV App/UI/Player/NowPlayingRow.swift:75-79 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/AccountUpdatedViewController.swift:98 — podcasts/AccountUpdatedViewController.swift:98-102 | podcasts/AccountViewController.swift:157-162 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/NowPlayingPlayerItemViewController+Update.swift:297 — podcasts/NowPlayingPlayerItemViewController+Update.swift:297-305 | podcasts/VideoViewController.swift:316-320 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Modules/Sources/PocketCastsAnalytics/Analytics.swift:80 — Modules/Sources/PocketCastsAnalytics/Analytics.swift:80-85 | podcasts/New Detail/PlaylistDetailViewController+Analytics.swift:12-16 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/Common Components/Progress Views/ProgressLineLayer.swift:134 — podcasts/Common Components/Progress Views/ProgressLineLayer.swift:134-138 | podcasts/TimeSliderLayer.swift:139-147 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/Common Components/MultiSelect/MultiSelectActionCell.swift:42 — podcasts/Common Components/MultiSelect/MultiSelectActionCell.swift:42-47 | podcasts/DescriptiveActionView.swift:178-182 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/Episode/EpisodeDetailViewController.swift:71 — podcasts/Episode/EpisodeDetailViewController.swift:71-76 | podcasts/Podcasts/Podcast Page/EpisodeListSearchController.swift:124-128 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/End of Year/Stories/2025/StoryFooter2025.swift:9 — podcasts/End of Year/Stories/2025/StoryFooter2025.swift:9-13 | podcasts/End of Year/Stories/2025/StoryHeader2025.swift:15-20 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/NewPlaylistCellView.swift:82 — podcasts/NewPlaylistCellView.swift:82-87 | podcasts/PlaylistCellView.swift:109-113 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/PlaylistShortcutsViewController.swift:218 — podcasts/PlaylistShortcutsViewController.swift:218-223 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+VoiceShortcuts.swift:21-25 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController.swift:33 — podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController.swift:33-37 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:50-55 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/BundleImageView.swift:4 — podcasts/BundleImageView.swift:4-9 | podcasts/PodcastImageView.swift:22-26 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Pocket Casts TV App/UI/AppCoordinator.swift:162 — Pocket Casts TV App/UI/AppCoordinator.swift:162-166 | podcasts/BackgroundSignOutListener.swift:42-46 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/AccountViewController+TableView.swift:165 — podcasts/AccountViewController+TableView.swift:165-172 | podcasts/AppearanceViewController.swift:234-238 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/LargeListSummaryViewController.swift:256 — podcasts/LargeListSummaryViewController.swift:256-260 | podcasts/SmallPagedListSummaryViewController.swift:296-300 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/Syncing/ForgotPasswordViewController.swift:24 — podcasts/Syncing/ForgotPasswordViewController.swift:24-28 | podcasts/Syncing/SyncSigninViewController.swift:12-16 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/Common Components/FullSyncRefreshController.swift:35 — podcasts/Common Components/FullSyncRefreshController.swift:35-39 | podcasts/Common Components/UploadedFilesRefreshController.swift:32-36 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/New Detail/PlaylistDetailViewController+TableView.swift:296 — podcasts/New Detail/PlaylistDetailViewController+TableView.swift:296-302 | podcasts/Utilities/EmptyStateCell.swift:6-10 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/Podcasts/All Podcasts/FolderPreviewViewController.swift:7 — podcasts/Podcasts/All Podcasts/FolderPreviewViewController.swift:7-11 | podcasts/Podcasts/All Podcasts/PodcastPreviewViewController.swift:6-10 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:79 — podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:79-83 | podcasts/NetworkNavigator.swift:93-97 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) podcasts/DiscoverFeaturedView.swift:36 — podcasts/DiscoverFeaturedView.swift:36-41 | podcasts/PodcastFilterSelectionCell.swift:32-36 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×24
  • Edited copy of a member (9 corresponding lines) podcasts/Folders/FolderViewController+ContextMenu.swift:93 — podcasts/Folders/FolderViewController+ContextMenu.swift:93-101 | podcasts/Podcasts/All Podcasts/PodcastListViewController+ContextMenu.swift:108-116 — 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) Modules/Sources/PocketCastsUtils/Extensions/UI/PagedUIScrollView.swift:96 — Modules/Sources/PocketCastsUtils/Extensions/UI/PagedUIScrollView.swift:96-105 | Modules/Sources/PocketCastsUtils/Extensions/UI/PagedUIScrollView.swift:107-115 — 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) Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:206 — Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:206-214 | Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:216-225 — 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) podcasts/ExpandedCollectionViewController.swift:206 — podcasts/ExpandedCollectionViewController.swift:206-216 | podcasts/ExpandedEpisodeListViewController.swift:109-117 — 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) podcasts/EpisodeManager.swift:121 — podcasts/EpisodeManager.swift:121-133 | podcasts/EpisodeManager.swift:185-193 — 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) podcasts/Onboarding/OnboardingFlow.swift:114 — podcasts/Onboarding/OnboardingFlow.swift:114-128 | podcasts/Onboarding/Plus/NewUpgrade/UpgradeAccountViewModel.swift:180-188 — 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) podcasts/EpisodesDataManager.swift:163 — podcasts/EpisodesDataManager.swift:163-171 | podcasts/EpisodesDataManager.swift:173-181 — 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) podcasts/Folders/FolderViewController+Edit.swift:94 — podcasts/Folders/FolderViewController+Edit.swift:94-102 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Edit.swift:82-90 — 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) Modules/Sources/PocketCastsUtils/Extensions/UI/UIColorExtension.swift:52 — Modules/Sources/PocketCastsUtils/Extensions/UI/UIColorExtension.swift:52-60 | Modules/Sources/PocketCastsUtils/Extensions/UI/UIColorExtension.swift:62-70 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/DataHelper.swift:13 — Modules/Sources/PocketCastsDataModel/Private/Managers/DataHelper.swift:13-21 | Modules/Sources/PocketCastsDataModel/Public/Bookmarks/BookmarkDataManager.swift:235-246 — 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) podcasts/BadgeSettingsViewController.swift:43 — podcasts/BadgeSettingsViewController.swift:43-52 | podcasts/StorageAndDataUseViewController.swift:54-62 — 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) podcasts/PlaybackActionHelper.swift:39 — podcasts/PlaybackActionHelper.swift:39-49 | podcasts/PlaybackActionHelper.swift:57-65 — 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) podcasts/Podcasts/Share Podcast List/SharePublishViewController.swift:303 — podcasts/Podcasts/Share Podcast List/SharePublishViewController.swift:303-311 | podcasts/Podcasts/Share Podcast List/SharePublishViewController.swift:323-331 — 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) Modules/Sources/PocketCastsUtils/Formatting/TimeFormatter.swift:90 — Modules/Sources/PocketCastsUtils/Formatting/TimeFormatter.swift:90-98 | Modules/Sources/PocketCastsUtils/Formatting/TimeFormatter.swift:100-108 — 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) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController+Table.swift:171 — podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController+Table.swift:171-179 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController+Table.swift:181-189 — 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) Pocket Casts TV App/UI/Discover/TVDiscoverRowSection.swift:169 — Pocket Casts TV App/UI/Discover/TVDiscoverRowSection.swift:169-177 | Pocket Casts TV App/UI/Discover/TVDiscoverRowSection.swift:180-188 — 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) podcasts/New Detail/PlaylistDetailViewController+MultiSelect.swift:26 — podcasts/New Detail/PlaylistDetailViewController+MultiSelect.swift:26-35 | podcasts/UploadedViewController.+MultiSelect.swift:25-33 — 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) podcasts/LargeListSummaryViewController.swift:264 — podcasts/LargeListSummaryViewController.swift:264-272 | podcasts/SmallPagedListSummaryViewController.swift:282-290 — 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) podcasts/ExpandedCollectionViewController.swift:24 — podcasts/ExpandedCollectionViewController.swift:24-32 | podcasts/LargeListSummaryViewController.swift:73-81 — 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) podcasts/Fingerprint/FingerprintDebugOverlay.swift:97 — podcasts/Fingerprint/FingerprintDebugOverlay.swift:97-105 | podcasts/Fingerprint/FingerprintTimingManager.swift:19-27 — 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) podcasts/AccountViewController+TableView.swift:35 — podcasts/AccountViewController+TableView.swift:35-43 | podcasts/ProfileViewController.swift:432-440 — 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) podcasts/PlaylistShortcutsViewController.swift:58 — podcasts/PlaylistShortcutsViewController.swift:58-66 | podcasts/SiriSettingsViewController.swift:54-64 — 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) podcasts/NowPlayingPlayerItemViewController.swift:927 — podcasts/NowPlayingPlayerItemViewController.swift:927-936 | podcasts/Podcasts/Podcast Page/BookmarkListController.swift:294-302 — 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) Pocket Casts TV App/UI/Common/ProfileImage.swift:51 — Pocket Casts TV App/UI/Common/ProfileImage.swift:51-59 | podcasts/Profile - SwiftUI/Common Views/ProfileImage.swift:52-62 — 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 (9 lines × 2) · ×24
  • Duplicated block (9 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:217 — Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:217-225 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:261-269 — both copies are in the same file, so extract the 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, `Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:258` calls `saveOrdering`, `cacheEpisodes` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:214` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) Modules/Sources/PocketCastsDataModel/Public/Model/Episode+fromDictionary.swift:67 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode+fromDictionary.swift:67-75 | Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:196-204 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) Modules/Sources/PocketCastsServer/Private/API Tasks/ApiBaseTask.swift:56 — Modules/Sources/PocketCastsServer/Private/API Tasks/ApiBaseTask.swift:56-64 | Modules/Sources/PocketCastsServer/Private/API Tasks/ApiBaseTask.swift:122-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsServer/Private/API Tasks/ApiBaseTask.swift:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `Data` in one and `Data) -> (Data?` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFileRequestTask.swift:28 — Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFileRequestTask.swift:28-36 | Modules/Sources/PocketCastsServer/Private/API Tasks/UploadImageRequestTask.swift:41-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFileRequestTask.swift:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) Pocket Casts TV App/UI/History/ListeningHistoryView.swift:27 — Pocket Casts TV App/UI/History/ListeningHistoryView.swift:27-35 | Pocket Casts TV App/UI/Starred/StarredEpisodesView.swift:27-35 — 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 `Pocket Casts TV App/UI/History/ListeningHistoryView.swift:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) Pocket Casts TV App/UI/Home/HomeViewModel.swift:79 — Pocket Casts TV App/UI/Home/HomeViewModel.swift:79-87 | Pocket Casts TV App/UI/Podcasts/PodcastsViewModel.swift:60-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts TV App/UI/Home/HomeViewModel.swift:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) podcasts/AutoArchiveViewController.swift:77 — podcasts/AutoArchiveViewController.swift:77-85 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastArchiveViewController+Table.swift:69-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) podcasts/BundlePodcastCell.swift:79 — podcasts/BundlePodcastCell.swift:79-87 | podcasts/DiscoverPodcastTableCell.swift:112-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:45 — podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:45-53 | podcasts/Referrals/ReferralsClaimPass.swift:42-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) podcasts/Categories/CategoriesSelectorView.swift:209 — podcasts/Categories/CategoriesSelectorView.swift:209-217 | podcasts/Categories/CategoriesSelectorView.swift:221-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Categories/CategoriesSelectorView.swift:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) podcasts/DownloadManager.swift:350 — podcasts/DownloadManager.swift:350-358 | podcasts/DownloadManager.swift:408-416 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) podcasts/New Search/Views/Results/LocalSearchEpisodeResultsView.swift:73 — podcasts/New Search/Views/Results/LocalSearchEpisodeResultsView.swift:73-81 | podcasts/New Search/Views/Results/LocalSearchPodcastResultsView.swift:99-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/New Search/Views/Results/LocalSearchEpisodeResultsView.swift:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) podcasts/PlayerCell.swift:177 — podcasts/PlayerCell.swift:177-185 | podcasts/UpNextNowPlayingCell.swift:243-251 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) podcasts/PlaylistShortcutsViewController.swift:114 — podcasts/PlaylistShortcutsViewController.swift:114-122 | podcasts/SiriSettingsViewController.swift:112-120 — 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 `podcasts/PlaylistShortcutsViewController.swift:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) podcasts/Podcasts/All Podcasts/Cells/FolderListCell.swift:79 — podcasts/Podcasts/All Podcasts/Cells/FolderListCell.swift:79-87 | podcasts/Podcasts/All Podcasts/Cells/PodcastListCell.swift:95-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) podcasts/MultipleActionView.swift:42 — podcasts/MultipleActionView.swift:42-50 | podcasts/SimpleActionView.swift:79-87 — 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 `podcasts/MultipleActionView.swift:42` 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, `podcasts/MultipleActionView.swift:51` calls `constraint` and `podcasts/SimpleActionView.swift:88` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:797 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:797-805 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:291-299 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `episode` to `Episode` in one and `UserEpisode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:834 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:834-842 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:205-213 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `episode` to `Episode` in one and `UserEpisode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:813 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:813-821 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:216-224 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `episode` to `Episode` in one and `UserEpisode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:73 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:73-81 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift:66-74 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift` and `Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift:60 — Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift:60-68 | podcasts/SimpleNotificationsViewController.swift:14-22 — before extracting anything, compare `Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift` and `podcasts/SimpleNotificationsViewController.swift` as WHOLE FILES: 87% 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 3 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.
  • Duplicated block (9 lines × 2) podcasts/PlayerCell.swift:187 — podcasts/PlayerCell.swift:187-195 | podcasts/UpNextNowPlayingCell.swift:253-261 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) podcasts/ChangeEmailViewController.swift:264 — podcasts/ChangeEmailViewController.swift:264-272 | podcasts/NewEmailViewController.swift:284-292 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) podcasts/End of Year/Stories/Views/PodcastCover.swift:81 — podcasts/End of Year/Stories/Views/PodcastCover.swift:81-89 | podcasts/End of Year/Stories/Views/PodcastCover.swift:94-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.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×23
  • Edited copy of a member (11 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1056 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1056-1067 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:475-485 — 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) Modules/Sources/PocketCastsServer/Public/ServerHelper.swift:51 — Modules/Sources/PocketCastsServer/Public/ServerHelper.swift:51-61 | Modules/Sources/PocketCastsServer/Public/ServerHelper.swift:63-80 — 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) podcasts/AppearanceViewController.swift:18 — podcasts/AppearanceViewController.swift:18-29 | podcasts/DownloadedFilesViewController.swift:21-31 — 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) podcasts/NowPlayingPlayerItemViewController+Shelf.swift:493 — podcasts/NowPlayingPlayerItemViewController+Shelf.swift:493-503 | podcasts/NowPlayingPlayerItemViewController+Shelf.swift:512-523 — 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) podcasts/CarPlay/CarPlaySceneDelegate+Interaction.swift:141 — podcasts/CarPlay/CarPlaySceneDelegate+Interaction.swift:141-151 | podcasts/CarPlay/CarPlaySceneDelegate+Interaction.swift:153-168 — 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) podcasts/Folders/FolderViewController.swift:185 — podcasts/Folders/FolderViewController.swift:185-197 | podcasts/Podcasts/All Podcasts/PodcastListViewController+ContextMenu.swift:132-142 — 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) podcasts/Podcasts/Share Podcast List/IncomingShareListViewController.swift:78 — podcasts/Podcasts/Share Podcast List/IncomingShareListViewController.swift:78-94 | podcasts/SupporterPodcastViewController.swift:463-473 — 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) podcasts/New Detail/PlaylistDetailViewController+Search.swift:4 — podcasts/New Detail/PlaylistDetailViewController+Search.swift:4-20 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:910-920 — 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) podcasts/Podcasts/All Podcasts/PodcastListViewController+ContextMenu.swift:118 — podcasts/Podcasts/All Podcasts/PodcastListViewController+ContextMenu.swift:118-130 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1272-1282 — 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) Modules/Sources/PocketCastsUtils/Extensions/UI/UIViewExtension.swift:5 — Modules/Sources/PocketCastsUtils/Extensions/UI/UIViewExtension.swift:5-15 | Modules/Sources/PocketCastsUtils/Extensions/UI/UIViewExtension.swift:17-27 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:149 — Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:149-159 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:264-275 — 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) podcasts/MultipleActionView.swift:12 — podcasts/MultipleActionView.swift:12-23 | podcasts/SimpleActionView.swift:19-29 — 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) WidgetExtension/Now Playing/NowPlayingEntryView.swift:134 — WidgetExtension/Now Playing/NowPlayingEntryView.swift:134-144 | WidgetExtension/Now Playing/NowPlayingEntryView.swift:146-156 — 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) podcasts/Onboarding/Plus/UpgradeExperiment/PlusPaywallContainer.swift:14 — podcasts/Onboarding/Plus/UpgradeExperiment/PlusPaywallContainer.swift:14-24 | podcasts/Onboarding/Plus/UpgradeLandingView.swift:125-135 — 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) podcasts/SupporterContributionsViewController.swift:166 — podcasts/SupporterContributionsViewController.swift:166-180 | podcasts/SupporterPodcastViewController.swift:491-501 — 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) Modules/Sources/PocketCastsServer/Private/TokenHelper.swift:29 — Modules/Sources/PocketCastsServer/Private/TokenHelper.swift:29-41 | Modules/Sources/PocketCastsServer/Public/URLConnection.swift:49-59 — 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) podcasts/NowPlayingPlayerItemViewController.swift:80 — podcasts/NowPlayingPlayerItemViewController.swift:80-93 | podcasts/NowPlayingPlayerItemViewController.swift:97-107 — 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) podcasts/Common Components/RichExpandableDescriptionView.swift:221 — podcasts/Common Components/RichExpandableDescriptionView.swift:221-232 | podcasts/ShowNotesPlayerItemViewController.swift:260-270 — 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) podcasts/DownloadsViewController.swift:180 — podcasts/DownloadsViewController.swift:180-190 | podcasts/StarredViewController.swift:180-190 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:436 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:436-446 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:306-320 — 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) Pocket Casts TV App/UI/UserStateModel.swift:45 — Pocket Casts TV App/UI/UserStateModel.swift:45-58 | podcasts/PaidFeature.swift:68-78 — 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) podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift:29 — podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift:29-39 | podcasts/New Detail/PlaylistDetailViewController.swift:31-45 — 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) Pocket Casts TV App/UI/Discover/DiscoverPodcastsListView.swift:57 — Pocket Casts TV App/UI/Discover/DiscoverPodcastsListView.swift:57-67 | Pocket Casts TV App/UI/Podcasts/PodcastsView.swift:60-71 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×23
  • Duplicated block (5 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:50 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:50-55 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:76-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:79 — Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:79-83 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:97-101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) podcasts/DiscoverNetworksGridView.swift:68 — podcasts/DiscoverNetworksGridView.swift:68-72 | podcasts/ExpandedCollectionViewController.swift:224-228 — 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 `podcasts/DiscoverNetworksGridView.swift:68` 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 (5 lines × 2) podcasts/LargeListSummaryViewController.swift:134 — podcasts/LargeListSummaryViewController.swift:134-138 | podcasts/SmallPagedListSummaryViewController.swift:190-194 — 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 `podcasts/LargeListSummaryViewController.swift:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) podcasts/NowPlayingHelper.swift:72 — podcasts/NowPlayingHelper.swift:72-76 | podcasts/WatchNowPlayingHelper.swift:42-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) podcasts/PlaylistShortcutsViewController.swift:68 — podcasts/PlaylistShortcutsViewController.swift:68-72 | podcasts/SiriSettingsViewController.swift:66-71 — 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 `podcasts/PlaylistShortcutsViewController.swift: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.
  • Duplicated block (5 lines × 2) podcasts/UploadedSettingsViewController.swift:173 — podcasts/UploadedSettingsViewController.swift:173-177 | podcasts/WatchSettingsViewController.swift:158-162 — 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 `podcasts/UploadedSettingsViewController.swift:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) Pocket Casts TV App/Data/DiscoverManager.swift:229 — Pocket Casts TV App/Data/DiscoverManager.swift:229-233 | podcasts/Onboarding/OnboardingRecommendationsView.swift:61-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) podcasts/Bookmarks/Episode/BookmarkEpisodeListController.swift:48 — podcasts/Bookmarks/Episode/BookmarkEpisodeListController.swift:48-56 | podcasts/Bookmarks/Profile/BookmarksProfileListController.swift:61-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) podcasts/ChangeEmailViewController.swift:47 — podcasts/ChangeEmailViewController.swift:47-51 | podcasts/Syncing/SyncSigninViewController.swift:20-24 — 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 `podcasts/ChangeEmailViewController.swift: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 (5 lines × 2) podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:73 — podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:73-77 | podcasts/NetworkNavigator.swift:87-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) podcasts/DownloadsViewController+Table.swift:171 — podcasts/DownloadsViewController+Table.swift:171-175 | podcasts/ListeningHistoryViewController+Table.swift:146-150 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) podcasts/GeneratedTranscriptsPremiumOverlay.swift:166 — podcasts/GeneratedTranscriptsPremiumOverlay.swift:166-170 | podcasts/TranscriptViewController.swift:99-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) podcasts/LargeListSummaryViewController.swift:124 — podcasts/LargeListSummaryViewController.swift:124-128 | podcasts/SmallPagedListSummaryViewController.swift:170-174 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) podcasts/New Search/Views/Results/LocalSearchEpisodeResultsView.swift:58 — podcasts/New Search/Views/Results/LocalSearchEpisodeResultsView.swift:58-62 | podcasts/New Search/Views/Results/LocalSearchPodcastResultsView.swift:73-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `podcasts/New Search/Views/Results/LocalSearchEpisodeResultsView.swift:65` calls `easeInOut` and `podcasts/New Search/Views/Results/LocalSearchPodcastResultsView.swift:79` 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 (5 lines × 2) podcasts/Onboarding/Login/SyncLoadingAlert.swift:38 — podcasts/Onboarding/Login/SyncLoadingAlert.swift:38-42 | podcasts/Syncing/SyncSigninViewController.swift:166-170 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) podcasts/Onboarding/Plus/NewUpgrade/UpgradeAccountViewModel.swift:145 — podcasts/Onboarding/Plus/NewUpgrade/UpgradeAccountViewModel.swift:145-149 | podcasts/Onboarding/Plus/PlusLandingViewModel.swift:56-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.
  • Duplicated block (5 lines × 2) Pocket Casts TV App/UI/History/ListeningHistoryViewModel.swift:40 — Pocket Casts TV App/UI/History/ListeningHistoryViewModel.swift:40-44 | Pocket Casts TV App/UI/Starred/StarredEpisodesViewModel.swift:58-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) podcasts/Lists/AllArchivedPlaceholder.swift:22 — podcasts/Lists/AllArchivedPlaceholder.swift:22-26 | podcasts/Lists/EpisodeLimitPlaceholder.swift:22-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1056 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1056-1060 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:475-479 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1056` 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, `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1062` calls `console` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:481` 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 (5 lines × 2) Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:1211 — Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:1211-1215 | Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:257-261 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) podcasts/Onboarding/Plus/UpgradeExperiment/Features/PlusPaywallFeatureCard.swift:89 — podcasts/Onboarding/Plus/UpgradeExperiment/Features/PlusPaywallFeatureCard.swift:89-93 | podcasts/Utilities/SwiftUI/HorizontalCarouselCard.swift:41-45 — 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 `podcasts/Onboarding/Plus/UpgradeExperiment/Features/PlusPaywallFeatureCard.swift:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) podcasts/WhatsNewPageView.swift:91 — podcasts/WhatsNewPageView.swift:91-95 | podcasts/WhatsNewPageView.swift:108-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×22
  • Edited copy of a member (7 corresponding lines) podcasts/Common Components/CircleView.swift:18 — podcasts/Common Components/CircleView.swift:18-27 | podcasts/ProgressCircleView.swift:19-25 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/End of Year/Stories/Views/CommonStoryViews.swift:293 — podcasts/End of Year/Stories/Views/CommonStoryViews.swift:293-299 | podcasts/End of Year/Stories/Views/CommonStoryViews.swift:301-307 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/StarredViewController+Multiselect.swift:72 — podcasts/StarredViewController+Multiselect.swift:72-78 | podcasts/UploadedViewController.+MultiSelect.swift:68-74 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/End of Year/Stories/MDCSwiftUIWrapper.swift:19 — podcasts/End of Year/Stories/MDCSwiftUIWrapper.swift:19-26 | podcasts/End of Year/Stories/MDCSwiftUIWrapper.swift:28-34 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/Podcasts/Share Podcast List/Collection View Cells/SelectPodcastCell.swift:8 — podcasts/Podcasts/Share Podcast List/Collection View Cells/SelectPodcastCell.swift:8-14 | podcasts/Podcasts/Share Podcast List/Collection View Cells/SelectedPodcastCell.swift:7-15 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/SinglePodcastViewController.swift:182 — podcasts/SinglePodcastViewController.swift:182-188 | podcasts/SmallListCell.swift:125-132 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/PlaybackManager.swift:1861 — podcasts/PlaybackManager.swift:1861-1867 | podcasts/PlaybackManager.swift:1869-1875 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/Common SwiftUI/BookmarksEmptyStateView.swift:13 — podcasts/Common SwiftUI/BookmarksEmptyStateView.swift:13-24 | podcasts/Common SwiftUI/BookmarksLockedStateView.swift:18-24 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/EpisodeFilterOverlayController.swift:41 — podcasts/EpisodeFilterOverlayController.swift:41-47 | podcasts/FilterSettingsOverlayController.swift:54-60 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:124 — Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:124-130 | Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:132-140 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/Common Components/Podcast Selection/PodcastChooserViewController.swift:84 — podcasts/Common Components/Podcast Selection/PodcastChooserViewController.swift:84-90 | podcasts/PodcastFilterOverlayController.swift:302-308 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/Kids Profile/KidsProfileSubmitScreen.swift:36 — podcasts/Kids Profile/KidsProfileSubmitScreen.swift:36-44 | podcasts/Kids Profile/KidsProfileThankYouScreen.swift:38-44 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Pocket Casts Watch App/UI/Episode/EpisodeDetailsViewModel.swift:19 — Pocket Casts Watch App/UI/Episode/EpisodeDetailsViewModel.swift:19-25 | Pocket Casts Watch App/UI/Now Playing/Interface/NowPlayingViewModel.swift:21-27 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/Theme/Themable Views/ThemeableCell.swift:62 — podcasts/Theme/Themable Views/ThemeableCell.swift:62-68 | podcasts/Theme/Themable Views/ThemeableSwipeCell.swift:52-58 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/PlayerContainerViewController.swift:478 — podcasts/PlayerContainerViewController.swift:478-484 | podcasts/TranscriptContainerViewController.swift:62-69 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Pocket Casts Watch App/Data & Communication/WatchImageHelper.swift:30 — Pocket Casts Watch App/Data & Communication/WatchImageHelper.swift:30-36 | Pocket Casts Watch App/Extensions/BaseEpisode+Display.swift:11-17 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/PlayerContainerViewController.swift:499 — podcasts/PlayerContainerViewController.swift:499-507 | podcasts/TranscriptContainerViewController.swift:85-91 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/Episode Cells/EpisodeCell.swift:443 — podcasts/Episode Cells/EpisodeCell.swift:443-449 | podcasts/Episode/EpisodeDetailViewController.swift:329-335 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/New Detail/PlaylistDetailViewController.swift:195 — podcasts/New Detail/PlaylistDetailViewController.swift:195-201 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:512-520 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) podcasts/AccountViewController.swift:87 — podcasts/AccountViewController.swift:87-93 | podcasts/ProfileViewController.swift:270-276 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Pocket Casts App Clip/AppClipAppDelegate.swift:36 — Pocket Casts App Clip/AppClipAppDelegate.swift:36-42 | podcasts/AppDelegate.swift:307-314 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Pocket Casts Watch App/UI/Play Source/WatchSourceViewModel.swift:73 — Pocket Casts Watch App/UI/Play Source/WatchSourceViewModel.swift:73-79 | podcasts/Watch Communication/WatchManager.swift:345-351 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
X3 · Exception handling · Swallowed exception (empty catch) · ×21
  • Swallowed exception (empty catch) podcasts/AddCustomViewController.swift:289 — 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) podcasts/DownloadManager.swift:710 — 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) podcasts/EpisodeManager.swift:506 — 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) podcasts/EpisodeManager.swift:552 — 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) podcasts/EpisodeManager.swift:557 — 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) podcasts/EpisodeManager.swift:562 — 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) podcasts/ImageManager.swift:600 — 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) podcasts/PlaybackManager.swift:1661 — 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) podcasts/WhatsNewHelper.swift:10 — 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) podcasts/WidgetHelper.swift:168 — 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) podcasts/Onboarding/Plus/UpgradeExperiment/Reviews/PlusPaywallReviewsViewModel.swift:15 — 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) podcasts/Onboarding/Plus/NewUpgrade/Animations/UpNextShuffleAnimationView.swift:130 — 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) Share Extension/ShareViewController.swift:59 — 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) NotificationExtension/NotificationService.swift:14 — 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) NotificationExtension/NotificationService.swift:27 — 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) NotificationExtension/NotificationService.swift:63 — 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) NotificationContent/NotificationViewController.swift:33 — 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) Modules/Sources/PocketCastsUtils/Feature Flags/FeatureFlagMock.swift:9 — 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) Modules/Sources/PocketCastsServer/Public/Upload/UploadManager.swift:50 — 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) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask.swift:292 — 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) Modules/Sources/PocketCastsServer/Public/Sync/UpNextSyncTask.swift:102 — 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.
D3 · God Classes · MethodTooLong · ×20
  • MethodTooLong: DatabaseHelper.upgradeIfRequired Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:31 — MethodTooLong — upgradeIfRequired runs 713 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 613 over it, 7.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlaylistQueryBuilder.query Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:33 — MethodTooLong — query runs 212 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 112 over it, 2.12× 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: AppDelegate.setupRoutes podcasts/AppDelegate+UrlHandling.swift:72 — MethodTooLong — setupRoutes runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× 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: FeatureFlag.`default` Modules/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift:306 — MethodTooLong — `default` runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GeneralSettingsViewController.tableView podcasts/GeneralSettingsViewController.swift:91 — MethodTooLong — tableView runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× 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: PlaylistQueryBuilder.manualPlaylistFirstDistinctEpisodes Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:442 — MethodTooLong — manualPlaylistFirstDistinctEpisodes runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: String.localized podcasts/LocalizationHelpers.swift:23 — MethodTooLong — localized runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MiniPlayerToFullPlayerAnimator.animateTransition podcasts/MiniPlayerToFullPlayerAnimator.swift:62 — MethodTooLong — animateTransition runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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: PodcastSettingsViewController.tableView podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift:32 — MethodTooLong — tableView 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: NowPlayingPlayerItemViewController.loadActionIntoShelf podcasts/NowPlayingPlayerItemViewController+Shelf.swift:55 — MethodTooLong — loadActionIntoShelf runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× 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: NavigationManager.performNavigation podcasts/Main/NavigationManager.swift:121 — MethodTooLong — performNavigation runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ServerPodcastManager.update Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:36 — MethodTooLong — update runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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: AppTheme.colorForStyle podcasts/AppTheme.swift:507 — MethodTooLong — colorForStyle runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: MainEpisodeActionView.drawInContext podcasts/Common Components/MainEpisodeActionView.swift:209 — MethodTooLong — drawInContext runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UpNextSyncTask.applyServerChanges Modules/Sources/PocketCastsServer/Public/Sync/UpNextSyncTask.swift:185 — MethodTooLong — applyServerChanges runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: FingerprintTimingManager.streamFingerprintGrowing podcasts/Fingerprint/FingerprintTimingManager.swift:1345 — MethodTooLong — streamFingerprintGrowing runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: AccountViewController.tableView podcasts/AccountViewController+TableView.swift:45 — MethodTooLong — tableView runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× 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: AudioReadTask.readFromFile podcasts/AudioReadTask.swift:189 — MethodTooLong — readFromFile runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× 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: WhatsNewPageView.commonInit podcasts/WhatsNewPageView.swift:31 — MethodTooLong — commonInit runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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: TranscriptViewController.setupViews podcasts/TranscriptViewController.swift:214 — MethodTooLong — setupViews runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · ClassTooLong · ×20
  • ClassTooLong: PlaybackManager podcasts/PlaybackManager.swift:9 — ClassTooLong — 1498 significant lines (blank, comment-only and punctuation-only lines excluded), 143 methods. The bar is 400 significant lines; this is 1098 over it, 3.75× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FingerprintTimingManager podcasts/Fingerprint/FingerprintTimingManager.swift:8 — ClassTooLong — 1150 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 750 over it, 2.88× 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: PodcastViewController podcasts/Podcasts/Podcast Page/PodcastViewController.swift:70 — ClassTooLong — 945 significant lines (blank, comment-only and punctuation-only lines excluded), 167 methods. The bar is 400 significant lines; this is 545 over it, 2.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: TranscriptViewController podcasts/TranscriptViewController.swift:7 — ClassTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 420 over it, 2.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.
  • ClassTooLong: Settings podcasts/Settings.swift:10 — ClassTooLong — 810 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 400 significant lines; this is 410 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlaylistQueryBuilder Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:5 — ClassTooLong — 791 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 391 over it, 1.98× 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: DatabaseHelper Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:4 — ClassTooLong — 730 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 330 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AnalyticsEvent Modules/Sources/PocketCastsAnalytics/AnalyticsEvent.swift:3 — ClassTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 327 over it, 1.82× 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: EpisodeDataManager Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:5 — ClassTooLong — 726 significant lines (blank, comment-only and punctuation-only lines excluded), 93 methods. The bar is 400 significant lines; this is 326 over it, 1.82× 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: DataManager Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:7 — ClassTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded), 248 methods. The bar is 400 significant lines; this is 270 over it, 1.68× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MiniPlayerViewController podcasts/MiniPlayerViewController.swift:7 — ClassTooLong — 643 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 243 over it, 1.61× 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: NowPlayingPlayerItemViewController podcasts/NowPlayingPlayerItemViewController.swift:11 — ClassTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), 112 methods. The bar is 400 significant lines; this is 182 over it, 1.46× 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: DefaultPlayer podcasts/DefaultPlayer.swift:12 — ClassTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 182 over it, 1.46× 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: MainTabBarController podcasts/Main/MainTabBarController.swift:10 — ClassTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded), 123 methods. The bar is 400 significant lines; this is 149 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DownloadManager podcasts/DownloadManager.swift:12 — ClassTooLong — 485 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 85 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WatchManager podcasts/Watch Communication/WatchManager.swift:29 — ClassTooLong — 469 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 69 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppTheme podcasts/AppTheme.swift:6 — ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 54 over it, 1.14× 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: EpisodeCell podcasts/Episode Cells/EpisodeCell.swift:5 — ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 54 over it, 1.14× 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: ShareProfileView podcasts/Share Profile/ShareProfileView.swift:8 — ClassTooLong — 433 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 33 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GeneralSettingsViewController podcasts/GeneralSettingsViewController.swift:6 — ClassTooLong — 429 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 29 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×20
  • Edited copy of a member (10 corresponding lines) Modules/Sources/PocketCastsServer/Public/Search/EpisodeSearchResult.swift:30 — Modules/Sources/PocketCastsServer/Public/Search/EpisodeSearchResult.swift:30-41 | Modules/Sources/PocketCastsServer/Public/Search/PodcastSearchTask.swift:34-43 — 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) podcasts/ChaptersViewController.swift:73 — podcasts/ChaptersViewController.swift:73-82 | podcasts/VideoViewController.swift:301-310 — 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) podcasts/Watch Communication/WatchManager.swift:417 — podcasts/Watch Communication/WatchManager.swift:417-428 | podcasts/Watch Communication/WatchManager.swift:430-439 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:232 — Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:232-246 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:277-286 — 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) podcasts/PlaylistShortcutsViewController.swift:68 — podcasts/PlaylistShortcutsViewController.swift:68-77 | podcasts/SiriSettingsViewController.swift:66-78 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/FolderHistoryManager.swift:12 — Modules/Sources/PocketCastsDataModel/Private/Managers/FolderHistoryManager.swift:12-24 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextHistoryManager.swift:24-33 — 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) Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:624 — Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:624-633 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:836-846 — 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) WidgetExtension/Now Playing/NowPlayingWidget.swift:5 — WidgetExtension/Now Playing/NowPlayingWidget.swift:5-14 | WidgetExtension/Now Playing/NowPlayingWidgetBold.swift:5-14 — 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) WidgetExtension/Up Next/UpNextWidget.swift:5 — WidgetExtension/Up Next/UpNextWidget.swift:5-14 | WidgetExtension/Up Next/UpNextWidgetBold.swift:5-14 — 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) podcasts/Common Components/Search/PCSearchBarController.swift:225 — podcasts/Common Components/Search/PCSearchBarController.swift:225-234 | podcasts/EffectsViewController.swift:577-588 — 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) Pocket Casts Watch App/UI/Episode/EpisodeView.swift:71 — Pocket Casts Watch App/UI/Episode/EpisodeView.swift:71-80 | Pocket Casts Watch App/UI/Now Playing/Interface/NowPlayingControls.swift:71-81 — 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) podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:151 — podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:151-160 | podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift:165-174 — 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) podcasts/SharingHelper.swift:10 — podcasts/SharingHelper.swift:10-20 | podcasts/SharingHelper.swift:38-47 — 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) Modules/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBDatabase.swift:19 — Modules/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBDatabase.swift:19-29 | Modules/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBDatabase.swift:31-40 — 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) Pocket Casts Watch App/UI/Play Source/PhoneSourceViewModel.swift:167 — Pocket Casts Watch App/UI/Play Source/PhoneSourceViewModel.swift:167-176 | Pocket Casts Watch App/UI/Play Source/PhoneSourceViewModel.swift:198-207 — 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) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController.swift:56 — podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastEffectsViewController.swift:56-66 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:74-83 — 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) podcasts/Whats New/DeselectChaptersAnnouncementViewModel.swift:30 — podcasts/Whats New/DeselectChaptersAnnouncementViewModel.swift:30-39 | podcasts/Whats New/TranscriptAnnouncementViewModel.swift:23-34 — 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) podcasts/SkipButton.swift:126 — podcasts/SkipButton.swift:126-135 | podcasts/SkipButton.swift:139-150 — 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) podcasts/MigratedSleepTimerIntent.swift:41 — podcasts/MigratedSleepTimerIntent.swift:41-50 | podcasts/SetSleepTimerIntent.swift:39-48 — 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) Pocket Casts TV App/UI/AppCoordinator.swift:168 — Pocket Casts TV App/UI/AppCoordinator.swift:168-177 | podcasts/BackgroundSignOutListener.swift:48-58 — 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 (8 corresponding lines) · ×20
  • Edited copy of a member (8 corresponding lines) podcasts/Onboarding/Plus/UpgradeExperiment/Features/PlusPaywallFeatureCard.swift:89 — podcasts/Onboarding/Plus/UpgradeExperiment/Features/PlusPaywallFeatureCard.swift:89-97 | podcasts/Utilities/SwiftUI/HorizontalCarouselCard.swift:41-48 — 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) podcasts/CheckboxCell.swift:26 — podcasts/CheckboxCell.swift:26-38 | podcasts/CheckboxSubtitleCell.swift:33-40 — 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) podcasts/Sharing/SharingModal.swift:143 — podcasts/Sharing/SharingModal.swift:143-150 | podcasts/Sharing/SharingModal.swift:152-159 — 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) podcasts/AutoArchiveViewController.swift:124 — podcasts/AutoArchiveViewController.swift:124-131 | podcasts/AutoArchiveViewController.swift:133-140 — 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) podcasts/OpmlImporter.swift:94 — podcasts/OpmlImporter.swift:94-105 | podcasts/OpmlImporter.swift:107-114 — 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) podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:64 — podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:64-71 | podcasts/NetworkNavigator.swift:78-85 — 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) podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:154 — podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:154-161 | podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:163-174 — 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) Modules/Sources/PocketCastsServer/Public/WhatsNew/WhatsNewCatalogCache.swift:25 — Modules/Sources/PocketCastsServer/Public/WhatsNew/WhatsNewCatalogCache.swift:25-32 | Modules/Sources/PocketCastsServer/Public/WhatsNew/WhatsNewReadState.swift:107-114 — 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) podcasts/OptionAction.swift:18 — podcasts/OptionAction.swift:18-25 | podcasts/OptionAction.swift:27-35 — 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) podcasts/SleepTimerViewController.swift:15 — podcasts/SleepTimerViewController.swift:15-22 | podcasts/SleepTimerViewController.swift:26-33 — 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) Modules/Sources/PocketCastsServer/Public/ServerSettings.swift:188 — Modules/Sources/PocketCastsServer/Public/ServerSettings.swift:188-197 | Modules/Sources/PocketCastsServer/Public/ServerSettings.swift:211-218 — 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) podcasts/Onboarding/Login/LoginLandingView.swift:213 — podcasts/Onboarding/Login/LoginLandingView.swift:213-220 | podcasts/Onboarding/Plus/PlusPurchaseModal.swift:187-196 — 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) podcasts/Onboarding/Plus/NewUpgrade/Animations/UpNextShuffleAnimationView.swift:101 — podcasts/Onboarding/Plus/NewUpgrade/Animations/UpNextShuffleAnimationView.swift:101-109 | podcasts/Onboarding/Plus/NewUpgrade/Animations/PreSelectChaptersAnimationView.swift:77-84 — 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) Pocket Casts Watch App/UI/Play Source/PhoneSourceViewModel.swift:189 — Pocket Casts Watch App/UI/Play Source/PhoneSourceViewModel.swift:189-196 | Pocket Casts Watch App/UI/Play Source/WatchSourceViewModel.swift:188-195 — 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) podcasts/Podcasts/Share Podcast List/SharePodcastsViewController.swift:90 — podcasts/Podcasts/Share Podcast List/SharePodcastsViewController.swift:90-99 | podcasts/Podcasts/Share Podcast List/SharePublishViewController.swift:144-151 — 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) podcasts/DiscoverFeaturedView.swift:54 — podcasts/DiscoverFeaturedView.swift:54-61 | podcasts/LargeListCell.swift:23-31 — 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) Pocket Casts TV App/UI/Common/Toast/ToastView.swift:7 — Pocket Casts TV App/UI/Common/Toast/ToastView.swift:7-14 | Pocket Casts TV App/UI/Player/MediaOverlayView.swift:86-93 — 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) podcasts/ChangeEmailViewController.swift:223 — podcasts/ChangeEmailViewController.swift:223-230 | podcasts/Syncing/SyncSigninViewController.swift:219-227 — 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) podcasts/Kids Profile/KidsProfileSheetHost.swift:30 — podcasts/Kids Profile/KidsProfileSheetHost.swift:30-37 | podcasts/New Detail/PlaylistPlayAllHelper/PlaylistPlayAllSheetHost.swift:40-48 — 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) podcasts/DescriptiveCollectionCell.swift:87 — podcasts/DescriptiveCollectionCell.swift:87-94 | podcasts/LargeListCell.swift:136-145 — 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 · Duplicated block (8 lines × 2) · ×19
  • Duplicated block (8 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:824 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:824-831 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:232-239 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `episode` to `Episode` in one and `UserEpisode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveCustomFilesTask.swift:17 — Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveCustomFilesTask.swift:17-24 | Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveFileUploadStatus.swift:21-28 — 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 `Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveCustomFilesTask.swift:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:102 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:102-109 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+DeviceAuth.swift:30-37 — 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 `Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift: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 (8 lines × 2) Modules/Sources/PocketCastsServer/Public/Sharing/SharingServerHandler.swift:93 — Modules/Sources/PocketCastsServer/Public/Sharing/SharingServerHandler.swift:93-100 | Modules/Sources/PocketCastsServer/Public/Sharing/SharingServerHandler.swift:110-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsServer/Public/Sharing/SharingServerHandler.swift:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (_ shareUrl: String?) -> Void` in one and `@escaping (_ podcastList: PodcastList?) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) Pocket Casts TV App/UI/Auth/SignInView.swift:75 — Pocket Casts TV App/UI/Auth/SignInView.swift:75-82 | Pocket Casts TV App/UI/Auth/SignInView.swift:85-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts TV App/UI/Auth/SignInView.swift:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodeCell.swift:72 — Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodeCell.swift:72-79 | podcasts/End of Year/Stories/2023/YearOverYearStory2023.swift:137-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.
  • Duplicated block (8 lines × 2) podcasts/ChangeEmailViewController.swift:55 — podcasts/ChangeEmailViewController.swift:55-62 | podcasts/ChangePasswordViewController.swift:40-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) podcasts/Common Components/Progress Views/ProgressLineLayer.swift:109 — podcasts/Common Components/Progress Views/ProgressLineLayer.swift:109-116 | podcasts/TimeSliderLayer.swift:68-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) podcasts/Episode Cells/EpisodeCell.swift:88 — podcasts/Episode Cells/EpisodeCell.swift:88-95 | podcasts/PlayerCell.swift:42-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) podcasts/Onboarding/Import/ImportDetailsView.swift:24 — podcasts/Onboarding/Import/ImportDetailsView.swift:24-31 | podcasts/Onboarding/Import/ImportLandingView.swift:49-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) podcasts/PlayerCell.swift:298 — podcasts/PlayerCell.swift:298-305 | podcasts/UpNextNowPlayingCell.swift:265-272 — 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 `podcasts/PlayerCell.swift:298` 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, `podcasts/PlayerCell.swift:306` calls `updateSizeConstraints` and `podcasts/UpNextNowPlayingCell.swift:274` 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 (8 lines × 2) podcasts/Podcasts/All Podcasts/Cells/FolderGridCell.swift:17 — podcasts/Podcasts/All Podcasts/Cells/FolderGridCell.swift:17-24 | podcasts/Podcasts/All Podcasts/Cells/PodcastGridCell.swift:27-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) podcasts/Podcasts/All Podcasts/FolderPreviewViewController.swift:25 — podcasts/Podcasts/All Podcasts/FolderPreviewViewController.swift:25-32 | podcasts/Podcasts/All Podcasts/PodcastPreviewViewController.swift:25-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `podcasts/Podcasts/All Podcasts/FolderPreviewViewController.swift:24` calls `FolderPreviewView` and `podcasts/Podcasts/All Podcasts/PodcastPreviewViewController.swift:24` 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 (8 lines × 2) podcasts/WhatsNewPageView.swift:97 — podcasts/WhatsNewPageView.swift:97-104 | podcasts/WhatsNewPageView.swift:113-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/WhatsNewPageView.swift:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) podcasts/Kids Profile/KidsProfileBannerTableCell.swift:23 — podcasts/Kids Profile/KidsProfileBannerTableCell.swift:23-30 | podcasts/Playback 2026/Entry Points/Playback2026Banner.swift:40-47 — 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 `podcasts/Kids Profile/KidsProfileBannerTableCell.swift:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Pocket Casts Watch App/UI/WatchSyncManager.swift:129 — Pocket Casts Watch App/UI/WatchSyncManager.swift:129-136 | Pocket Casts Watch App/UI/WatchSyncManager.swift:188-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts Watch App/UI/WatchSyncManager.swift:129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) podcasts/PlaylistArtworkView.swift:39 — podcasts/PlaylistArtworkView.swift:39-46 | podcasts/PlaylistArtworkView.swift:47-54 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) Pocket Casts TV App/UI/Playlists/PlaylistDetailView.swift:280 — Pocket Casts TV App/UI/Playlists/PlaylistDetailView.swift:280-287 | Pocket Casts TV App/UI/Podcasts/PodcastDetailView.swift:200-207 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) podcasts/DiscoverNetworksListViewController.swift:30 — podcasts/DiscoverNetworksListViewController.swift:30-37 | podcasts/HorizontalCollectionListViewController.swift:30-37 — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×19
  • Swallowed exception (caught, then discarded) podcasts/AddCustomViewController.swift:354 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) podcasts/AddCustomViewController.swift:367 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) podcasts/TranscriptFilter.swift:60 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) podcasts/TranscriptModel.swift:163 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) podcasts/Referrals/ReferralSendPassVC.swift:124 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) podcasts/PlaylistMetadataLoader/PlaylistMetadataLoader.swift:209 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) podcasts/InAppPurchases/IAPHelper.swift:122 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) podcasts/Episode Info Coordinator/ShowInfoCoordinator.swift:157 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WidgetExtension/Common/CommonWidgetHelper.swift:35 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WidgetExtension/Common/CommonWidgetHelper.swift:56 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) PodcastsIntents/PlayMediaIntentHandler.swift:71 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) PodcastsIntents/SiriPodcastSearchManager.swift:25 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Pocket Casts TV App/UI/Discover/BestFrameSelector.swift:79 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:58 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Modules/Sources/PocketCastsUtils/Logging/FileLog.swift:196 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Modules/Sources/PocketCastsUtils/Logging/FileLog.swift:203 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Modules/Sources/PocketCastsUtils/Formatting/ShowNotesFormatterUtils.swift:36 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Modules/Sources/PocketCastsUtils/Extensions/FileManager+Helper.swift:18 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Modules/Sources/PocketCastsUtils/Extensions/FileManager+Helper.swift:28 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×16
  • Edited copy of a member (14 corresponding lines) podcasts/LargeListSummaryViewController.swift:132 — podcasts/LargeListSummaryViewController.swift:132-145 | podcasts/SmallPagedListSummaryViewController.swift:188-201 — 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) podcasts/MiniPlayerViewController.swift:94 — podcasts/MiniPlayerViewController.swift:94-107 | podcasts/TranscriptSearchAccessoryView.swift:176-191 — 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) podcasts/Onboarding/Login/SyncLoadingAlert.swift:44 — podcasts/Onboarding/Login/SyncLoadingAlert.swift:44-57 | podcasts/Syncing/SyncSigninViewController.swift:172-187 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:731 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:731-746 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:753-766 — 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) Pocket Casts TV App/UI/Discover/DiscoverPodcastsListView.swift:69 — Pocket Casts TV App/UI/Discover/DiscoverPodcastsListView.swift:69-82 | Pocket Casts TV App/UI/Search/SearchNetworkView.swift:69-82 — 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) podcasts/DiscoverCollectionViewController+Search.swift:108 — podcasts/DiscoverCollectionViewController+Search.swift:108-123 | podcasts/Podcasts/All Podcasts/PodcastListViewController.swift:247-260 — 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) podcasts/ListeningHistoryViewController+Table.swift:61 — podcasts/ListeningHistoryViewController+Table.swift:61-74 | podcasts/StarredViewController+Table.swift:57-70 — 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) podcasts/Onboarding/OnboardingRecommendationsView.swift:67 — podcasts/Onboarding/OnboardingRecommendationsView.swift:67-82 | podcasts/Onboarding/OnboardingRecommendationsView.swift:84-97 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:53 — Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:53-66 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:68-81 — 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) Modules/Sources/PocketCastsServer/Public/Upload/UploadManager.swift:140 — Modules/Sources/PocketCastsServer/Public/Upload/UploadManager.swift:140-154 | podcasts/DownloadManager.swift:660-673 — 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) podcasts/Folders/FolderViewController+Edit.swift:37 — podcasts/Folders/FolderViewController+Edit.swift:37-50 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Edit.swift:37-50 — 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) Pocket Casts TV App/UI/Playlists/PlaylistDetailsViewModel.swift:59 — Pocket Casts TV App/UI/Playlists/PlaylistDetailsViewModel.swift:59-72 | Pocket Casts TV App/UI/Podcasts/PodcastDetailViewModel.swift:125-142 — 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) podcasts/Bookmarks/Details/BookmarkDetailsView.swift:514 — podcasts/Bookmarks/Details/BookmarkDetailsView.swift:514-530 | podcasts/Bookmarks/Editing/BookmarkTranscriptEditView.swift:200-213 — 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) podcasts/DiscoverCollectionViewController+Search.swift:71 — podcasts/DiscoverCollectionViewController+Search.swift:71-84 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Search.swift:116-130 — 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) Screenshot Automation/iPad_GenerateScreenshots.swift:57 — Screenshot Automation/iPad_GenerateScreenshots.swift:57-70 | Screenshot Automation/iPhone_GenerateScreenshots.swift:111-124 — 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) podcasts/Enumerations.swift:67 — podcasts/Enumerations.swift:67-84 | podcasts/DataModel+Strings.swift:41-54 — 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.
D3 · God Classes · FileTooLong · ×15
  • FileTooLong: podcasts/PlaybackManager.swift podcasts/PlaybackManager.swift — FileTooLong — 1631 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: PlaybackManager (9-2620). The bar is 500 significant lines; this is 1131 over it, 3.26× 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: Fingerprint/FingerprintTimingManager.swift podcasts/Fingerprint/FingerprintTimingManager.swift — FileTooLong — 1173 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: FingerprintTimingManager (8-2004). The bar is 500 significant lines; this is 673 over it, 2.35× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Podcast Page/PodcastViewController.swift podcasts/Podcasts/Podcast Page/PodcastViewController.swift — FileTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: PodcastViewController (70-1570). The bar is 500 significant lines; this is 525 over it, 2.05× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: podcasts/TranscriptViewController.swift podcasts/TranscriptViewController.swift — FileTooLong — 1002 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: TranscriptViewController (7-1281). The bar is 500 significant lines; this is 502 over it, 2.00× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: podcasts/Settings.swift podcasts/Settings.swift — FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: Settings (10-1551). The bar is 500 significant lines; this is 362 over it, 1.72× 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: Public/PlaylistQueryBuilder.swift Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift — FileTooLong — 794 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: PlaylistQueryBuilder (5-1054). The bar is 500 significant lines; this is 294 over it, 1.59× 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: Main/MainTabBarController.swift podcasts/Main/MainTabBarController.swift — FileTooLong — 772 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: MainTabBarController (10-975). The bar is 500 significant lines; this is 272 over it, 1.54× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Public/DataManager.swift Modules/Sources/PocketCastsDataModel/Public/DataManager.swift — FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: DataManager (7-1256). The bar is 500 significant lines; this is 269 over it, 1.54× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Managers/EpisodeDataManager.swift Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift — FileTooLong — 768 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: EpisodeDataManager (5-1140). The bar is 500 significant lines; this is 268 over it, 1.54× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Util/DatabaseHelper.swift Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift — FileTooLong — 732 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: DatabaseHelper (4-974). The bar is 500 significant lines; this is 232 over it, 1.46× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: PocketCastsAnalytics/AnalyticsEvent.swift Modules/Sources/PocketCastsAnalytics/AnalyticsEvent.swift — FileTooLong — 728 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: AnalyticsEvent (3-1059). The bar is 500 significant lines; this is 228 over it, 1.46× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: podcasts/MiniPlayerViewController.swift podcasts/MiniPlayerViewController.swift — FileTooLong — 664 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: MiniPlayerViewController (7-1015). The bar is 500 significant lines; this is 164 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: podcasts/DefaultPlayer.swift podcasts/DefaultPlayer.swift — FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DefaultPlayer (12-1033). The bar is 500 significant lines; this is 106 over it, 1.21× 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: podcasts/NowPlayingPlayerItemViewController.swift podcasts/NowPlayingPlayerItemViewController.swift — FileTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: NowPlayingPlayerItemViewController (12-962). The bar is 500 significant lines; this is 104 over it, 1.21× 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: Watch Communication/WatchManager.swift podcasts/Watch Communication/WatchManager.swift — FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: WatchManager (29-792). The bar is 500 significant lines; this is 7 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.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×15
  • Edited copy of a member (16 corresponding lines) podcasts/UploadedSettingsViewController.swift:173 — podcasts/UploadedSettingsViewController.swift:173-190 | podcasts/WatchSettingsViewController.swift:158-173 — 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) podcasts/Podcasts/All Podcasts/Cells/FolderListCell.swift:74 — podcasts/Podcasts/All Podcasts/Cells/FolderListCell.swift:74-89 | podcasts/Podcasts/All Podcasts/Cells/PodcastListCell.swift:90-106 — 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) podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1175 — podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1175-1190 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1199-1215 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:377 — Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:377-392 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:169-186 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:239 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:239-254 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:256-272 — 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) podcasts/DownloadsViewController+Table.swift:44 — podcasts/DownloadsViewController+Table.swift:44-60 | podcasts/ListeningHistoryViewController+Table.swift:44-59 — 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) podcasts/Main/MainTabBarController.swift:992 — podcasts/Main/MainTabBarController.swift:992-1007 | podcasts/Main/MainTabBarController.swift:1010-1028 — 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) Pocket Casts TV App/UI/Auth/CreateAccountView.swift:58 — Pocket Casts TV App/UI/Auth/CreateAccountView.swift:58-74 | Pocket Casts TV App/UI/Auth/CreateAccountView.swift:85-100 — 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) Pocket Casts TV App/UI/History/ListeningHistoryView.swift:27 — Pocket Casts TV App/UI/History/ListeningHistoryView.swift:27-42 | Pocket Casts TV App/UI/Starred/StarredEpisodesView.swift:27-42 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:274 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:274-290 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:86-101 — 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) podcasts/MiniPlayerViewController+TransitionDelegate.swift:16 — podcasts/MiniPlayerViewController+TransitionDelegate.swift:16-31 | podcasts/MiniPlayerViewController+TransitionDelegate.swift:33-56 — 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) podcasts/New Detail/Operation/PlaylistDetailFetchOperation.swift:29 — podcasts/New Detail/Operation/PlaylistDetailFetchOperation.swift:29-49 | podcasts/Podcasts/Podcast Page/PodcastEpisodesRefreshOperation.swift:20-35 — 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) Pocket Casts TV App/UI/Auth/CreateAccountView.swift:128 — Pocket Casts TV App/UI/Auth/CreateAccountView.swift:128-143 | Pocket Casts TV App/UI/Auth/SignInView.swift:110-126 — 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) Pocket Casts TV App/UI/Home/EpisodesHorizontalList.swift:17 — Pocket Casts TV App/UI/Home/EpisodesHorizontalList.swift:17-32 | Pocket Casts TV App/UI/Home/VideoEpisodesHorizontalList.swift:18-33 — 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) Modules/Sources/PocketCastsDataModel/Public/Enums.swift:182 — Modules/Sources/PocketCastsDataModel/Public/Enums.swift:182-197 | Modules/Sources/PocketCastsDataModel/Public/Enums.swift:216-235 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×15
  • Edited copy of a member (12 corresponding lines) Modules/Sources/PocketCastsUtils/General/StorageManager.swift:8 — Modules/Sources/PocketCastsUtils/General/StorageManager.swift:8-20 | Modules/Sources/PocketCastsUtils/General/StorageManager.swift:22-33 — 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) podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:185 — podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift:185-196 | podcasts/DiscoverPodcastTableCell.swift:122-135 — 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) podcasts/PlayerContainerViewController.swift:486 — podcasts/PlayerContainerViewController.swift:486-497 | podcasts/TranscriptContainerViewController.swift:71-83 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:51 — Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:51-62 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:494-506 — 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) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+SocialAuth.swift:56 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+SocialAuth.swift:56-69 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+SocialAuth.swift:71-82 — 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) podcasts/Utilities/ContentUnavailableConfiguration.swift:62 — podcasts/Utilities/ContentUnavailableConfiguration.swift:62-78 | podcasts/Utilities/ContentUnavailableConfiguration.swift:84-95 — 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) Pocket Casts TV App/UI/Playlists/PlaylistDetailsViewModel.swift:74 — Pocket Casts TV App/UI/Playlists/PlaylistDetailsViewModel.swift:74-85 | Pocket Casts TV App/UI/Playlists/PlaylistsViewModel.swift:50-62 — 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) podcasts/AppDelegate+UrlHandling.swift:451 — podcasts/AppDelegate+UrlHandling.swift:451-462 | podcasts/AppDelegate+UrlHandling.swift:464-476 — 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) podcasts/NowPlayingPlayerItemViewController+UpNextPan.swift:7 — podcasts/NowPlayingPlayerItemViewController+UpNextPan.swift:7-18 | podcasts/VideoViewController.swift:474-487 — 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) podcasts/BaseEpisode+Formatting.swift:21 — podcasts/BaseEpisode+Formatting.swift:21-32 | podcasts/BaseEpisode+Formatting.swift:75-90 — 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) podcasts/New Search/Views/Results/LocalSearchViewModel.swift:255 — podcasts/New Search/Views/Results/LocalSearchViewModel.swift:255-267 | podcasts/New Search/Views/Results/LocalSearchViewModel.swift:407-418 — 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) Modules/Sources/PocketCastsServer/Public/Search/PodcastSearchTask.swift:65 — Modules/Sources/PocketCastsServer/Public/Search/PodcastSearchTask.swift:65-78 | Modules/Sources/PocketCastsServer/Public/Search/PodcastSearchTask.swift:80-91 — 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) podcasts/Cancel Subscription/Cancel Subscription/Survey/CancelSubscriptionSurveyView.swift:132 — podcasts/Cancel Subscription/Cancel Subscription/Survey/CancelSubscriptionSurveyView.swift:132-145 | podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionWinbackOfferView.swift:31-42 — 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) podcasts/Folders/FolderViewController+Edit.swift:52 — podcasts/Folders/FolderViewController+Edit.swift:52-63 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Edit.swift:52-64 — 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) Pocket Casts TV App/UI/Search/SearchViewModel.swift:12 — Pocket Casts TV App/UI/Search/SearchViewModel.swift:12-23 | podcasts/New Search/Views/Results/SearchDisplayMode.swift:17-28 — 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 (3 corresponding lines) · ×15
  • Edited copy of a member (3 corresponding lines) podcasts/SJUIUtils.swift:18 — podcasts/SJUIUtils.swift:18-20 | podcasts/SJUIUtils.swift:22-26 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) podcasts/Developer Menu/DeveloperMenuItem.swift:46 — podcasts/Developer Menu/DeveloperMenuItem.swift:46-48 | podcasts/Developer Menu/DeveloperMenuItem.swift:50-52 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) podcasts/DiscoverCollectionViewController+Search.swift:92 — podcasts/DiscoverCollectionViewController+Search.swift:92-94 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Search.swift:140-142 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) podcasts/PlaylistCellViewModel.swift:195 — podcasts/PlaylistCellViewModel.swift:195-197 | podcasts/PlaylistMetadataLoader/PlaylistMetadataLoader.swift:390-395 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) Modules/Sources/PocketCastsServer/Public/Discover/DiscoverServerHandler.swift:37 — Modules/Sources/PocketCastsServer/Public/Discover/DiscoverServerHandler.swift:37-39 | Modules/Sources/PocketCastsServer/Public/ServerHelper.swift:11-13 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) Pocket Casts TV App/Analytics/SearchAnalytics.swift:27 — Pocket Casts TV App/Analytics/SearchAnalytics.swift:27-33 | podcasts/New Search/Helpers/SearchAnalyticsHelper.swift:49-51 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:625 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:625-627 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:436-438 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) Pocket Casts TV App/Analytics/SearchAnalytics.swift:10 — Pocket Casts TV App/Analytics/SearchAnalytics.swift:10-17 | podcasts/New Search/Helpers/SearchAnalyticsHelper.swift:63-65 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) Pocket Casts TV App/Analytics/SearchAnalytics.swift:19 — Pocket Casts TV App/Analytics/SearchAnalytics.swift:19-25 | podcasts/New Search/Helpers/SearchAnalyticsHelper.swift:67-69 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:860 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:860-862 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:407-409 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) Pocket Casts TV App/UI/Common/ProfileImage.swift:43 — Pocket Casts TV App/UI/Common/ProfileImage.swift:43-45 | podcasts/Profile - SwiftUI/Common Views/ProfileImage.swift:44-46 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) podcasts/Whats New/WhatsNewFullView.swift:105 — podcasts/Whats New/WhatsNewFullView.swift:105-107 | podcasts/Whats New/WhatsNewView.swift:70-72 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) podcasts/DiscoverNetworksListViewController.swift:26 — podcasts/DiscoverNetworksListViewController.swift:26-28 | podcasts/HorizontalCollectionListViewController.swift:26-28 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) podcasts/AppDelegate+UrlHandling.swift:11 — podcasts/AppDelegate+UrlHandling.swift:11-13 | podcasts/SceneDelegate.swift:53-57 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (3 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:678 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:678-680 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:411-413 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (11 lines × 2) · ×14
  • Duplicated block (11 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:363 — Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:363-373 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:176-186 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:842 — Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:842-852 | Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:977-987 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:860 — Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:860-870 | Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:990-1000 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) Modules/Sources/PocketCastsServer/Public/Cache/CacheServerHandler.swift:79 — Modules/Sources/PocketCastsServer/Public/Cache/CacheServerHandler.swift:79-90 | Modules/Sources/PocketCastsServer/Public/Cache/CacheServerHandler.swift:109-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsServer/Public/Cache/CacheServerHandler.swift:79` 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) Pocket Casts Watch App/UI/Episode Lists/Files List/FilesListViewModel.swift:46 — Pocket Casts Watch App/UI/Episode Lists/Files List/FilesListViewModel.swift:46-56 | Pocket Casts Watch App/UI/Episode Lists/Filter EpisodeList/FilterEpisodeListViewModel.swift:31-41 — 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 `Pocket Casts Watch App/UI/Episode Lists/Files List/FilesListViewModel.swift:46` 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) podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionOfferSuccessView.swift:31 — podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionOfferSuccessView.swift:31-41 | podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionWinbackOfferView.swift:53-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionWinbackOfferView.swift:66` calls `VStack` and `podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionOfferSuccessView.swift:42` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) podcasts/DefaultPlayer.swift:648 — podcasts/DefaultPlayer.swift:648-658 | podcasts/DefaultPlayer.swift:702-712 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/DefaultPlayer.swift:648` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) podcasts/ExpandedCollectionViewController+CollectionView.swift:14 — podcasts/ExpandedCollectionViewController+CollectionView.swift:14-24 | podcasts/ExpandedCollectionViewController+CollectionView.swift:27-37 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) podcasts/Folders/FolderViewController+ContextMenu.swift:19 — podcasts/Folders/FolderViewController+ContextMenu.swift:19-29 | podcasts/Podcasts/All Podcasts/PodcastListViewController+ContextMenu.swift:25-35 — 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 (11 lines × 2) podcasts/GeneralSettingsViewController.swift:99 — podcasts/GeneralSettingsViewController.swift:99-109 | podcasts/GeneralSettingsViewController.swift:127-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/GeneralSettingsViewController.swift:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) podcasts/Main/MainTabBarController.swift:675 — podcasts/Main/MainTabBarController.swift:675-685 | podcasts/Main/MainTabBarController.swift:691-701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Main/MainTabBarController.swift:675` 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) podcasts/New Detail/Custom Order/PlaylistEpisodePreviewCell.swift:13 — podcasts/New Detail/Custom Order/PlaylistEpisodePreviewCell.swift:13-23 | podcasts/PlaylistCell.swift:23-33 — 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 `podcasts/New Detail/Custom Order/PlaylistEpisodePreviewCell.swift:13` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) podcasts/DefaultPlayer.swift:665 — podcasts/DefaultPlayer.swift:665-675 | podcasts/DefaultPlayer.swift:718-728 — both copies are in the same file, so extract the 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `podcasts/DefaultPlayer.swift:679` calls `AudioUnitSetParameter` and `podcasts/DefaultPlayer.swift:733` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) Pocket Casts TV App/UI/Podcasts/FolderDetailView.swift:66 — Pocket Casts TV App/UI/Podcasts/FolderDetailView.swift:66-76 | Pocket Casts TV App/UI/Podcasts/PodcastDetailView.swift:57-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Pocket Casts TV App/UI/Podcasts/PodcastDetailView.swift:54` calls `ProgressView` and `Pocket Casts TV App/UI/Podcasts/FolderDetailView.swift:63` 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 (10 lines × 2) · ×14
  • Duplicated block (10 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:54 — Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:54-63 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:69-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Modules/Sources/PocketCastsServer/Private/API Tasks/DeleteAccountTask.swift:8 — Modules/Sources/PocketCastsServer/Private/API Tasks/DeleteAccountTask.swift:8-17 | Modules/Sources/PocketCastsServer/Private/API Tasks/RecommendEpisodesTask.swift:9-18 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsServer/Private/API Tasks/DeleteAccountTask.swift:8` 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) Pocket Casts TV App/UI/History/ListeningHistoryViewModel.swift:29 — Pocket Casts TV App/UI/History/ListeningHistoryViewModel.swift:29-38 | Pocket Casts TV App/UI/Starred/StarredEpisodesViewModel.swift:47-56 — 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 (10 lines × 2) podcasts/DownloadsViewController+Table.swift:120 — podcasts/DownloadsViewController+Table.swift:120-129 | podcasts/ListeningHistoryViewController+Table.swift:105-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:51 — podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:51-60 | podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:65-74 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:51` 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) podcasts/Main/MainTabBarController.swift:438 — podcasts/Main/MainTabBarController.swift:438-447 | podcasts/Main/MainTabBarController.swift:449-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `podcasts/Main/MainTabBarController.swift:434` calls `navigateToDiscover`, `switchToTab` and `podcasts/Main/MainTabBarController.swift:446` 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 (10 lines × 2) podcasts/ShiftyRoundButton.swift:81 — podcasts/ShiftyRoundButton.swift:81-90 | podcasts/Theme/Themable Views/ThemeableButton.swift:56-65 — 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 `podcasts/ShiftyRoundButton.swift:81` 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) Modules/Sources/PocketCastsUtils/Extensions/UI/UIColorExtension.swift:27 — Modules/Sources/PocketCastsUtils/Extensions/UI/UIColorExtension.swift:27-36 | Modules/Sources/PocketCastsUtils/Extensions/UI/UIColorExtension.swift:37-46 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsUtils/Extensions/UI/UIColorExtension.swift:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) podcasts/LargeListSummaryViewController.swift:113 — podcasts/LargeListSummaryViewController.swift:113-122 | podcasts/SmallPagedListSummaryViewController.swift:159-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 `podcasts/LargeListSummaryViewController.swift:113` 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) Pocket Casts TV App/UI/Style/CategoryStyle.swift:79 — Pocket Casts TV App/UI/Style/CategoryStyle.swift:79-88 | podcasts/Onboarding/InterestButton.swift:161-170 — before extracting anything, compare `Pocket Casts TV App/UI/Style/CategoryStyle.swift` and `podcasts/Onboarding/InterestButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) podcasts/ChangeEmailViewController.swift:232 — podcasts/ChangeEmailViewController.swift:232-241 | podcasts/Syncing/SyncSigninViewController.swift:229-238 — 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 (10 lines × 2) podcasts/CustomStepper.swift:107 — podcasts/CustomStepper.swift:107-116 | podcasts/CustomTimeStepper.swift:107-116 — before extracting anything, compare `podcasts/CustomStepper.swift` and `podcasts/CustomTimeStepper.swift` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (10 lines × 2) podcasts/CustomStepper.swift:130 — podcasts/CustomStepper.swift:130-139 | podcasts/CustomTimeStepper.swift:130-139 — before extracting anything, compare `podcasts/CustomStepper.swift` and `podcasts/CustomTimeStepper.swift` as WHOLE FILES: this scan already matched 6 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.
  • Duplicated block (10 lines × 2) podcasts/Folders/FolderViewController+Edit.swift:6 — podcasts/Folders/FolderViewController+Edit.swift:6-15 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Edit.swift:4-13 — 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.
D10 · Test Quality · No assertions · ×13
  • No assertions: testQueryPerformance Modules/Tests/PocketCastsDataModelTests/AutoAddCandidatesDataManagerTests.swift:42 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testChangingTheSettingIsAnnounced Modules/Tests/PocketCastsServerTests/ShowWhatsNewDotSettingTests.swift:38 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testApplyingTheCurrentValueIsNotAnnounced Modules/Tests/PocketCastsServerTests/ShowWhatsNewDotSettingTests.swift:47 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testMatchesPreviousImplementationForRandomFields Modules/Tests/PocketCastsUtilsTests/ISO8601DateParserTests.swift:27 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testMatchesPreviousImplementationForTimeZoneOffsets Modules/Tests/PocketCastsUtilsTests/ISO8601DateParserTests.swift:35 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testSavesArtworkToDiskWhenAnotherCacheHasItInMemory PocketCastsTests/Tests/Podcasts/PodcastArtworkPrefetchTests.swift:27 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testSavesThePodcastWhenTheEpisodeStateCannotBeRetrievedWithThePodcast PocketCastsTests/Tests/Sync/FullSyncPodcastImportTests.swift:76 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testTimerInvalidation_Specification PocketCastsTests/Tests/Watch/WatchSyncManagerTests.swift:52 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testThreadSafety Modules/Tests/PocketCastsUtilsTests/General/ThreadSafeDictionaryTests.swift:7 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testOldRmsPerformance PocketCastsTests/Tests/Playback/Effects/AudioUtilsTests.swift:82 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testNewRmsPerformance PocketCastsTests/Tests/Playback/Effects/AudioUtilsTests.swift:90 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testOldFadePerformance PocketCastsTests/Tests/Playback/Effects/AudioUtilsTests.swift:150 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testNewFadePerformance PocketCastsTests/Tests/Playback/Effects/AudioUtilsTests.swift:161 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×12
  • Edited copy of a member (17 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:67 — Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:67-83 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:85-101 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) podcasts/Episode Cells/EpisodeCell.swift:583 — podcasts/Episode Cells/EpisodeCell.swift:583-603 | podcasts/New Search/Views/Results/SearchResultCellModel.swift:72-88 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) podcasts/Folders/FolderViewController+Edit.swift:121 — podcasts/Folders/FolderViewController+Edit.swift:121-137 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Edit.swift:109-127 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) podcasts/PlayerCell.swift:298 — podcasts/PlayerCell.swift:298-314 | podcasts/UpNextNowPlayingCell.swift:265-286 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) podcasts/Share Profile/ShareProfileView.swift:99 — podcasts/Share Profile/ShareProfileView.swift:99-115 | podcasts/Share Profile/ShareProfileView.swift:601-617 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) WidgetExtension/Up Next/HungryForMoreView.swift:8 — WidgetExtension/Up Next/HungryForMoreView.swift:8-25 | WidgetExtension/Up Next/HungryForMoreView.swift:32-48 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) podcasts/SiriShortcutsManager.swift:47 — podcasts/SiriShortcutsManager.swift:47-63 | podcasts/SiriShortcutsManager.swift:65-84 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:837 — Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:837-853 | Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:855-871 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:103 — podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:103-119 | podcasts/End of Year/Stories/2025/YearOverYearCompare2025Story.swift:72-88 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) podcasts/Bookmarks/Editing/BookmarkEditTitleViewModel.swift:29 — podcasts/Bookmarks/Editing/BookmarkEditTitleViewModel.swift:29-45 | podcasts/Bookmarks/Editing/BookmarkEditViewModel.swift:94-112 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) podcasts/Cancel Subscription/Cancel Subscription/Survey/CancelSubscriptionSurveyViewModel.swift:120 — podcasts/Cancel Subscription/Cancel Subscription/Survey/CancelSubscriptionSurveyViewModel.swift:120-136 | podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:269-286 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Pocket Casts TV App/UI/Podcasts/PodcastDetailView.swift:34 — Pocket Casts TV App/UI/Podcasts/PodcastDetailView.swift:34-51 | Pocket Casts TV App/UI/UpNext/UpNextView.swift:18-34 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×12
  • Edited copy of a member (13 corresponding lines) podcasts/ListeningHistoryViewController.swift:117 — podcasts/ListeningHistoryViewController.swift:117-129 | podcasts/New Detail/PlaylistDetailViewController+Observers.swift:13-26 — 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) podcasts/Common Components/MainEpisodeActionView.swift:378 — podcasts/Common Components/MainEpisodeActionView.swift:378-394 | podcasts/Common Components/MainEpisodeActionView.swift:427-439 — 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) podcasts/ShiftyRoundButton.swift:81 — podcasts/ShiftyRoundButton.swift:81-93 | podcasts/Theme/Themable Views/ThemeableButton.swift:56-68 — 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) podcasts/PlaybackQueue.swift:36 — podcasts/PlaybackQueue.swift:36-48 | podcasts/PlaybackQueue.swift:50-62 — 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) Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:145 — Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:145-157 | Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:159-178 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1089 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1089-1101 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1107-1119 — 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) podcasts/Styles.swift:218 — podcasts/Styles.swift:218-230 | podcasts/Styles.swift:237-253 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1121 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1121-1133 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:478-492 — 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) podcasts/ChapterManager.swift:68 — podcasts/ChapterManager.swift:68-80 | podcasts/ChapterManager.swift:82-94 — 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) podcasts/UploadedSettingsViewController.swift:52 — podcasts/UploadedSettingsViewController.swift:52-64 | podcasts/WatchSettingsViewController.swift:56-69 — 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) podcasts/Bookmarks/List/BookmarkEpisodeListViewModel.swift:28 — podcasts/Bookmarks/List/BookmarkEpisodeListViewModel.swift:28-40 | podcasts/Bookmarks/List/BookmarkPodcastListViewModel.swift:54-69 — 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) podcasts/New Detail/Operation/PlaylistDetailFetchOperation.swift:13 — podcasts/New Detail/Operation/PlaylistDetailFetchOperation.swift:13-27 | podcasts/PlaylistRefreshOperation.swift:11-23 — 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 (13 lines × 2) · ×12
  • Duplicated block (13 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:278 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:278-290 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:89-101 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:278` 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 (13 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:653 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:653-665 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:441-453 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `episode` to `Episode` in one and `UserEpisode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:717 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:717-729 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:190-202 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `episode` to `Episode` in one and `UserEpisode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:151 — podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:151-163 | podcasts/Referrals/ReferralsCoordinator.swift:103-115 — 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 `podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:151` 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 (13 lines × 2) podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:64 — podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:64-76 | podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift:75-87 — before extracting anything, compare `podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift` and `podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift` 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 `podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:64` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) podcasts/End of Year/Stories/2023/ListenedNumbersStory2023.swift:31 — podcasts/End of Year/Stories/2023/ListenedNumbersStory2023.swift:31-43 | podcasts/End of Year/Stories/2023/ListenedNumbersStory2023.swift:47-59 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) podcasts/End of Year/Stories/2025/CompletionRate2025Story.swift:26 — podcasts/End of Year/Stories/2025/CompletionRate2025Story.swift:26-38 | podcasts/End of Year/Stories/2025/Ratings2025Story.swift:53-65 — 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 `podcasts/End of Year/Stories/2025/CompletionRate2025Story.swift: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.
  • Duplicated block (13 lines × 2) podcasts/FilterEditOptionsViewController.swift:284 — podcasts/FilterEditOptionsViewController.swift:284-296 | podcasts/PlaylistsViewController+Table.swift:126-138 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/FilterEditOptionsViewController.swift:284` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) podcasts/Fingerprint/FingerprintTimingManager.swift:1237 — podcasts/Fingerprint/FingerprintTimingManager.swift:1237-1249 | podcasts/Fingerprint/FingerprintTimingManager.swift:1304-1316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) podcasts/Profile - SwiftUI/Profile/ProfileHeaderView.swift:261 — podcasts/Profile - SwiftUI/Profile/ProfileHeaderView.swift:261-273 | podcasts/Profile - SwiftUI/Profile/ProfileRefreshButton.swift:38-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) podcasts/End of Year/Stories/2024/NumberListened2024.swift:75 — podcasts/End of Year/Stories/2024/NumberListened2024.swift:75-87 | podcasts/End of Year/Stories/2025/NumberListened2025.swift:142-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) podcasts/CustomStepper.swift:74 — podcasts/CustomStepper.swift:74-86 | podcasts/CustomTimeStepper.swift:74-86 — before extracting anything, compare `podcasts/CustomStepper.swift` and `podcasts/CustomTimeStepper.swift` as WHOLE FILES: this scan already matched 6 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 `podcasts/CustomStepper.swift: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.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×11
  • Edited copy of a member (18 corresponding lines) podcasts/FilterEditOptionsViewController.swift:283 — podcasts/FilterEditOptionsViewController.swift:283-300 | podcasts/PlaylistsViewController+Table.swift:125-142 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/NowPlayingHelper.swift:7 — podcasts/NowPlayingHelper.swift:7-24 | podcasts/WatchNowPlayingHelper.swift:6-23 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/GeneralSettingsViewController.swift:518 — podcasts/GeneralSettingsViewController.swift:518-535 | podcasts/GeneralSettingsViewController.swift:537-554 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/Common Components/AngularActivityIndicator.swift:30 — podcasts/Common Components/AngularActivityIndicator.swift:30-47 | podcasts/Common Components/AngularProgressIndicator.swift:32-49 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/DiscoverNetworksListRowView.swift:52 — podcasts/DiscoverNetworksListRowView.swift:52-71 | podcasts/HorizontalCollectionListRowView.swift:63-80 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/Podcasts/All Podcasts/FolderPreviewViewController.swift:18 — podcasts/Podcasts/All Podcasts/FolderPreviewViewController.swift:18-35 | podcasts/Podcasts/All Podcasts/PodcastPreviewViewController.swift:17-35 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:103 — Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:103-120 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:237-254 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/End of Year/Stories/2024/StoryFooter2024.swift:15 — podcasts/End of Year/Stories/2024/StoryFooter2024.swift:15-32 | podcasts/End of Year/Stories/2025/StoryFooter2025.swift:15-34 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/DescriptiveCollectionCell.swift:59 — podcasts/DescriptiveCollectionCell.swift:59-77 | podcasts/SmallListCell.swift:62-79 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/Lists/TableSwipeActions.swift:16 — podcasts/Lists/TableSwipeActions.swift:16-35 | podcasts/Lists/TableSwipeActions.swift:37-54 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) podcasts/Cancel Subscription/Cancel Subscription/Plans View/CancelSubscriptionPlanRow.swift:47 — podcasts/Cancel Subscription/Cancel Subscription/Plans View/CancelSubscriptionPlanRow.swift:47-64 | podcasts/Cancel Subscription/Cancel Subscription/Survey/CancelSubscriptionSurveyRow.swift:11-28 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×11
  • Edited copy of a member (6 corresponding lines) podcasts/Bookmarks/Details/BookmarkDetailsView.swift:350 — podcasts/Bookmarks/Details/BookmarkDetailsView.swift:350-355 | podcasts/Bookmarks/Editing/BookmarkEditView.swift:330-335 — 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) podcasts/Podcast+Formatting.swift:65 — podcasts/Podcast+Formatting.swift:65-70 | podcasts/Podcast+Formatting.swift:72-77 — 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) Modules/Sources/PocketCastsUtils/Extensions/UI/UIButton+setLetterSpacing.swift:5 — Modules/Sources/PocketCastsUtils/Extensions/UI/UIButton+setLetterSpacing.swift:5-10 | Modules/Sources/PocketCastsUtils/Extensions/UI/UILabel+Attributed.swift:5-10 — 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) podcasts/Common Components/AngularActivityIndicator.swift:17 — podcasts/Common Components/AngularActivityIndicator.swift:17-22 | podcasts/Common Components/AngularProgressIndicator.swift:19-24 — 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) podcasts/DownloadSettingsViewController.swift:223 — podcasts/DownloadSettingsViewController.swift:223-228 | podcasts/NotificationsViewController.swift:248-253 — 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) podcasts/New Search/Views/Results/SearchResultCell.swift:104 — podcasts/New Search/Views/Results/SearchResultCell.swift:104-110 | podcasts/Onboarding/Plus/SubscriptionPriceAndOfferView.swift:12-17 — 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) podcasts/AccountActionCell.swift:91 — podcasts/AccountActionCell.swift:91-97 | podcasts/NewsletterCell.swift:53-58 — 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) podcasts/Bookmarks/Editing/BookmarkEditTitleView.swift:78 — podcasts/Bookmarks/Editing/BookmarkEditTitleView.swift:78-83 | podcasts/Bookmarks/Editing/BookmarkEditView.swift:242-247 — 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) podcasts/DiscoverCollectionViewController.swift:353 — podcasts/DiscoverCollectionViewController.swift:353-358 | podcasts/InAppPurchases/IAPHelper.swift:412-417 — 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) podcasts/End of Year/Stories/2023/ListeningTimeStory2023.swift:69 — podcasts/End of Year/Stories/2023/ListeningTimeStory2023.swift:69-74 | podcasts/End of Year/Stories/2024/ListeningTime2024Story.swift:58-63 — 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) Pocket Casts Watch App/UI/Episode Lists/Podcast Episode List/PodcastEpisodeListView.swift:49 — Pocket Casts Watch App/UI/Episode Lists/Podcast Episode List/PodcastEpisodeListView.swift:49-54 | Pocket Casts Watch App/UI/Episode/EpisodeView.swift:122-127 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×10
  • Edited copy of a member (15 corresponding lines) podcasts/Categories/CategoryButtonStyle.swift:76 — podcasts/Categories/CategoryButtonStyle.swift:76-92 | podcasts/New Search/Views/Results/PillSegmentControl.swift:89-103 — 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) podcasts/EpisodeDateHelper.swift:18 — podcasts/EpisodeDateHelper.swift:18-35 | podcasts/EpisodeDateHelper.swift:37-51 — 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) podcasts/PlayerCell.swift:137 — podcasts/PlayerCell.swift:137-151 | podcasts/UpNextNowPlayingCell.swift:105-123 — 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) podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:149 — podcasts/Cancel Subscription/CancelSubscriptionViewModel.swift:149-163 | podcasts/Referrals/ReferralsCoordinator.swift:101-115 — 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) podcasts/Profile - SwiftUI/Account/AccountHeaderView.swift:130 — podcasts/Profile - SwiftUI/Account/AccountHeaderView.swift:130-144 | podcasts/Profile - SwiftUI/Profile/ProfileHeaderView.swift:166-186 — 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) podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:245 — podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:245-259 | podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:261-275 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:41 — Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:41-55 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:103-123 — 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) podcasts/UpNextViewController.swift:614 — podcasts/UpNextViewController.swift:614-628 | podcasts/UpNextViewController.swift:630-651 — 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) podcasts/Main/MainTabBarController.swift:674 — podcasts/Main/MainTabBarController.swift:674-688 | podcasts/Main/MainTabBarController.swift:690-706 — 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) podcasts/Utilities/SwiftUI/EmptyStateView.swift:51 — podcasts/Utilities/SwiftUI/EmptyStateView.swift:51-65 | podcasts/Utilities/SwiftUI/EmptyStateView.swift:125-139 — 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 copies of one member (3 members, 6+ corresponding lines) · ×9
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/BasePlayPauseButton.swift:34 — podcasts/BasePlayPauseButton.swift:34-39 | podcasts/SkipButton.swift:26-33 | podcasts/SleepTimerButton.swift:27-33 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/ImageManager.swift:122 — podcasts/ImageManager.swift:122-128 | podcasts/ImageManager.swift:174-179 | podcasts/ImageManager.swift:181-187 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/End of Year/Stories/2023/TopFivePodcastsStory2023.swift:133 — podcasts/End of Year/Stories/2023/TopFivePodcastsStory2023.swift:133-138 | podcasts/End of Year/Stories/2024/Top5Podcasts2024Story.swift:130-135 | podcasts/End of Year/Stories/2025/Top5Podcasts2025Story.swift:81-86 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:107 — podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:107-112 | podcasts/End of Year/Stories/2024/TopSpotStory2024.swift:56-61 | podcasts/End of Year/Stories/2025/TopSpotStory2025.swift:74-79 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/End of Year/Stories/2023/ListenedNumbersStory2023.swift:105 — podcasts/End of Year/Stories/2023/ListenedNumbersStory2023.swift:105-110 | podcasts/End of Year/Stories/2024/NumberListened2024.swift:97-102 | podcasts/End of Year/Stories/2025/NumberListened2025.swift:164-169 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/End of Year/Stories/2023/LongestEpisodeStory2023.swift:101 — podcasts/End of Year/Stories/2023/LongestEpisodeStory2023.swift:101-106 | podcasts/End of Year/Stories/2024/LongestEpisode2024Story.swift:112-117 | podcasts/End of Year/Stories/2025/LongestEpisode2025Story.swift:96-101 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/End of Year/Stories/2023/YearOverYearStory2023.swift:215 — podcasts/End of Year/Stories/2023/YearOverYearStory2023.swift:215-220 | podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:91-96 | podcasts/End of Year/Stories/2025/YearOverYearCompare2025Story.swift:59-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/AppearanceViewController.swift:32 — podcasts/AppearanceViewController.swift:32-40 | podcasts/UploadedSettingsViewController.swift:28-33 | podcasts/WatchSettingsViewController.swift:31-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:101 — podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:101-106 | podcasts/End of Year/Stories/2024/CompletionRate2024Story.swift:122-127 | podcasts/End of Year/Stories/2025/CompletionRate2025Story.swift:96-101 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×9
  • Edited copies of one member (3 members, 4+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:394 — Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:394-397 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:508-512 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:537-541 — 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) podcasts/AnalyticsHelper.swift:123 — podcasts/AnalyticsHelper.swift:123-126 | podcasts/AnalyticsHelper.swift:128-131 | podcasts/AnalyticsHelper.swift:175-179 — 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:10 — Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:10-13 | Pocket Casts TV App/UI/Discover/DiscoverPodcastRow.swift:10-13 | Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift:18-21 — 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) podcasts/PlaylistShortcutsViewController.swift:231 — podcasts/PlaylistShortcutsViewController.swift:231-235 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+VoiceShortcuts.swift:6-9 | podcasts/SiriSettingsViewController.swift:262-267 — 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) podcasts/Folders/Create & Edit/Views/ColorPreviewFolderView.swift:87 — podcasts/Folders/Create & Edit/Views/ColorPreviewFolderView.swift:87-91 | podcasts/Folders/Create & Edit/Views/EditFolderView.swift:101-105 | podcasts/Folders/Create & Edit/Views/NameFolderView.swift:55-58 — 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) Pocket Casts TV App/UI/Player/NowPlayingViewModel.swift:251 — Pocket Casts TV App/UI/Player/NowPlayingViewModel.swift:251-254 | Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:129-133 | Pocket Casts Watch App/UI/Play Source/WatchSourceViewModel.swift:134-137 — 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) Pocket Casts TV App/UI/Player/NowPlayingViewModel.swift:256 — Pocket Casts TV App/UI/Player/NowPlayingViewModel.swift:256-259 | Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:135-139 | Pocket Casts Watch App/UI/Play Source/WatchSourceViewModel.swift:139-142 — 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) podcasts/CheckboxSubtitleCell.swift:13 — podcasts/CheckboxSubtitleCell.swift:13-17 | podcasts/Episode/EpisodeDetailViewController.swift:138-142 | podcasts/PlayerCell.swift:19-22 — 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.
  • Edited copies of one member (3 members, 4+ corresponding lines) Pocket Casts TV App/UI/Discover/DiscoverCategoryModel.swift:83 — Pocket Casts TV App/UI/Discover/DiscoverCategoryModel.swift:83-88 | podcasts/Discover Previews/PreviewDiscoverServerHandler.swift:84-87 | podcasts/NetworkNavigator.swift:99-103 — 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 · Duplicated block (12 lines × 2) · ×9
  • Duplicated block (12 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:240 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:240-251 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:257-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:155 — Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:155-166 | Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:169-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts TV App/UI/Podcasts/EpisodeRowViewModel.swift:155` 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) Screenshot Automation/iPad_GenerateScreenshots.swift:41 — Screenshot Automation/iPad_GenerateScreenshots.swift:41-52 | Screenshot Automation/iPhone_GenerateScreenshots.swift:67-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Screenshot Automation/iPad_GenerateScreenshots.swift:39` calls `startMultiTask` and `Screenshot Automation/iPhone_GenerateScreenshots.swift:65` 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 × 2) podcasts/BaseEpisode+Formatting.swift:57 — podcasts/BaseEpisode+Formatting.swift:57-68 | podcasts/UserEpisode+Formatting.swift:23-34 — 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 `podcasts/BaseEpisode+Formatting.swift:57` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `includeSize` to `Bool` in one and `Bool = true` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 2) podcasts/Common SwiftUI/BannerAdView.swift:175 — podcasts/Common SwiftUI/BannerAdView.swift:175-186 | podcasts/Common SwiftUI/BannerAdView.swift:192-203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:103 — podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:103-114 | podcasts/End of Year/Stories/2025/YearOverYearCompare2025Story.swift:72-83 — 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 `podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) podcasts/OptionsPickerRootController.swift:98 — podcasts/OptionsPickerRootController.swift:98-109 | podcasts/OptionsPickerRootController.swift:141-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/OptionsPickerRootController.swift:98` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) podcasts/PlayerZoomAnimator.swift:78 — podcasts/PlayerZoomAnimator.swift:78-90 | podcasts/PlayerZoomAnimator.swift:255-266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/PlayerZoomAnimator.swift:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:122 — podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:122-133 | podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift:136-147 — before extracting anything, compare `podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift` and `podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift` 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.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×8
  • Edited copy of a member (25 corresponding lines) podcasts/MiniPlayerViewController.swift:712 — podcasts/MiniPlayerViewController.swift:712-740 | podcasts/NowPlayingPlayerItemViewController+Update.swift:8-32 — 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) podcasts/ListeningHistoryViewController+Table.swift:76 — podcasts/ListeningHistoryViewController+Table.swift:76-103 | podcasts/StarredViewController+Table.swift:72-96 — 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) podcasts/Onboarding/Plus/UpgradeCard.swift:117 — podcasts/Onboarding/Plus/UpgradeCard.swift:117-141 | podcasts/Onboarding/Plus/UpgradeLandingView.swift:138-165 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:49 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:49-73 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:75-99 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/PlaybackStatsDataManager.swift:51 — Modules/Sources/PocketCastsDataModel/Private/Managers/PlaybackStatsDataManager.swift:51-76 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaybackStatsDataManager.swift:79-103 — 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) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+LocalChanges.swift:7 — Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+LocalChanges.swift:7-38 | Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+LocalChanges.swift:82-106 — 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) podcasts/NowPlayingPlayerItemViewController.swift:609 — podcasts/NowPlayingPlayerItemViewController.swift:609-633 | podcasts/NowPlayingPlayerItemViewController.swift:635-661 — 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) podcasts/Onboarding/Plus/PlusButtonStyles.swift:31 — podcasts/Onboarding/Plus/PlusButtonStyles.swift:31-55 | podcasts/Onboarding/Plus/PlusButtonStyles.swift:75-103 — 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 (26 corresponding lines) · ×6
  • Edited copy of a member (26 corresponding lines) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:99 — podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:99-124 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:750-777 — 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.
  • Edited copy of a member (26 corresponding lines) podcasts/PlaylistShortcutsViewController.swift:83 — podcasts/PlaylistShortcutsViewController.swift:83-108 | podcasts/SiriSettingsViewController.swift:80-110 — 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.
  • Edited copy of a member (26 corresponding lines) Pocket Casts TV App/UI/Player/NowPlayingRow.swift:43 — Pocket Casts TV App/UI/Player/NowPlayingRow.swift:43-71 | Pocket Casts TV App/UI/Search/SearchEpisodeRow.swift:24-49 — 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.
  • Edited copy of a member (26 corresponding lines) podcasts/DiscoverCollectionViewController+Search.swift:40 — podcasts/DiscoverCollectionViewController+Search.swift:40-69 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Search.swift:89-114 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) podcasts/LargeListSummaryViewController.swift:45 — podcasts/LargeListSummaryViewController.swift:45-71 | podcasts/SmallPagedListSummaryViewController.swift:62-87 — 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.
  • Edited copy of a member (26 corresponding lines) Pocket Casts TV App/Data/EpisodesQueryBuilder.swift:5 — Pocket Casts TV App/Data/EpisodesQueryBuilder.swift:5-30 | Pocket Casts Watch App/UI/Episode Lists/Podcast Episode List/PodcastEpisodeListViewModel.swift:7-32 — 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 · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:312 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:312-325 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:105-118 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:312` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:23 — Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:23-36 | Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift:34-47 — before extracting anything, compare `Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift` and `Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 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 `Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:23` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) Pocket Casts TV App/UI/Style/CategoryStyle.swift:64 — Pocket Casts TV App/UI/Style/CategoryStyle.swift:64-77 | podcasts/Onboarding/InterestButton.swift:146-159 — before extracting anything, compare `Pocket Casts TV App/UI/Style/CategoryStyle.swift` and `podcasts/Onboarding/InterestButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) podcasts/New Detail/PlaylistDetailViewController.swift:511 — podcasts/New Detail/PlaylistDetailViewController.swift:511-524 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:817-830 — 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 `podcasts/New Detail/PlaylistDetailViewController.swift:511` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) podcasts/NowPlayingHelper.swift:118 — podcasts/NowPlayingHelper.swift:118-131 | podcasts/WatchNowPlayingHelper.swift:66-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) podcasts/NowPlayingPlayerItemViewController.swift:777 — podcasts/NowPlayingPlayerItemViewController.swift:777-790 | podcasts/VideoViewController.swift:240-253 — 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 `podcasts/NowPlayingPlayerItemViewController.swift:777` 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 (5 lines × 3) · ×6
  • Duplicated block (5 lines × 3) Modules/Sources/PocketCastsServer/Private/API Tasks/PurchaseReceiptTask.swift:29 — Modules/Sources/PocketCastsServer/Private/API Tasks/PurchaseReceiptTask.swift:29-33 | Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFileRequestTask.swift:27-31 | Modules/Sources/PocketCastsServer/Private/API Tasks/UploadImageRequestTask.swift:40-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsServer/Private/API Tasks/PurchaseReceiptTask.swift:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) Modules/Sources/PocketCastsUtils/General/CustomObserver.swift:28 — Modules/Sources/PocketCastsUtils/General/CustomObserver.swift:28-32 | Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift:70-74 | podcasts/SimpleNotificationsViewController.swift:24-28 — before extracting anything, compare `Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift` and `podcasts/SimpleNotificationsViewController.swift` as WHOLE FILES: 87% 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 3 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.
  • Duplicated block (5 lines × 3) podcasts/DownloadsViewController+MultiSelect.swift:45 — podcasts/DownloadsViewController+MultiSelect.swift:45-49 | podcasts/ListeningHistoryViewController+MultiSelect.swift:45-49 | podcasts/StarredViewController+Multiselect.swift:45-49 — before extracting anything, compare `podcasts/DownloadsViewController+MultiSelect.swift` and `podcasts/ListeningHistoryViewController+MultiSelect.swift` as WHOLE FILES: 87% 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 3 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.
  • Duplicated block (5 lines × 3) Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:281 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:281-285 | Modules/Sources/PocketCastsDataModel/Public/Model/Podcast.swift:182-186 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift:214-218 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift` and `Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 39 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 `Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:281` 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, `Modules/Sources/PocketCastsDataModel/Public/Model/Podcast.swift:187` calls `decodeIfPresent` and `Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:286` 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 (5 lines × 3) Modules/Sources/PocketCastsServer/Public/ServerHelper.swift:53 — Modules/Sources/PocketCastsServer/Public/ServerHelper.swift:53-57 | Modules/Sources/PocketCastsServer/Public/ServerHelper.swift:65-69 | Modules/Sources/PocketCastsServer/Public/ServerHelper.swift:91-95 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) podcasts/Extensions/UITableView+MultiSelect.swift:40 — podcasts/Extensions/UITableView+MultiSelect.swift:40-44 | podcasts/Extensions/UITableView+MultiSelect.swift:62-66 | podcasts/Extensions/UITableView+MultiSelect.swift:86-90 — 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 `podcasts/Extensions/UITableView+MultiSelect.swift:40` 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 · Edited copy of a member (21 corresponding lines) · ×5
  • Edited copy of a member (21 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:20 — Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:20-40 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:42-62 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) podcasts/NowPlayingPlayerItemViewController.swift:770 — podcasts/NowPlayingPlayerItemViewController.swift:770-790 | podcasts/VideoViewController.swift:233-253 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) Modules/Sources/PocketCastsServer/Public/Cache/CacheServerHandler.swift:70 — Modules/Sources/PocketCastsServer/Public/Cache/CacheServerHandler.swift:70-90 | Modules/Sources/PocketCastsServer/Public/Cache/CacheServerHandler.swift:92-119 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) podcasts/New Detail/Custom Order/PlaylistEpisodePreviewCell.swift:13 — podcasts/New Detail/Custom Order/PlaylistEpisodePreviewCell.swift:13-34 | podcasts/PlaylistCell.swift:23-43 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) Pocket Casts TV App/UI/MainTabViewModel.swift:44 — Pocket Casts TV App/UI/MainTabViewModel.swift:44-68 | Pocket Casts TV App/UI/UpNext/UpNextViewModel.swift:57-77 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 11+ corresponding lines) podcasts/OptionsPickerRootController.swift:111 — podcasts/OptionsPickerRootController.swift:111-121 | podcasts/OptionsPickerRootController.swift:123-135 | podcasts/OptionsPickerRootController.swift:137-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) podcasts/Settings.swift:700 — podcasts/Settings.swift:700-710 | podcasts/Settings.swift:718-728 | podcasts/Settings.swift:752-762 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) podcasts/DiscoverPodcastTableCell.swift:168 — podcasts/DiscoverPodcastTableCell.swift:168-181 | podcasts/PodcastFilterSelectionCell.swift:90-102 | podcasts/SiriShortcutAddCell.swift:47-57 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:132 — Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:132-143 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:157-167 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:188-199 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) podcasts/Onboarding/Plus/NewUpgrade/SubscriptionPurchaseButton.swift:19 — podcasts/Onboarding/Plus/NewUpgrade/SubscriptionPurchaseButton.swift:19-29 | podcasts/Onboarding/Plus/UpgradeCard.swift:143-153 | podcasts/Onboarding/Plus/UpgradeLandingView.swift:167-177 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) Modules/Sources/PocketCastsDataModel/Public/Model/Podcast+fromDictionary.swift:22 — Modules/Sources/PocketCastsDataModel/Public/Model/Podcast+fromDictionary.swift:22-37 | Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:47-62 — 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 `Modules/Sources/PocketCastsDataModel/Public/Model/Podcast+fromDictionary.swift:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:46` calls `networkListId` and `Modules/Sources/PocketCastsDataModel/Public/Model/Podcast+fromDictionary.swift:21` 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 (16 lines × 2) Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveLastSyncDateTask.swift:8 — Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveLastSyncDateTask.swift:8-23 | Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveStarredTask.swift:17-32 — 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 `Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveLastSyncDateTask.swift:8` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) podcasts/New Detail/PlaylistDetailViewController.swift:251 — podcasts/New Detail/PlaylistDetailViewController.swift:251-266 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:322-337 — 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 (16 lines × 2) podcasts/Share Profile/ShareProfileView.swift:276 — podcasts/Share Profile/ShareProfileView.swift:276-291 | podcasts/Share Profile/ShareProfileView.swift:418-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) podcasts/Utilities/SwiftUI/View+ScaleFactor.swift:12 — podcasts/Utilities/SwiftUI/View+ScaleFactor.swift:12-27 | podcasts/Utilities/SwiftUI/View+ScaleFactor.swift:30-45 — both copies are in the same file, so extract the 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 (8 lines × 3) · ×5
  • Duplicated block (8 lines × 3) Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:185 — Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:185-192 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:204-211 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:223-230 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel.swift:276 — podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel.swift:276-283 | podcasts/PlaylistCellViewModel.swift:154-161 | podcasts/PlaylistMetadataLoader/PlaylistMetadataLoader.swift:362-369 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel.swift:276` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) podcasts/PlaylistsViewController+Table.swift:258 — podcasts/PlaylistsViewController+Table.swift:258-265 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1407-1414 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1469-1476 — 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 `podcasts/PlaylistsViewController+Table.swift:258` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) Pocket Casts App Clip/AppClipAppDelegate.swift:53 — Pocket Casts App Clip/AppClipAppDelegate.swift:53-60 | Pocket Casts TV App/UI/AppCoordinator.swift:147-154 | podcasts/AppDelegate.swift:325-332 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts App Clip/AppClipAppDelegate.swift:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Pocket Casts TV App/UI/AppCoordinator.swift:156` calls `setupDiscover`, `discoverPage` and `Pocket Casts App Clip/AppClipAppDelegate.swift:61` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) podcasts/ExpandedCollectionViewController.swift:175 — podcasts/ExpandedCollectionViewController.swift:175-182 | podcasts/Folders/FolderViewController.swift:55-62 | podcasts/Podcasts/All Podcasts/PodcastListViewController.swift:144-151 — 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.
D35 · Change Coupling · Change coupling · ×4
  • Change coupling: BookmarkManager+TitleSuggestion.swift ↔ BookmarkEditViewModel.swift podcasts/Bookmarks/BookmarkManager+TitleSuggestion.swift:1 — `podcasts/Bookmarks/BookmarkManager+TitleSuggestion.swift` and `podcasts/Bookmarks/Editing/BookmarkEditViewModel.swift` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `cb6fb50c` Remove bookmark passage capture events; `acde1d2c` Record the bookmark's reference time and prefer it over playback time; `49a7fa24` Edit saved bookmarks with the smart bookmark sheet — run `git show` on any of them.
  • Change coupling: MainTabBarController.swift ↔ InformationalModalViewModel.swift podcasts/Main/MainTabBarController.swift:1 — `podcasts/Main/MainTabBarController.swift` and `podcasts/Onboarding/Encourage Account Creation/Modal/InformationalModalViewModel.swift` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `47f67e8c` Choose form sheet presentations by size class instead of the iPad idiom; `652b913d` Address PR review: guard notifications prompt, scope account-created …; `693c7bff` Trim verbose comments on the EAC recurring-modal code — run `git show` on any of them.
  • Change coupling: CreateAccountView.swift ↔ SignInView.swift Pocket Casts TV App/UI/Auth/CreateAccountView.swift:1 — `Pocket Casts TV App/UI/Auth/CreateAccountView.swift` and `Pocket Casts TV App/UI/Auth/SignInView.swift` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `8d710895` Simplify; `40a43598` Consolidate SignIn View to same style as Create; `c2b42d77` Consolidate log in copy — run `git show` on any of them.
  • Change coupling: DiscoverAllView.swift ↔ DiscoverCategoriesRow.swift Pocket Casts TV App/UI/Discover/DiscoverAllView.swift:1 — `Pocket Casts TV App/UI/Discover/DiscoverAllView.swift` and `Pocket Casts TV App/UI/Discover/DiscoverCategoriesRow.swift` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 5 shared commits counted here, the most recent 3 are `67db9d7c` Read discover categories from specific layout item; `a74f1567` Setup source for discover podcast search; `92d032a3` Refactor HomeSection to RowSection — run `git show` on any of them.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:75 — Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:75-96 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:346-362 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:364-380 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:156-171 — 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) Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:656 — Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:656-662 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:664-670 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:721-727 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:765-771 — 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) Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:17 — Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:17-40 | Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:20-44 | Pocket Casts TV App/UI/Discover/DiscoverPodcastRow.swift:20-44 | Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift:28-53 — 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) podcasts/BundlePodcastCell.swift:9 — podcasts/BundlePodcastCell.swift:9-17 | podcasts/CategorySponsoredCell.swift:14-22 | podcasts/DiscoverPodcastTableCell.swift:9-17 | podcasts/PodcastFilterSelectionCell.swift:13-21 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×4
  • Edited copy of a member (27 corresponding lines) Modules/Sources/PocketCastsDataModel/Public/Model/Episode+Encoding.swift:5 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode+Encoding.swift:5-35 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode+Encoding.swift:5-31 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) podcasts/Podcasts/All Podcasts/PodcastListViewController+Tip.swift:20 — podcasts/Podcasts/All Podcasts/PodcastListViewController+Tip.swift:20-46 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1397-1425 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) podcasts/ShortcutManager.swift:12 — podcasts/ShortcutManager.swift:12-45 | podcasts/Utilities/BadgeHelper.swift:14-40 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) podcasts/End of Year/Stories/2024/ListeningTime2024Story.swift:114 — podcasts/End of Year/Stories/2024/ListeningTime2024Story.swift:114-140 | podcasts/End of Year/Stories/2025/ListeningTime2025Story.swift:137-163 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×4
  • Edited copy of a member (32 corresponding lines) podcasts/DownloadsViewController.swift:238 — podcasts/DownloadsViewController.swift:238-278 | podcasts/UploadedViewController.swift:190-221 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:499 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:499-531 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1023-1054 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) Modules/Sources/PocketCastsServer/Private/API Tasks/ChangeEmailTask.swift:18 — Modules/Sources/PocketCastsServer/Private/API Tasks/ChangeEmailTask.swift:18-49 | Modules/Sources/PocketCastsServer/Private/API Tasks/ChangePasswordTask.swift:18-49 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) podcasts/GeneratedEpisodeMetadataRetriever.swift:30 — podcasts/GeneratedEpisodeMetadataRetriever.swift:30-63 | podcasts/PodcastIndexChapterDataRetriever.swift:26-57 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×4
  • Edited copy of a member (30 corresponding lines) podcasts/New Detail/PlaylistDetailViewController+EditActions.swift:134 — podcasts/New Detail/PlaylistDetailViewController+EditActions.swift:134-163 | podcasts/Podcasts/Podcast Page/PodcastViewController+Options.swift:65-95 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:66 — Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:66-95 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:97-130 — 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) podcasts/End of Year/Stories/2023/TopFivePodcastsStory2023.swift:36 — podcasts/End of Year/Stories/2023/TopFivePodcastsStory2023.swift:36-65 | podcasts/End of Year/Stories/2023/TopListenedCategoriesStory2023.swift:14-47 — 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) podcasts/UIFont+FontStyle.swift:105 — podcasts/UIFont+FontStyle.swift:105-134 | podcasts/UIFont+FontStyle.swift:199-228 — 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, 9+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 9+ corresponding lines) podcasts/UpNextNowPlayingCell.swift:82 — podcasts/UpNextNowPlayingCell.swift:82-99 | podcasts/UserEpisodeDetailViewController.swift:163-171 | podcasts/WidgetHelper.swift:13-23 — 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.
  • Edited copies of one member (3 members, 9+ corresponding lines) podcasts/ExpandedCollectionViewController+CollectionView.swift:41 — podcasts/ExpandedCollectionViewController+CollectionView.swift:41-49 | podcasts/LargeListSummaryViewController.swift:151-162 | podcasts/SmallPagedListSummaryViewController.swift:203-215 — 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.
  • Edited copies of one member (3 members, 9+ corresponding lines) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+DeviceAuth.swift:62 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+DeviceAuth.swift:62-70 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+SocialAuth.swift:23-32 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+SocialAuth.swift:34-42 — 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.
  • Edited copies of one member (3 members, 9+ corresponding lines) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Referrals.swift:5 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Referrals.swift:5-13 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Winback.swift:4-12 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler.swift:114-126 — 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 copy of a member (20 corresponding lines) · ×4
  • Edited copy of a member (20 corresponding lines) Pocket Casts TV App/UI/Search/SearchTopResultsView.swift:57 — Pocket Casts TV App/UI/Search/SearchTopResultsView.swift:57-76 | Pocket Casts TV App/UI/Search/SearchTopResultsView.swift:79-98 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:308 — Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:308-327 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:329-358 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) podcasts/DiscoverEpisodeViewModel.swift:125 — podcasts/DiscoverEpisodeViewModel.swift:125-144 | podcasts/ExpandedEpisodeListViewController.swift:79-99 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) podcasts/Bookmarks/Player/BookmarksPlayerTabController.swift:100 — podcasts/Bookmarks/Player/BookmarksPlayerTabController.swift:100-119 | podcasts/TranscriptViewController.swift:1427-1448 — 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 (3 members, 10+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 10+ corresponding lines) podcasts/Extensions/UITableView+MultiSelect.swift:39 — podcasts/Extensions/UITableView+MultiSelect.swift:39-48 | podcasts/Extensions/UITableView+MultiSelect.swift:61-70 | podcasts/Extensions/UITableView+MultiSelect.swift:82-97 — 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) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:884 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:884-897 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:899-911 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:425-434 — 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) Modules/Sources/PocketCastsServer/Public/Sync/BackgroundSyncManager.swift:86 — Modules/Sources/PocketCastsServer/Public/Sync/BackgroundSyncManager.swift:86-95 | Modules/Sources/PocketCastsServer/Public/Sync/BackgroundSyncManager.swift:97-109 | Modules/Sources/PocketCastsServer/Public/Sync/BackgroundSyncManager.swift:111-122 — 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) WidgetExtension/Common/CommonWidgetHelper.swift:16 — WidgetExtension/Common/CommonWidgetHelper.swift:16-25 | WidgetExtension/Common/CommonWidgetHelper.swift:27-38 | WidgetExtension/Common/CommonWidgetHelper.swift:48-59 — 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 copies of one member (4 members, 9+ corresponding lines) · ×4
  • Edited copies of one member (4 members, 9+ corresponding lines) podcasts/New Detail/PlaylistDetailViewController+TableView.swift:251 — podcasts/New Detail/PlaylistDetailViewController+TableView.swift:251-260 | podcasts/Podcasts/Podcast Page/PodcastViewController+TableData.swift:374-382 | podcasts/StarredViewController+Table.swift:98-107 | podcasts/UploadedViewController+Table.swift:76-85 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:134 — podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:134-142 | podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:172-181 | podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:183-194 | podcasts/Common Components/MultiSelect/MultiSelectHelper.swift:277-286 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/AutoAddQueueDataManager.swift:12 — Modules/Sources/PocketCastsDataModel/Private/Managers/AutoAddQueueDataManager.swift:12-20 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1069-1077 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1079-1087 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:465-473 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Referrals.swift:25 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Referrals.swift:25-33 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+SupportFeedbackRequest.swift:4-12 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+UserPodcastRating.swift:5-13 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Winback.swift:14-22 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×4
  • Duplicated block (19 lines × 2) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:740 — Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:740-758 | Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:901-919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:26 — Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:26-44 | Pocket Casts TV App/UI/Discover/DiscoverPodcastRow.swift:26-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift: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.
  • Duplicated block (19 lines × 2) podcasts/New Detail/PlaylistDetailViewController+EditActions.swift:136 — podcasts/New Detail/PlaylistDetailViewController+EditActions.swift:136-154 | podcasts/Podcasts/Podcast Page/PodcastViewController+Options.swift:67-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. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/New Detail/PlaylistDetailViewController+EditActions.swift:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) podcasts/FeaturedCollectionViewCell.swift:7 — podcasts/FeaturedCollectionViewCell.swift:7-25 | podcasts/FeaturedTableViewCell.swift:7-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) Modules/Sources/PocketCastsDataModel/Public/Model/Episode+fromDictionary.swift:49 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode+fromDictionary.swift:49-63 | Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:181-195 — 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 (15 lines × 2) WidgetExtension/Up Next/HungryForMoreView.swift:8 — WidgetExtension/Up Next/HungryForMoreView.swift:8-22 | WidgetExtension/Up Next/HungryForMoreView.swift:32-46 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WidgetExtension/Up Next/HungryForMoreView.swift:8` 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, `WidgetExtension/Up Next/HungryForMoreView.swift:23` calls `offset` and `WidgetExtension/Up Next/HungryForMoreView.swift:47` 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) podcasts/DiscoverCollectionViewController+Search.swift:51 — podcasts/DiscoverCollectionViewController+Search.swift:51-65 | podcasts/Podcasts/All Podcasts/PodcastListViewController+Search.swift:97-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 (15 lines × 2) podcasts/CustomStepper.swift:57 — podcasts/CustomStepper.swift:57-71 | podcasts/CustomTimeStepper.swift:57-71 — before extracting anything, compare `podcasts/CustomStepper.swift` and `podcasts/CustomTimeStepper.swift` as WHOLE FILES: this scan already matched 6 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 `podcasts/CustomStepper.swift:57` 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 · Edited copy of a member (31 corresponding lines) · ×3
  • Edited copy of a member (31 corresponding lines) podcasts/Common Components/MultiSelect/MultiSelectActionController.swift:159 — podcasts/Common Components/MultiSelect/MultiSelectActionController.swift:159-189 | podcasts/ShelfActionsViewController+Table.swift:139-175 — 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.
  • Edited copy of a member (31 corresponding lines) WidgetExtension/Common/ArtworkViews.swift:48 — WidgetExtension/Common/ArtworkViews.swift:48-81 | WidgetExtension/Common/ArtworkViews.swift:89-119 — 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.
  • Edited copy of a member (31 corresponding lines) WidgetExtension/Now Playing/NowPlayingLockScreenWidget.swift:34 — WidgetExtension/Now Playing/NowPlayingLockScreenWidget.swift:34-67 | WidgetExtension/Up Next/UpNextLockScreenWidget.swift:99-129 — 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 (24 corresponding lines) · ×3
  • Edited copy of a member (24 corresponding lines) podcasts/Lists/EpisodeTableHelper.swift:17 — podcasts/Lists/EpisodeTableHelper.swift:17-40 | podcasts/Lists/EpisodeTableHelper.swift:69-92 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) podcasts/End of Year/Stories/2024/Ratings2024Story.swift:72 — podcasts/End of Year/Stories/2024/Ratings2024Story.swift:72-95 | podcasts/End of Year/Stories/2025/Ratings2025Story.swift:69-93 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) Pocket Casts TV App/UI/Playlists/DownloadAppModal.swift:8 — Pocket Casts TV App/UI/Playlists/DownloadAppModal.swift:8-31 | Pocket Casts TV App/UI/Profile/ShowQRLinkView.swift:11-35 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 18+ corresponding lines) podcasts/Kids Profile/KidsProfileBannerTableCell.swift:10 — podcasts/Kids Profile/KidsProfileBannerTableCell.swift:10-36 | podcasts/Playback 2026/Entry Points/Playback2026Banner.swift:36-53 | podcasts/Referrals/Banner/ReferralsClaimBannerTableCell.swift:7-28 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:184 — Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:184-201 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:203-220 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:222-239 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) podcasts/New Detail/Custom Order/PlaylistDetailCustomOrderViewController.swift:49 — podcasts/New Detail/Custom Order/PlaylistDetailCustomOrderViewController.swift:49-66 | podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift:88-111 | podcasts/PodcastFilterOverlayController.swift:100-121 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 7+ corresponding lines) podcasts/DownloadsViewController.swift:224 — podcasts/DownloadsViewController.swift:224-232 | podcasts/ListeningHistoryViewController.swift:226-232 | podcasts/UploadedViewController.swift:180-188 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) podcasts/DiscoverNetworksGridView.swift:65 — podcasts/DiscoverNetworksGridView.swift:65-72 | podcasts/ExpandedCollectionViewController.swift:222-228 | podcasts/PodcastHeaderListViewController.swift:61-67 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) podcasts/DescriptiveCollectionCell.swift:8 — podcasts/DescriptiveCollectionCell.swift:8-14 | podcasts/SinglePodcastViewController.swift:32-39 | podcasts/SmallListCell.swift:15-21 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 16+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/FolderHistoryManager.swift:27 — Modules/Sources/PocketCastsDataModel/Private/Managers/FolderHistoryManager.swift:27-44 | Modules/Sources/PocketCastsDataModel/Private/Managers/FolderHistoryManager.swift:46-64 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextHistoryManager.swift:36-51 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextHistoryManager.swift:53-68 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 16+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:103 — Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:103-120 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:6-21 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:325-341 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:343-359 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 16+ corresponding lines) podcasts/DownloadsViewController+Table.swift:17 — podcasts/DownloadsViewController+Table.swift:17-34 | podcasts/ListeningHistoryViewController+Table.swift:17-34 | podcasts/StarredViewController+Table.swift:16-31 | podcasts/UploadedViewController+Table.swift:104-119 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:766 — Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:766-783 | Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:936-953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) Pocket Casts TV App/Data/EpisodesQueryBuilder.swift:9 — Pocket Casts TV App/Data/EpisodesQueryBuilder.swift:9-26 | Pocket Casts Watch App/UI/Episode Lists/Podcast Episode List/PodcastEpisodeListViewModel.swift:12-29 — 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 (18 lines × 2) podcasts/Share Profile/ShareProfileView.swift:371 — podcasts/Share Profile/ShareProfileView.swift:371-388 | podcasts/Share Profile/ShareProfileView.swift:435-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Share Profile/ShareProfileView.swift:371` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `podcasts/Share Profile/ShareProfileView.swift:367` calls `lineLimit` and `podcasts/Share Profile/ShareProfileView.swift:432` 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 (17 lines × 2) · ×3
  • Duplicated block (17 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:534 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:534-550 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:382-398 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:534` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `episodes` to `[Episode]` in one and `[UserEpisode]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) Pocket Casts TV App/UI/MainTabViewModel.swift:44 — Pocket Casts TV App/UI/MainTabViewModel.swift:44-60 | Pocket Casts TV App/UI/UpNext/UpNextViewModel.swift:57-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts TV App/UI/MainTabViewModel.swift:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) Pocket Casts TV App/UI/History/ListeningHistoryView.swift:9 — Pocket Casts TV App/UI/History/ListeningHistoryView.swift:9-25 | Pocket Casts TV App/UI/Starred/StarredEpisodesView.swift:9-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×3
  • Duplicated block (8–9 lines × 2) podcasts/GeneralSettingsViewController.swift:36 — podcasts/GeneralSettingsViewController.swift:36-44 | podcasts/NotificationsViewController.swift:112-119 — 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 `podcasts/GeneralSettingsViewController.swift:36` 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, `podcasts/GeneralSettingsViewController.swift:35` calls `register`, `UINib` and `podcasts/NotificationsViewController.swift:111` 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 (8–9 lines × 2) podcasts/SiriShortcutsManager.swift:212 — podcasts/SiriShortcutsManager.swift:212-219 | podcasts/SiriShortcutsManager.swift:229-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/SiriShortcutsManager.swift:212` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8–9 lines × 2) podcasts/ImageManager.swift:377 — podcasts/ImageManager.swift:377-384 | podcasts/ImageManager.swift:386-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/ImageManager.swift:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) podcasts/BundlePodcastCell.swift:28 — podcasts/BundlePodcastCell.swift:28-33 | podcasts/DescriptiveCollectionCell.swift:8-13 | podcasts/SmallListCell.swift:15-20 — 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 `podcasts/BundlePodcastCell.swift:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `podcasts/BundlePodcastCell.swift:35` calls `addObserver` and `podcasts/DescriptiveCollectionCell.swift:14` 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 (6 lines × 3) podcasts/New Creation/New Playlist/NewPlaylistViewController.swift:219 — podcasts/New Creation/New Playlist/NewPlaylistViewController.swift:219-224 | podcasts/New Creation/New Preview/PlaylistPreviewViewController.swift:207-212 | podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift:162-167 — 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, `podcasts/New Creation/New Playlist/NewPlaylistViewController.swift:216` calls `activate` and `podcasts/New Creation/New Preview/PlaylistPreviewViewController.swift:204` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:742 — Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:742-747 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:750-755 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:774-779 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×3
  • Duplicated block (5 lines × 4) podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:40 — podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:40-44 | podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:48-52 | podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:56-60 | podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:64-68 — 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.
  • Duplicated block (5 lines × 4) podcasts/Theme/Themable Views/ThemeableSelectionView.swift:51 — podcasts/Theme/Themable Views/ThemeableSelectionView.swift:51-55 | podcasts/Theme/Themable Views/ThemeableTextField.swift:38-42 | podcasts/Theme/Themable Views/ThemeableTextView.swift:26-30 | podcasts/ThemeableView.swift:32-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Theme/Themable Views/ThemeableSelectionView.swift:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:187 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:187-191 | Modules/Sources/PocketCastsDataModel/Public/Model/EpisodeFilter.swift:107-111 | Modules/Sources/PocketCastsDataModel/Public/Model/Podcast.swift:101-105 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift:148-152 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift` and `Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 39 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.
D12 · Dependency Hygiene · Floating branch dependency · ×2
  • Floating branch dependency: swime — Dependency `swime` is declared in Modules/Package.swift against branch `master` — the declaration pins no immutable point, so `swift package update` moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (`from:`, `.upToNextMajor(from:)`, `exact:`) or to a `revision:` commit SHA.
  • Floating branch dependency: pocket-casts-ios-fingerprint — Dependency `pocket-casts-ios-fingerprint` is declared in Modules/Package.swift against branch `trunk` — the declaration pins no immutable point, so `swift package update` moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (`from:`, `.upToNextMajor(from:)`, `exact:`) or to a `revision:` commit SHA.
D17 · Explicit Debt · HackComment · ×2
  • HackComment podcasts/Folders/Create & Edit/Views/SuggestedFolderPodcastView.swift:21 — // hack to allow the scroll indicator to be visible without overlapping the content — 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.
  • HackComment podcasts/Folders/Create & Edit/Views/SuggestedFoldersView.swift:100 — // hack to allow the scroll indicator to be visible without overlapping the content — 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.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) podcasts/End of Year/Stories/2023/EpilogueStory2023.swift:133 — podcasts/End of Year/Stories/2023/EpilogueStory2023.swift:133-163 | podcasts/Onboarding/Patron/PatronAppIconUnlock.swift:406-435 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) podcasts/New Creation/New Preview/Rules/SmartPlaylistRulesSectionView.swift:144 — podcasts/New Creation/New Preview/Rules/SmartPlaylistRulesSectionView.swift:144-164 | podcasts/New Creation/New Preview/Rules/SmartPlaylistRulesSectionView.swift:205-223 — 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 · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) Pocket Casts TV App/UI/Style/CategoryStyle.swift:14 — Pocket Casts TV App/UI/Style/CategoryStyle.swift:14-62 | podcasts/DeviceApprove/DeviceApproveView.swift:280-298 | podcasts/End of Year/Stories/2023/ListeningTimeStory2023.swift:89-134 | podcasts/HorizontalCollectionListRowView.swift:92-139 | podcasts/Onboarding/InterestButton.swift:96-144 — 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) podcasts/DownloadsViewController+Swipe.swift:23 — podcasts/DownloadsViewController+Swipe.swift:23-34 | podcasts/New Detail/PlaylistDetailViewController+Swipe.swift:21-32 | podcasts/Podcasts/Podcast Page/PodcastViewController+Swipe.swift:22-33 | podcasts/StarredViewController+Swipe.swift:22-33 | podcasts/UpNextViewController+Swipe.swift:101-112 — 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 (38 corresponding lines) · ×2
  • Edited copy of a member (38 corresponding lines) podcasts/End of Year/Stories/2023/LongestEpisodeStory2023.swift:33 — podcasts/End of Year/Stories/2023/LongestEpisodeStory2023.swift:33-83 | podcasts/End of Year/Stories/2024/LongestEpisode2024Story.swift:57-94 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) podcasts/Bookmarks/Details/BookmarkDetailsView.swift:387 — podcasts/Bookmarks/Details/BookmarkDetailsView.swift:387-424 | podcasts/Bookmarks/Editing/BookmarkTranscriptEditView.swift:94-134 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) Modules/Sources/PocketCastsDataModel/Public/Model/Episode+Encoding.swift:37 — Modules/Sources/PocketCastsDataModel/Public/Model/Episode+Encoding.swift:37-66 | Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode+Encoding.swift:33-55 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:311 — Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:311-333 | Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:337-359 — 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 (35 corresponding lines) · ×2
  • Edited copy of a member (35 corresponding lines) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:62 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:62-96 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:98-135 — 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) podcasts/PlayerCell.swift:207 — podcasts/PlayerCell.swift:207-244 | podcasts/UpNextNowPlayingCell.swift:207-241 — 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 (37 corresponding lines) · ×2
  • Edited copy of a member (37 corresponding lines) podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionOfferSuccessView.swift:24 — podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionOfferSuccessView.swift:24-60 | podcasts/Cancel Subscription/Cancel Subscription/Offer View/CancelSubscriptionWinbackOfferView.swift:44-97 — 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) WidgetExtension/Up Next/UpNextLargeWidgetView.swift:98 — WidgetExtension/Up Next/UpNextLargeWidgetView.swift:98-150 | WidgetExtension/Up Next/UpNextMediumWidgetView.swift:82-118 — 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 (28 corresponding lines) · ×2
  • Edited copy of a member (28 corresponding lines) Modules/Sources/PocketCastsServer/Private/API Tasks/ApiBaseTask.swift:55 — Modules/Sources/PocketCastsServer/Private/API Tasks/ApiBaseTask.swift:55-82 | Modules/Sources/PocketCastsServer/Private/API Tasks/ApiBaseTask.swift:88-119 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) podcasts/New Detail/PlaylistDetailViewController.swift:508 — podcasts/New Detail/PlaylistDetailViewController.swift:508-535 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:813-842 — 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, 20+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 20+ corresponding lines) Modules/Sources/PocketCastsServer/Private/API Tasks/ReferralGetCodeTask.swift:13 — Modules/Sources/PocketCastsServer/Private/API Tasks/ReferralGetCodeTask.swift:13-32 | Modules/Sources/PocketCastsServer/Private/API Tasks/ReferralValidateTask.swift:31-51 | Modules/Sources/PocketCastsServer/Private/API Tasks/WinbackOfferTask.swift:16-41 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) podcasts/DownloadsViewController.swift:37 — podcasts/DownloadsViewController.swift:37-57 | podcasts/ListeningHistoryViewController.swift:57-76 | podcasts/StarredViewController.swift:35-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 13+ corresponding lines) podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:116 — podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:116-128 | podcasts/End of Year/Stories/2024/CompletionRate2024Story.swift:131-143 | podcasts/End of Year/Stories/2025/CompletionRate2025Story.swift:105-120 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) PodcastsIntents/ChapterIntentHandler.swift:7 — PodcastsIntents/ChapterIntentHandler.swift:7-19 | PodcastsIntents/ExtendSleepTimerIntentHandler.swift:7-23 | PodcastsIntents/OpenFilterIntentHandler.swift:7-23 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 16+ corresponding lines) podcasts/PodcastChapterParser.swift:41 — podcasts/PodcastChapterParser.swift:41-59 | podcasts/PodcastChapterParser.swift:61-76 | podcasts/PodcastChapterParser.swift:78-93 — 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.
  • Edited copies of one member (3 members, 16+ corresponding lines) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastArchiveViewController+Table.swift:150 — podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastArchiveViewController+Table.swift:150-165 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastArchiveViewController+Table.swift:167-183 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastArchiveViewController+Table.swift:185-201 — 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 (3 members, 15+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 15+ corresponding lines) podcasts/SiriShortcutsManager.swift:207 — podcasts/SiriShortcutsManager.swift:207-222 | podcasts/SiriShortcutsManager.swift:224-240 | podcasts/SiriShortcutsManager.swift:263-277 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) Modules/Sources/PocketCastsServer/Public/Sync/BackgroundSyncManager+URLSession.swift:6 — Modules/Sources/PocketCastsServer/Public/Sync/BackgroundSyncManager+URLSession.swift:6-22 | Modules/Sources/PocketCastsServer/Public/Upload/UploadManager+URLSessionDelegate.swift:6-20 | podcasts/MediaExporterResourceLoaderDelegate.swift:177-193 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 11+ corresponding lines) podcasts/CustomStepper.swift:95 — podcasts/CustomStepper.swift:95-105 | podcasts/CustomStepper.swift:118-128 | podcasts/CustomTimeStepper.swift:95-105 | podcasts/CustomTimeStepper.swift:118-128 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) podcasts/GeneralSettingsViewController.swift:34 — podcasts/GeneralSettingsViewController.swift:34-44 | podcasts/StorageAndDataUseViewController.swift:6-16 | podcasts/UploadedSettingsViewController.swift:11-21 | podcasts/WatchSettingsViewController.swift:13-24 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 8+ corresponding lines) podcasts/AnalyticsHelper.swift:102 — podcasts/AnalyticsHelper.swift:102-109 | podcasts/AnalyticsHelper.swift:111-121 | podcasts/AnalyticsHelper.swift:133-140 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) podcasts/ChangeEmailViewController.swift:169 — podcasts/ChangeEmailViewController.swift:169-176 | podcasts/NewEmailViewController.swift:151-158 | podcasts/Syncing/SyncSigninViewController.swift:143-150 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 4+ corresponding lines) Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:15 — Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:15-18 | Pocket Casts TV App/UI/Discover/DiscoverPodcastRow.swift:15-18 | Pocket Casts TV App/UI/Discover/DiscoverSinglePodcastRow.swift:10-13 | Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift:23-26 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 4+ corresponding lines) podcasts/DescriptiveCollectionCell.swift:25 — podcasts/DescriptiveCollectionCell.swift:25-29 | podcasts/DiscoverPodcastTableCell.swift:29-34 | podcasts/LargeListCell.swift:16-19 | podcasts/SmallListCell.swift:30-33 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 5+ corresponding lines) podcasts/DiscoverCollectionHeader.swift:108 — podcasts/DiscoverCollectionHeader.swift:108-112 | podcasts/Theme/Themable Views/ThemeableCollectionCell.swift:29-34 | podcasts/Theme/Themable Views/Themed but not configurable/ThemeLoadingIndicator.swift:4-9 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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, 5+ corresponding lines) podcasts/Podcasts/All Podcasts/Cells/FolderListCell.swift:19 — podcasts/Podcasts/All Podcasts/Cells/FolderListCell.swift:19-23 | podcasts/Podcasts/All Podcasts/Cells/PodcastListCell.swift:14-18 | podcasts/Podcasts/Podcast Page/EpisodeListSearchController.swift:116-120 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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 (6 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 4+ corresponding lines) podcasts/Theme/Themable Views/ThemeableCollectionView.swift:18 — podcasts/Theme/Themable Views/ThemeableCollectionView.swift:18-21 | podcasts/Theme/Themable Views/ThemeableRoundedButton.swift:44-47 | podcasts/Theme/Themable Views/ThemeableTable.swift:31-34 | podcasts/Theme/Themable Views/Themed but not configurable/ThemeSecondaryButton.swift:4-7 | podcasts/ThemeableLabel.swift:39-42 | podcasts/ThemeableUIButton.swift:33-36 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 4+ corresponding lines) podcasts/DownloadsViewController+Table.swift:12 — podcasts/DownloadsViewController+Table.swift:12-15 | podcasts/ListeningHistoryViewController+Table.swift:12-15 | podcasts/New Detail/PlaylistDetailViewController+TableView.swift:16-19 | podcasts/Podcasts/Podcast Page/PodcastViewController+TableData.swift:52-55 | podcasts/StarredViewController+Table.swift:11-14 | podcasts/UploadedViewController+Table.swift:9-12 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:73 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:73-99 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:105-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. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:73` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (27 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:483 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:483-509 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:593-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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:483` 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 (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:84 — Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:84-106 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:109-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. 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 (23 lines × 2) Modules/Sources/PocketCastsServer/Private/API Tasks/ChangeEmailTask.swift:25 — Modules/Sources/PocketCastsServer/Private/API Tasks/ChangeEmailTask.swift:25-47 | Modules/Sources/PocketCastsServer/Private/API Tasks/ChangePasswordTask.swift:25-47 — 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 `Modules/Sources/PocketCastsServer/Private/API Tasks/ChangeEmailTask.swift:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFileDeleteTask.swift:16 — Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFileDeleteTask.swift:16-37 | Modules/Sources/PocketCastsServer/Private/API Tasks/UploadImageDeleteTask.swift:16-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (22 lines × 2) podcasts/Onboarding/Plus/PlusButtonStyles.swift:34 — podcasts/Onboarding/Plus/PlusButtonStyles.swift:34-55 | podcasts/Onboarding/Plus/PlusButtonStyles.swift:82-103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Onboarding/Plus/PlusButtonStyles.swift:34` 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 (21–22 lines × 2) · ×2
  • Duplicated block (21–22 lines × 2) podcasts/PlaylistCellViewModel.swift:29 — podcasts/PlaylistCellViewModel.swift:29-50 | podcasts/PlaylistMetadataLoader/PlaylistMetadataLoader.swift:398-418 — 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 `podcasts/PlaylistMetadataLoader/PlaylistMetadataLoader.swift:398` 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 (21–22 lines × 2) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:103 — podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:103-123 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:753-774 — 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 `podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `podcasts/Podcasts/Podcast Page/PodcastViewController.swift:776` calls `track` and `podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController.swift:124` 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 (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:947 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:947-967 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:352-372 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:947` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `episodes` to `[Episode]` in one and `[UserEpisode]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (21 lines × 2) Pocket Casts TV App/UI/Common/ProfileImage.swift:12 — Pocket Casts TV App/UI/Common/ProfileImage.swift:12-32 | podcasts/Profile - SwiftUI/Common Views/ProfileImage.swift:13-33 — before extracting anything, compare `Pocket Casts TV App/UI/Common/ProfileImage.swift` and `podcasts/Profile - SwiftUI/Common Views/ProfileImage.swift` as WHOLE FILES: 95% 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:918 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:918-937 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:323-342 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:918` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `episodes` to `[Episode]` in one and `[UserEpisode]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (20 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:138 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:138-157 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:330-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:328 — Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:328-338 | Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:351-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11–12 lines × 2) podcasts/PlaylistShortcutsViewController.swift:83 — podcasts/PlaylistShortcutsViewController.swift:83-93 | podcasts/SiriSettingsViewController.swift:80-91 — 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 `podcasts/PlaylistShortcutsViewController.swift:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 11) · ×2
  • Duplicated block (11 lines × 11) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:148 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:148-159 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:180-191 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:308-319 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:340-352 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:354-366 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:390-405 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:421-435 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:464-476 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:570-580 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:877-889 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:933-944 — all 11 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:161` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:193` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 11) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:149 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:149-160 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:181-192 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:309-320 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:341-353 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:355-367 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:393-407 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:424-436 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:465-478 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:532-542 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:571-581 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:934-945 — all 11 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:161` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:193` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:85 — Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:85-96 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:351-362 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:369-380 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:161-171 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 4) Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:19 — Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:19-29 | Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:22-32 | Pocket Casts TV App/UI/Discover/DiscoverPodcastRow.swift:22-32 | Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift:30-40 — before extracting anything, compare `Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift` and `Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 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 `Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) podcasts/Common Components/Lottie Animation Views/PlayPauseLabeledButton.swift:56 — podcasts/Common Components/Lottie Animation Views/PlayPauseLabeledButton.swift:56-66 | podcasts/EpisodeListTableViewCell.swift:114-124 | podcasts/TranscriptViewController.swift:1578-1588 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Common Components/Lottie Animation Views/PlayPauseLabeledButton.swift:56` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) podcasts/Share Profile/ProfilePhotoMenu.swift:34 — podcasts/Share Profile/ProfilePhotoMenu.swift:34-44 | podcasts/Share Profile/ShareProfileView.swift:189-199 | podcasts/Share Profile/ShareProfileView.swift:533-543 — 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 (9–10 lines × 3) · ×2
  • Duplicated block (9–10 lines × 3) Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:341 — Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:341-349 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:371-379 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:396-405 — 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:341` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 3) Modules/Sources/PocketCastsServer/Private/API Tasks/ReferralGetCodeTask.swift:16 — Modules/Sources/PocketCastsServer/Private/API Tasks/ReferralGetCodeTask.swift:16-25 | Modules/Sources/PocketCastsServer/Private/API Tasks/ReferralValidateTask.swift:34-43 | Modules/Sources/PocketCastsServer/Private/API Tasks/WinbackOfferTask.swift:19-27 — 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 `Modules/Sources/PocketCastsServer/Private/API Tasks/ReferralGetCodeTask.swift:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) podcasts/CategorySponsoredCell.swift:39 — podcasts/CategorySponsoredCell.swift:39-47 | podcasts/DiscoverPodcastTableCell.swift:46-55 — 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 `podcasts/CategorySponsoredCell.swift:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) podcasts/Common Components/PodcastHeartView.swift:106 — podcasts/Common Components/PodcastHeartView.swift:106-115 | podcasts/Common Components/PodcastHeartView.swift:121-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Common Components/PodcastHeartView.swift:106` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) podcasts/BundlePodcastCell.swift:9 — podcasts/BundlePodcastCell.swift:9-17 | podcasts/CategorySponsoredCell.swift:14-22 | podcasts/DiscoverPodcastTableCell.swift:9-17 | podcasts/PodcastFilterSelectionCell.swift:13-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (9 lines × 4) podcasts/DownloadsViewController+MultiSelect.swift:25 — podcasts/DownloadsViewController+MultiSelect.swift:25-33 | podcasts/ListeningHistoryViewController+MultiSelect.swift:25-33 | podcasts/Podcasts/Podcast Page/PodcastViewController+MultiSelect.swift:28-36 | podcasts/StarredViewController+Multiselect.swift:25-33 — before extracting anything, compare `podcasts/DownloadsViewController+MultiSelect.swift` and `podcasts/ListeningHistoryViewController+MultiSelect.swift` as WHOLE FILES: 87% 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 3 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.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×2
  • Duplicated block (8 lines × 7) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:524 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:524-531 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:550-557 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:616-623 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:937-944 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:967-974 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1014-1021 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:1047-1054 — all 7 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:524` 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 lines × 7) podcasts/AccountActionCell.swift:74 — podcasts/AccountActionCell.swift:74-81 | podcasts/Common Components/MultiSelect/MultiSelectActionCell.swift:33-40 | podcasts/Common Components/Podcast Selection/PodcastChooserCell.swift:15-22 | podcasts/DiscoverPodcastTableCell.swift:157-164 | podcasts/NewsletterCell.swift:38-45 | podcasts/SmallListCell.swift:49-56 | podcasts/StatsCell.swift:26-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:931 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:931-937 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:961-967 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:336-342 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:366-372 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 (7 lines × 4) podcasts/DescriptiveCollectionCell.swift:79 — podcasts/DescriptiveCollectionCell.swift:79-85 | podcasts/DiscoverFeaturedView.swift:178-184 | podcasts/LargeListCell.swift:122-128 | podcasts/SmallListCell.swift:81-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `podcasts/SmallListCell.swift:78` calls `setNeedsUpdateConstraints` and `podcasts/DescriptiveCollectionCell.swift:76` 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 (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) podcasts/AutoArchiveViewController.swift:90 — podcasts/AutoArchiveViewController.swift:90-96 | podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastArchiveViewController+Table.swift:84-89 — 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 `podcasts/AutoArchiveViewController.swift:90` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastArchiveViewController+Table.swift:82` calls `addArchiveInactiveAction` and `podcasts/AutoArchiveViewController.swift:89` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6–7 lines × 2) podcasts/DescriptiveActionView.swift:90 — podcasts/DescriptiveActionView.swift:90-95 | podcasts/DescriptiveActionView.swift:110-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/DescriptiveActionView.swift:90` 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.
D1 · Cyclomatic Complexity · DatabaseHelper.upgradeIfRequired (cyclomatic 134) · ×1
  • DatabaseHelper.upgradeIfRequired (cyclomatic 134) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:31 — DatabaseHelper.upgradeIfRequired has cyclomatic complexity 134 (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 · NavigationManager.performNavigation (cyclomatic 70) · ×1
  • NavigationManager.performNavigation (cyclomatic 70) podcasts/Main/NavigationManager.swift:121 — NavigationManager.performNavigation has cyclomatic complexity 70 (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 · AppDelegate.setupRoutes (cyclomatic 69) · ×1
  • AppDelegate.setupRoutes (cyclomatic 69) podcasts/AppDelegate+UrlHandling.swift:72 — AppDelegate.setupRoutes has cyclomatic complexity 69 (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 · ServerPodcastManager.update (cyclomatic 61) · ×1
  • ServerPodcastManager.update (cyclomatic 61) Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:36 — ServerPodcastManager.update has cyclomatic complexity 61 (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 · PlaylistQueryBuilder.queryFor (cyclomatic 48) · ×1
  • PlaylistQueryBuilder.queryFor (cyclomatic 48) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:888 — PlaylistQueryBuilder.queryFor has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WatchManager.handleWatchAction (cyclomatic 48) · ×1
  • WatchManager.handleWatchAction (cyclomatic 48) podcasts/Watch Communication/WatchManager.swift:137 — WatchManager.handleWatchAction has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EpisodeFilter.imageName (cyclomatic 41) · ×1
  • EpisodeFilter.imageName (cyclomatic 41) podcasts/EpisodeFilter+Formatting.swift:57 — EpisodeFilter.imageName has cyclomatic complexity 41 (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 · MiniPlayerToFullPlayerAnimator.animateTransition (cyclomatic 41) · ×1
  • MiniPlayerToFullPlayerAnimator.animateTransition (cyclomatic 41) podcasts/MiniPlayerToFullPlayerAnimator.swift:62 — MiniPlayerToFullPlayerAnimator.animateTransition has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDelegate.handleContinue (cyclomatic 40) · ×1
  • AppDelegate.handleContinue (cyclomatic 40) podcasts/AppDelegate+SiriShortcuts.swift:17 — AppDelegate.handleContinue has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AudioReadTask.readFromFile (cyclomatic 37) · ×1
  • AudioReadTask.readFromFile (cyclomatic 37) podcasts/AudioReadTask.swift:189 — AudioReadTask.readFromFile 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 · EpisodeCell.populate (cyclomatic 36) · ×1
  • EpisodeCell.populate (cyclomatic 36) podcasts/Episode Cells/EpisodeCell.swift:242 — EpisodeCell.populate has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultPlayer.configurePlayer (cyclomatic 33) · ×1
  • DefaultPlayer.configurePlayer (cyclomatic 33) podcasts/DefaultPlayer.swift:826 — DefaultPlayer.configurePlayer has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppDelegate.handlePlayMediaIntent (cyclomatic 32) · ×1
  • AppDelegate.handlePlayMediaIntent (cyclomatic 32) podcasts/AppDelegate+SiriShortcuts.swift:132 — AppDelegate.handlePlayMediaIntent 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 · DownloadManager.downloadParallelToStream (cyclomatic 32) · ×1
  • DownloadManager.downloadParallelToStream (cyclomatic 32) podcasts/DownloadManager.swift:329 — DownloadManager.downloadParallelToStream 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 · SyncTask.importPlaylist (cyclomatic 31) · ×1
  • SyncTask.importPlaylist (cyclomatic 31) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift:270 — SyncTask.importPlaylist has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UpNextSyncTask.applyServerChanges (cyclomatic 31) · ×1
  • UpNextSyncTask.applyServerChanges (cyclomatic 31) Modules/Sources/PocketCastsServer/Public/Sync/UpNextSyncTask.swift:185 — UpNextSyncTask.applyServerChanges 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 · FileTypeUtil.fileExtension (cyclomatic 31) · ×1
  • FileTypeUtil.fileExtension (cyclomatic 31) Modules/Sources/PocketCastsUtils/General/FileTypeUtil.swift:5 — FileTypeUtil.fileExtension has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SearchViewModel.search (cyclomatic 31) · ×1
  • SearchViewModel.search (cyclomatic 31) Pocket Casts TV App/UI/Search/SearchViewModel.swift:182 — SearchViewModel.search 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 · PodcastViewController.tableView (cyclomatic 29) · ×1
  • PodcastViewController.tableView (cyclomatic 29) podcasts/Podcasts/Podcast Page/PodcastViewController+TableData.swift:292 — PodcastViewController.tableView has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeneralSettingsViewController.tableView (cyclomatic 28) · ×1
  • GeneralSettingsViewController.tableView (cyclomatic 28) podcasts/GeneralSettingsViewController.swift:91 — GeneralSettingsViewController.tableView has cyclomatic complexity 28 (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 · PlaybackManager.setupRemoteControlSupport (cyclomatic 27) · ×1
  • PlaybackManager.setupRemoteControlSupport (cyclomatic 27) podcasts/PlaybackManager.swift:2015 — PlaybackManager.setupRemoteControlSupport has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HomeGridListItem.handleIsEqual (cyclomatic 27) · ×1
  • HomeGridListItem.handleIsEqual (cyclomatic 27) podcasts/Lists/HomeGridListItem.swift:48 — HomeGridListItem.handleIsEqual has cyclomatic complexity 27 (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 · PodcastViewController.loadLocalEpisodes (cyclomatic 27) · ×1
  • PodcastViewController.loadLocalEpisodes (cyclomatic 27) podcasts/Podcasts/Podcast Page/PodcastViewController.swift:643 — PodcastViewController.loadLocalEpisodes 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 · SyncTask.importEpisode (cyclomatic 25) · ×1
  • SyncTask.importEpisode (cyclomatic 25) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift:172 — SyncTask.importEpisode 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 · NowPlayingPlayerItemViewController.loadActionIntoShelf (cyclomatic 25) · ×1
  • NowPlayingPlayerItemViewController.loadActionIntoShelf (cyclomatic 25) podcasts/NowPlayingPlayerItemViewController+Shelf.swift:55 — NowPlayingPlayerItemViewController.loadActionIntoShelf 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 · FingerprintTimingManager.streamFingerprintGrowing (cyclomatic 25) · ×1
  • FingerprintTimingManager.streamFingerprintGrowing (cyclomatic 25) podcasts/Fingerprint/FingerprintTimingManager.swift:1345 — FingerprintTimingManager.streamFingerprintGrowing 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 · PlaylistQueryBuilder.query (cyclomatic 24) · ×1
  • PlaylistQueryBuilder.query (cyclomatic 24) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:33 — PlaylistQueryBuilder.query 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 · FingerprintTimingManager.performResolve (cyclomatic 23) · ×1
  • FingerprintTimingManager.performResolve (cyclomatic 23) podcasts/Fingerprint/FingerprintTimingManager.swift:485 — FingerprintTimingManager.performResolve 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 · PodcastViewController.tableView (cyclomatic 23) · ×1
  • PodcastViewController.tableView (cyclomatic 23) podcasts/Podcasts/Podcast Page/PodcastViewController+TableData.swift:126 — PodcastViewController.tableView 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 · PodcastSettingsViewController.tableView (cyclomatic 23) · ×1
  • PodcastSettingsViewController.tableView (cyclomatic 23) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift:32 — PodcastSettingsViewController.tableView 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 · PlayerAction.title (cyclomatic 22) · ×1
  • PlayerAction.title (cyclomatic 22) podcasts/Enumerations.swift:241 — PlayerAction.title has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Podcast.from (cyclomatic 22) · ×1
  • Podcast.from (cyclomatic 22) Modules/Sources/PocketCastsDataModel/Public/Model/Podcast+fromDictionary.swift:5 — Podcast.from has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DownloadManager.performDownload (cyclomatic 22) · ×1
  • DownloadManager.performDownload (cyclomatic 22) podcasts/DownloadManager.swift:485 — DownloadManager.performDownload has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProfileViewController.tableView (cyclomatic 22) · ×1
  • ProfileViewController.tableView (cyclomatic 22) podcasts/ProfileViewController.swift:325 — ProfileViewController.tableView 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 · PlaylistPreviewViewModel.ruleText (cyclomatic 22) · ×1
  • PlaylistPreviewViewModel.ruleText (cyclomatic 22) podcasts/New Creation/New Preview/PlaylistPreviewViewModel.swift:75 — PlaylistPreviewViewModel.ruleText has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AttributedStringBuilder.appendChild (cyclomatic 21) · ×1
  • AttributedStringBuilder.appendChild (cyclomatic 21) Modules/Sources/PocketCastsServer/Public/Helpers/HTMLToAttributedStringConverter.swift:107 — AttributedStringBuilder.appendChild 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 · HomeGridDataHelper.gridListItems (cyclomatic 21) · ×1
  • HomeGridDataHelper.gridListItems (cyclomatic 21) podcasts/HomeGridDataHelper.swift:16 — HomeGridDataHelper.gridListItems 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 · PlayerContainerViewController.updateLargeScreenTabs (cyclomatic 21) · ×1
  • PlayerContainerViewController.updateLargeScreenTabs (cyclomatic 21) podcasts/PlayerContainerViewController+LargeScreen.swift:210 — PlayerContainerViewController.updateLargeScreenTabs 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 · WhatsNewPageView.commonInit (cyclomatic 21) · ×1
  • WhatsNewPageView.commonInit (cyclomatic 21) podcasts/WhatsNewPageView.swift:31 — WhatsNewPageView.commonInit 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 · PlayerAction.iconName (cyclomatic 20) · ×1
  • PlayerAction.iconName (cyclomatic 20) podcasts/Enumerations.swift:302 — PlayerAction.iconName has cyclomatic complexity 20 (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. This shape REPEATS in the file: one other method here (PlayerAction.largeIconName) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · PlayerAction.largeIconName (cyclomatic 20) · ×1
  • PlayerAction.largeIconName (cyclomatic 20) podcasts/Enumerations.swift:338 — PlayerAction.largeIconName has cyclomatic complexity 20 (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. This shape REPEATS in the file: one other method here (PlayerAction.iconName) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · SyncTask.processServerData (cyclomatic 20) · ×1
  • SyncTask.processServerData (cyclomatic 20) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift:7 — SyncTask.processServerData 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 · DownloadManager.addToQueue (cyclomatic 20) · ×1
  • DownloadManager.addToQueue (cyclomatic 20) podcasts/DownloadManager.swift:222 — DownloadManager.addToQueue 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 · NotificationType.checkCancelConditionsForEvent (cyclomatic 20) · ×1
  • NotificationType.checkCancelConditionsForEvent (cyclomatic 20) podcasts/Notifications/NotificationsCoordinator+AnalyticsAdapter.swift:59 — NotificationType.checkCancelConditionsForEvent has cyclomatic complexity 20 (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 · FingerprintTimingManager.resolveReferenceTime (cyclomatic 19) · ×1
  • FingerprintTimingManager.resolveReferenceTime (cyclomatic 19) podcasts/Fingerprint/FingerprintTimingManager.swift:689 — FingerprintTimingManager.resolveReferenceTime has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SearchResultCell.rowContent (cyclomatic 19) · ×1
  • SearchResultCell.rowContent (cyclomatic 19) podcasts/New Search/Views/Results/SearchResultCell.swift:153 — SearchResultCell.rowContent has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArchiveHelper.applyAutoArchivingToPodcast (cyclomatic 18) · ×1
  • ArchiveHelper.applyAutoArchivingToPodcast (cyclomatic 18) podcasts/ArchiveHelper.swift:28 — ArchiveHelper.applyAutoArchivingToPodcast 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 · DiscoverCollectionViewController.populateFrom (cyclomatic 18) · ×1
  • DiscoverCollectionViewController.populateFrom (cyclomatic 18) podcasts/DiscoverCollectionViewController.swift:99 — DiscoverCollectionViewController.populateFrom 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 · SupporterContributionsViewController.tableView (cyclomatic 18) · ×1
  • SupporterContributionsViewController.tableView (cyclomatic 18) podcasts/SupporterContributionsViewController.swift:47 — SupporterContributionsViewController.tableView 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 · MainEpisodeActionView.populateFrom (cyclomatic 18) · ×1
  • MainEpisodeActionView.populateFrom (cyclomatic 18) podcasts/Common Components/MainEpisodeActionView.swift:96 — MainEpisodeActionView.populateFrom 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 · QALaunchHooks.apply (cyclomatic 18) · ×1
  • QALaunchHooks.apply (cyclomatic 18) podcasts/Developer Menu/QALaunchHooks.swift:166 — QALaunchHooks.apply 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 · PlaylistCell.body (cyclomatic 18) · ×1
  • PlaylistCell.body (cyclomatic 18) Pocket Casts TV App/UI/Playlists/PlaylistCell.swift:23 — PlaylistCell.body 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 · RetrieveCustomFilesTask.processServerEpisodes (cyclomatic 17) · ×1
  • RetrieveCustomFilesTask.processServerEpisodes (cyclomatic 17) Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveCustomFilesTask.swift:58 — RetrieveCustomFilesTask.processServerEpisodes 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 · AppDelegate.openSharePath (cyclomatic 17) · ×1
  • AppDelegate.openSharePath (cyclomatic 17) podcasts/AppDelegate+UrlHandling.swift:490 — AppDelegate.openSharePath 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 · EpisodesDataManager.episodes (cyclomatic 17) · ×1
  • EpisodesDataManager.episodes (cyclomatic 17) podcasts/EpisodesDataManager.swift:36 — EpisodesDataManager.episodes 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 · PlaybackManager.handleRouteChanged (cyclomatic 17) · ×1
  • PlaybackManager.handleRouteChanged (cyclomatic 17) podcasts/PlaybackManager.swift:2268 — PlaybackManager.handleRouteChanged 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 · PodcastManager.checkForEpisodesToDownload (cyclomatic 17) · ×1
  • PodcastManager.checkForEpisodesToDownload (cyclomatic 17) podcasts/PodcastManager.swift:141 — PodcastManager.checkForEpisodesToDownload 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 · ShelfActionsViewController.tableView (cyclomatic 17) · ×1
  • ShelfActionsViewController.tableView (cyclomatic 17) podcasts/ShelfActionsViewController+Table.swift:30 — ShelfActionsViewController.tableView 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. This is NOT this file's highest cyclomatic complexity: ShelfActionsViewController.tableView (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NotificationsHelper.handleEpisodeNotification (cyclomatic 17) · ×1
  • NotificationsHelper.handleEpisodeNotification (cyclomatic 17) podcasts/Utilities/NotificationsHelper.swift:140 — NotificationsHelper.handleEpisodeNotification 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 · WatchManager.sendStateToWatch (cyclomatic 17) · ×1
  • WatchManager.sendStateToWatch (cyclomatic 17) podcasts/Watch Communication/WatchManager.swift:583 — WatchManager.sendStateToWatch 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 · SearchResultsView.body (cyclomatic 17) · ×1
  • SearchResultsView.body (cyclomatic 17) Pocket Casts TV App/UI/Search/SearchResultsView.swift:35 — SearchResultsView.body 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 · FileTypeUtil.typeForFileExtension (cyclomatic 16) · ×1
  • FileTypeUtil.typeForFileExtension (cyclomatic 16) Modules/Sources/PocketCastsUtils/General/FileTypeUtil.swift:44 — FileTypeUtil.typeForFileExtension has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DatabaseHelper.upgradeIfRequired (cognitive 198) · ×1
  • DatabaseHelper.upgradeIfRequired (cognitive 198) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:31 — DatabaseHelper.upgradeIfRequired has cognitive complexity 198 (threshold 15). Drivers by points: error handling 65 (130 pts), if/else 68 (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerPodcastManager.update (cognitive 97) · ×1
  • ServerPodcastManager.update (cognitive 97) Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:36 — ServerPodcastManager.update has cognitive complexity 97 (threshold 15). Drivers by points: if/else 46 (81 pts), boolean chains 15, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NavigationManager.performNavigation (cognitive 92) · ×1
  • NavigationManager.performNavigation (cognitive 92) podcasts/Main/NavigationManager.swift:121 — NavigationManager.performNavigation has cognitive complexity 92 (threshold 15). Drivers by points: if/else 59 (81 pts), boolean chains 11 (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 · AppDelegate.setupRoutes (cognitive 82) · ×1
  • AppDelegate.setupRoutes (cognitive 82) podcasts/AppDelegate+UrlHandling.swift:72 — AppDelegate.setupRoutes has cognitive complexity 82 (threshold 15). Drivers by points: if/else 51 (58 pts), boolean chains 23, ternaries 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlaylistQueryBuilder.queryFor (cognitive 76) · ×1
  • PlaylistQueryBuilder.queryFor (cognitive 76) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:888 — PlaylistQueryBuilder.queryFor has cognitive complexity 76 (threshold 15). Drivers by points: if/else 35 (57 pts), boolean chains 9, ternaries 2 (6 pts), loops 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.handleContinue (cognitive 68) · ×1
  • AppDelegate.handleContinue (cognitive 68) podcasts/AppDelegate+SiriShortcuts.swift:17 — AppDelegate.handleContinue has cognitive complexity 68 (threshold 15). Drivers by points: if/else 28 (57 pts), boolean chains 11 (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 · WatchManager.handleWatchAction (cognitive 67) · ×1
  • WatchManager.handleWatchAction (cognitive 67) podcasts/Watch Communication/WatchManager.swift:137 — WatchManager.handleWatchAction has cognitive complexity 67 (threshold 15). Drivers by points: if/else 45 (63 pts), boolean chains 2, ternaries 1 (2 pts) (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 · AudioReadTask.readFromFile (cognitive 66) · ×1
  • AudioReadTask.readFromFile (cognitive 66) podcasts/AudioReadTask.swift:189 — AudioReadTask.readFromFile has cognitive complexity 66 (threshold 15). Drivers by points: if/else 24 (33 pts), loops 5 (18 pts), boolean chains 11, ternaries 1 (3 pts), error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent 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 · EpisodeCell.populate (cognitive 61) · ×1
  • EpisodeCell.populate (cognitive 61) podcasts/Episode Cells/EpisodeCell.swift:242 — EpisodeCell.populate has cognitive complexity 61 (threshold 15). Drivers by points: if/else 33 (49 pts), boolean chains 12 (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 · PodcastViewController.tableView (cognitive 58) · ×1
  • PodcastViewController.tableView (cognitive 58) podcasts/Podcasts/Podcast Page/PodcastViewController+TableData.swift:292 — PodcastViewController.tableView has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (49 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 34). 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 · SearchViewModel.search (cognitive 56) · ×1
  • SearchViewModel.search (cognitive 56) Pocket Casts TV App/UI/Search/SearchViewModel.swift:182 — SearchViewModel.search has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 3 (6 pts), match/switch 2 (6 pts), boolean chains 4, ternaries 2 (4 pts), error handling 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpNextSyncTask.applyServerChanges (cognitive 54) · ×1
  • UpNextSyncTask.applyServerChanges (cognitive 54) Modules/Sources/PocketCastsServer/Public/Sync/UpNextSyncTask.swift:185 — UpNextSyncTask.applyServerChanges has cognitive complexity 54 (threshold 15). Drivers by points: if/else 23 (41 pts), boolean chains 5, loops 2 (4 pts), ternaries 3 (4 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 · AppDelegate.handlePlayMediaIntent (cognitive 52) · ×1
  • AppDelegate.handlePlayMediaIntent (cognitive 52) podcasts/AppDelegate+SiriShortcuts.swift:132 — AppDelegate.handlePlayMediaIntent has cognitive complexity 52 (threshold 15). Drivers by points: if/else 27 (45 pts), boolean chains 7 (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 · FingerprintTimingManager.streamFingerprintGrowing (cognitive 52) · ×1
  • FingerprintTimingManager.streamFingerprintGrowing (cognitive 52) podcasts/Fingerprint/FingerprintTimingManager.swift:1345 — FingerprintTimingManager.streamFingerprintGrowing has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (45 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaylistQueryBuilder.query (cognitive 50) · ×1
  • PlaylistQueryBuilder.query (cognitive 50) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:33 — PlaylistQueryBuilder.query has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 6 (22 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaylistShortcutsViewController.getEnabledShortcuts (cognitive 48) · ×1
  • PlaylistShortcutsViewController.getEnabledShortcuts (cognitive 48) podcasts/PlaylistShortcutsViewController.swift:144 — PlaylistShortcutsViewController.getEnabledShortcuts has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (46 pts), loops 1 (2 pts) (nesting depth added 34). 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 · HomeGridDataHelper.gridListItems (cognitive 47) · ×1
  • HomeGridDataHelper.gridListItems (cognitive 47) podcasts/HomeGridDataHelper.swift:16 — HomeGridDataHelper.gridListItems has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (12 pts), ternaries 2 (9 pts), boolean chains 3, match/switch 1 (nesting depth added 26). 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 · MiniPlayerToFullPlayerAnimator.animateTransition (cognitive 47) · ×1
  • MiniPlayerToFullPlayerAnimator.animateTransition (cognitive 47) podcasts/MiniPlayerToFullPlayerAnimator.swift:62 — MiniPlayerToFullPlayerAnimator.animateTransition has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 26 (31 pts), if/else 11 (14 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PodcastViewController.loadLocalEpisodes (cognitive 47) · ×1
  • PodcastViewController.loadLocalEpisodes (cognitive 47) podcasts/Podcasts/Podcast Page/PodcastViewController.swift:643 — PodcastViewController.loadLocalEpisodes has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 4 (15 pts), boolean chains 7, match/switch 1 (3 pts), error handling 1 (2 pts), loops 1 (2 pts) (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 · DefaultPlayer.configurePlayer (cognitive 42) · ×1
  • DefaultPlayer.configurePlayer (cognitive 42) podcasts/DefaultPlayer.swift:826 — DefaultPlayer.configurePlayer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 12 (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 · EpisodeFilter.imageName (cognitive 40) · ×1
  • EpisodeFilter.imageName (cognitive 40) podcasts/EpisodeFilter+Formatting.swift:57 — EpisodeFilter.imageName has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 32, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DiscoverCollectionViewController.populateFrom (cognitive 40) · ×1
  • DiscoverCollectionViewController.populateFrom (cognitive 40) podcasts/DiscoverCollectionViewController.swift:99 — DiscoverCollectionViewController.populateFrom has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (2 pts) (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 · SyncTask.importEpisode (cognitive 37) · ×1
  • SyncTask.importEpisode (cognitive 37) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift:172 — SyncTask.importEpisode has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 9 (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 · DownloadManager.downloadParallelToStream (cognitive 37) · ×1
  • DownloadManager.downloadParallelToStream (cognitive 37) podcasts/DownloadManager.swift:329 — DownloadManager.downloadParallelToStream has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 11, ternaries 1 (2 pts), loops 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 · GridLayout.prepare (cognitive 36) · ×1
  • GridLayout.prepare (cognitive 36) podcasts/GridLayout.swift:91 — GridLayout.prepare has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 2 (3 pts), boolean chains 2 (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 · WhatsNewPageView.commonInit (cognitive 36) · ×1
  • WhatsNewPageView.commonInit (cognitive 36) podcasts/WhatsNewPageView.swift:31 — WhatsNewPageView.commonInit has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 6, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaybackManager.setupRemoteControlSupport (cognitive 35) · ×1
  • PlaybackManager.setupRemoteControlSupport (cognitive 35) podcasts/PlaybackManager.swift:2015 — PlaybackManager.setupRemoteControlSupport has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 10 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PodcastViewController.tableView (cognitive 35) · ×1
  • PodcastViewController.tableView (cognitive 35) podcasts/Podcasts/Podcast Page/PodcastViewController+TableData.swift:126 — PodcastViewController.tableView has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (32 pts), match/switch 2 (3 pts) (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 · SyncTask.importPlaylist (cognitive 33) · ×1
  • SyncTask.importPlaylist (cognitive 33) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift:270 — SyncTask.importPlaylist has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30 (32 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RetrieveCustomFilesTask.processServerEpisodes (cognitive 31) · ×1
  • RetrieveCustomFilesTask.processServerEpisodes (cognitive 31) Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveCustomFilesTask.swift:58 — RetrieveCustomFilesTask.processServerEpisodes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 4, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileTypeUtil.fileExtension (cognitive 30) · ×1
  • FileTypeUtil.fileExtension (cognitive 30) Modules/Sources/PocketCastsUtils/General/FileTypeUtil.swift:5 — FileTypeUtil.fileExtension has cognitive complexity 30 (threshold 15). Drivers by points: if/else 30. 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 · FingerprintReferenceRetriever.performFetch (cognitive 30) · ×1
  • FingerprintReferenceRetriever.performFetch (cognitive 30) podcasts/Fingerprint/FingerprintReferenceRetriever.swift:33 — FingerprintReferenceRetriever.performFetch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), error handling 4 (10 pts), loops 1 (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 · SupporterContributionsViewController.tableView (cognitive 28) · ×1
  • SupporterContributionsViewController.tableView (cognitive 28) podcasts/SupporterContributionsViewController.swift:47 — SupporterContributionsViewController.tableView has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpNextViewController.tableView (cognitive 28) · ×1
  • UpNextViewController.tableView (cognitive 28) podcasts/UpNextViewController+Table.swift:106 — UpNextViewController.tableView has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 4 (nesting depth added 13). 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 · PlaylistPreviewViewModel.ruleText (cognitive 28) · ×1
  • PlaylistPreviewViewModel.ruleText (cognitive 28) podcasts/New Creation/New Preview/PlaylistPreviewViewModel.swift:75 — PlaylistPreviewViewModel.ruleText has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EpisodeDataManager.saveBulkEpisodeSyncInfo (cognitive 27) · ×1
  • EpisodeDataManager.saveBulkEpisodeSyncInfo (cognitive 27) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:574 — EpisodeDataManager.saveBulkEpisodeSyncInfo has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaybackManager.playerDidFinishPlayingEpisode (cognitive 27) · ×1
  • PlaybackManager.playerDidFinishPlayingEpisode (cognitive 27) podcasts/PlaybackManager.swift:1375 — PlaybackManager.playerDidFinishPlayingEpisode has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (27 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WatchManager.sendStateToWatch (cognitive 27) · ×1
  • WatchManager.sendStateToWatch (cognitive 27) podcasts/Watch Communication/WatchManager.swift:583 — WatchManager.sendStateToWatch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, error handling 1 (2 pts), ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GridHelper.collectionView (cognitive 27) · ×1
  • GridHelper.collectionView (cognitive 27) podcasts/Podcasts/Helpers/GridHelper.swift:43 — GridHelper.collectionView has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (12 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpNextListComparator.compare (cognitive 26) · ×1
  • UpNextListComparator.compare (cognitive 26) Modules/Sources/PocketCastsDataModel/Public/UpNextListComparator.swift:12 — UpNextListComparator.compare has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EpisodeDataManager.bulkArchive (cognitive 26) · ×1
  • EpisodeDataManager.bulkArchive (cognitive 26) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:976 — EpisodeDataManager.bulkArchive has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeGridListItem.handleIsEqual (cognitive 26) · ×1
  • HomeGridListItem.handleIsEqual (cognitive 26) podcasts/Lists/HomeGridListItem.swift:48 — HomeGridListItem.handleIsEqual has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 23, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SearchResultCell.rowContent (cognitive 26) · ×1
  • SearchResultCell.rowContent (cognitive 26) podcasts/New Search/Views/Results/SearchResultCell.swift:153 — SearchResultCell.rowContent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 4, ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncSettingsTask.process (cognitive 25) · ×1
  • SyncSettingsTask.process (cognitive 25) Modules/Sources/PocketCastsServer/Public/Sync/SyncSettingsTask.swift:52 — SyncSettingsTask.process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArchiveHelper.applyAutoArchivingToPodcast (cognitive 25) · ×1
  • ArchiveHelper.applyAutoArchivingToPodcast (cognitive 25) podcasts/ArchiveHelper.swift:28 — ArchiveHelper.applyAutoArchivingToPodcast has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 4 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpNextViewController.tableView (cognitive 25) · ×1
  • UpNextViewController.tableView (cognitive 25) podcasts/UpNextViewController+Swipe.swift:8 — UpNextViewController.tableView has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, error handling 1 (3 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UpNextSyncTask.createUpNextSyncRequest (cognitive 24) · ×1
  • UpNextSyncTask.createUpNextSyncRequest (cognitive 24) Modules/Sources/PocketCastsServer/Public/Sync/UpNextSyncTask.swift:107 — UpNextSyncTask.createUpNextSyncRequest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 1 (3 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 · EpisodesDataManager.episodes (cognitive 24) · ×1
  • EpisodesDataManager.episodes (cognitive 24) podcasts/EpisodesDataManager.swift:36 — EpisodesDataManager.episodes has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 5 (8 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MainEpisodeActionView.populateFrom (cognitive 24) · ×1
  • MainEpisodeActionView.populateFrom (cognitive 24) podcasts/Common Components/MainEpisodeActionView.swift:96 — MainEpisodeActionView.populateFrom has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12, ternaries 4 (8 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlaylistCell.body (cognitive 24) · ×1
  • PlaylistCell.body (cognitive 24) Pocket Casts TV App/UI/Playlists/PlaylistCell.swift:23 — PlaylistCell.body has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 13 (20 pts), boolean chains 2, if/else 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RefreshOperation.main (cognitive 23) · ×1
  • RefreshOperation.main (cognitive 23) Modules/Sources/PocketCastsServer/Public/Refresh/RefreshOperation.swift:25 — RefreshOperation.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadManager.performDownload (cognitive 23) · ×1
  • DownloadManager.performDownload (cognitive 23) podcasts/DownloadManager.swift:485 — DownloadManager.performDownload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, ternaries 6 (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.
D2 · Cognitive Complexity · PlayerContainerViewController.updateLargeScreenTabs (cognitive 23) · ×1
  • PlayerContainerViewController.updateLargeScreenTabs (cognitive 23) podcasts/PlayerContainerViewController+LargeScreen.swift:210 — PlayerContainerViewController.updateLargeScreenTabs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, ternaries 4 (5 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PodcastManager.checkForEpisodesToDownload (cognitive 23) · ×1
  • PodcastManager.checkForEpisodesToDownload (cognitive 23) podcasts/PodcastManager.swift:141 — PodcastManager.checkForEpisodesToDownload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, loops 1, ternaries 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 · NotificationsHelper.handleEpisodeNotification (cognitive 23) · ×1
  • NotificationsHelper.handleEpisodeNotification (cognitive 23) podcasts/Utilities/NotificationsHelper.swift:140 — NotificationsHelper.handleEpisodeNotification has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Podcast.from (cognitive 22) · ×1
  • Podcast.from (cognitive 22) Modules/Sources/PocketCastsDataModel/Public/Model/Podcast+fromDictionary.swift:5 — Podcast.from has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (19 pts), ternaries 2, 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 · ValidatePromoCodeTask.validatePromoCode (cognitive 22) · ×1
  • ValidatePromoCodeTask.validatePromoCode (cognitive 22) Modules/Sources/PocketCastsServer/Public/API/ValidatePromoCodeHandler.swift:7 — ValidatePromoCodeTask.validatePromoCode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 3 (7 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AttributedStringBuilder.appendChild (cognitive 22) · ×1
  • AttributedStringBuilder.appendChild (cognitive 22) Modules/Sources/PocketCastsServer/Public/Helpers/HTMLToAttributedStringConverter.swift:107 — AttributedStringBuilder.appendChild has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncTask.performHomeGridRefresh (cognitive 22) · ×1
  • SyncTask.performHomeGridRefresh (cognitive 22) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask.swift:74 — SyncTask.performHomeGridRefresh has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.openSharePath (cognitive 22) · ×1
  • AppDelegate.openSharePath (cognitive 22) podcasts/AppDelegate+UrlHandling.swift:490 — AppDelegate.openSharePath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, ternaries 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 · DownloadManager.addToQueue (cognitive 22) · ×1
  • DownloadManager.addToQueue (cognitive 22) podcasts/DownloadManager.swift:222 — DownloadManager.addToQueue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DownloadManager.urlSession (cognitive 22) · ×1
  • DownloadManager.urlSession (cognitive 22) podcasts/DownloadManager+URLSessionDelegate.swift:218 — DownloadManager.urlSession has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 5 (6 pts), match/switch 1 (3 pts), boolean chains 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 · PlaybackManager.progressTimerFired (cognitive 22) · ×1
  • PlaybackManager.progressTimerFired (cognitive 22) podcasts/PlaybackManager.swift:1744 — PlaybackManager.progressTimerFired has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TranscriptViewController.styleText (cognitive 22) · ×1
  • TranscriptViewController.styleText (cognitive 22) podcasts/TranscriptViewController.swift:950 — TranscriptViewController.styleText has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 4 (5 pts), boolean chains 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 · CarPlaySceneDelegate.convertToListItems (cognitive 22) · ×1
  • CarPlaySceneDelegate.convertToListItems (cognitive 22) podcasts/CarPlay/CarPlaySceneDelegate+Convert.swift:7 — CarPlaySceneDelegate.convertToListItems has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AVFileUtil.processArtwork (cognitive 22) · ×1
  • AVFileUtil.processArtwork (cognitive 22) podcasts/Utilities/AVFileUtil.swift:54 — AVFileUtil.processArtwork has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchResultsView.body (cognitive 22) · ×1
  • SearchResultsView.body (cognitive 22) Pocket Casts TV App/UI/Search/SearchResultsView.swift:35 — SearchResultsView.body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalSearchViewModel.filterPodcasts (cognitive 22) · ×1
  • LocalSearchViewModel.filterPodcasts (cognitive 22) podcasts/New Search/Views/Results/LocalSearchViewModel.swift:365 — LocalSearchViewModel.filterPodcasts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RefreshOperation.performRefresh (cognitive 21) · ×1
  • RefreshOperation.performRefresh (cognitive 21) Modules/Sources/PocketCastsServer/Public/Refresh/RefreshOperation.swift:130 — RefreshOperation.performRefresh has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 1, ternaries 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 · SyncSettingsTask.apiTokenAcquired (cognitive 21) · ×1
  • SyncSettingsTask.apiTokenAcquired (cognitive 21) Modules/Sources/PocketCastsServer/Public/Sync/SyncSettingsTask.swift:8 — SyncSettingsTask.apiTokenAcquired has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NowPlayingPlayerItemViewController.loadActionIntoShelf (cognitive 21) · ×1
  • NowPlayingPlayerItemViewController.loadActionIntoShelf (cognitive 21) podcasts/NowPlayingPlayerItemViewController+Shelf.swift:55 — NowPlayingPlayerItemViewController.loadActionIntoShelf has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 4 (7 pts), match/switch 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 · PlaybackManager.refreshRemoteCommands (cognitive 21) · ×1
  • PlaybackManager.refreshRemoteCommands (cognitive 21) podcasts/PlaybackManager.swift:2126 — PlaybackManager.refreshRemoteCommands has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlaybackManager.handleRouteChanged (cognitive 21) · ×1
  • PlaybackManager.handleRouteChanged (cognitive 21) podcasts/PlaybackManager.swift:2268 — PlaybackManager.handleRouteChanged has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8 (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 · ShelfActionsViewController.tableView (cognitive 21) · ×1
  • ShelfActionsViewController.tableView (cognitive 21) podcasts/ShelfActionsViewController+Table.swift:30 — ShelfActionsViewController.tableView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TranscriptViewController.loadTranscript (cognitive 21) · ×1
  • TranscriptViewController.loadTranscript (cognitive 21) podcasts/TranscriptViewController.swift:760 — TranscriptViewController.loadTranscript has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaylistDetailViewController.tableView (cognitive 21) · ×1
  • PlaylistDetailViewController.tableView (cognitive 21) podcasts/New Detail/PlaylistDetailViewController+TableView.swift:203 — PlaylistDetailViewController.tableView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PodcastSettingsViewController.tableView (cognitive 21) · ×1
  • PodcastSettingsViewController.tableView (cognitive 21) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift:32 — PodcastSettingsViewController.tableView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), boolean chains 2, 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 · BaseEpisode.commonDisplayableInfo (cognitive 20) · ×1
  • BaseEpisode.commonDisplayableInfo (cognitive 20) podcasts/BaseEpisode+Formatting.swift:34 — BaseEpisode.commonDisplayableInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncTask.processServerData (cognitive 20) · ×1
  • SyncTask.processServerData (cognitive 20) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift:7 — SyncTask.processServerData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 6, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDelegate.handleOpenUrl (cognitive 20) · ×1
  • AppDelegate.handleOpenUrl (cognitive 20) podcasts/AppDelegate+UrlHandling.swift:26 — AppDelegate.handleOpenUrl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlaybackManager.seekTo (cognitive 20) · ×1
  • PlaybackManager.seekTo (cognitive 20) podcasts/PlaybackManager.swift:551 — PlaybackManager.seekTo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6 (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 · PlayerContainerViewController.panGestureRecognizerHandler (cognitive 20) · ×1
  • PlayerContainerViewController.panGestureRecognizerHandler (cognitive 20) podcasts/PlayerContainerViewController+Gestures.swift:9 — PlayerContainerViewController.panGestureRecognizerHandler has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, 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 · FingerprintTimingManager.performResolve (cognitive 20) · ×1
  • FingerprintTimingManager.performResolve (cognitive 20) podcasts/Fingerprint/FingerprintTimingManager.swift:485 — FingerprintTimingManager.performResolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, error handling 2, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · IAPHelper.paymentQueue (cognitive 20) · ×1
  • IAPHelper.paymentQueue (cognitive 20) podcasts/InAppPurchases/IAPHelper.swift:508 — IAPHelper.paymentQueue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (3 pts), boolean chains 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 · PairingSession.start (cognitive 20) · ×1
  • PairingSession.start (cognitive 20) Pocket Casts TV App/UI/Auth/PairingSession.swift:37 — PairingSession.start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 3 (6 pts), 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 · PlaylistQueryBuilder.buildPlayingStatusQuery (cognitive 19) · ×1
  • PlaylistQueryBuilder.buildPlayingStatusQuery (cognitive 19) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:735 — PlaylistQueryBuilder.buildPlayingStatusQuery has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6 (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 · ServerPodcastManager.addEpisode (cognitive 19) · ×1
  • ServerPodcastManager.addEpisode (cognitive 19) Modules/Sources/PocketCastsServer/Public/ServerPodcastManager.swift:255 — ServerPodcastManager.addEpisode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6 (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 · UpNextSyncTask.convertToProto (cognitive 19) · ×1
  • UpNextSyncTask.convertToProto (cognitive 19) Modules/Sources/PocketCastsServer/Public/Sync/UpNextSyncTask.swift:437 — UpNextSyncTask.convertToProto has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UploadManager.urlSession (cognitive 19) · ×1
  • UploadManager.urlSession (cognitive 19) Modules/Sources/PocketCastsServer/Public/Upload/UploadManager+URLSessionDelegate.swift:32 — UploadManager.urlSession has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadsViewController.tableView (cognitive 19) · ×1
  • DownloadsViewController.tableView (cognitive 19) podcasts/DownloadsViewController+Table.swift:79 — DownloadsViewController.tableView has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EpisodeManager.bulkMarkAsPlayed (cognitive 19) · ×1
  • EpisodeManager.bulkMarkAsPlayed (cognitive 19) podcasts/EpisodeManager.swift:43 — EpisodeManager.bulkMarkAsPlayed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MiniPlayerViewController.playbackProgressDidChange (cognitive 19) · ×1
  • MiniPlayerViewController.playbackProgressDidChange (cognitive 19) podcasts/MiniPlayerViewController.swift:883 — MiniPlayerViewController.playbackProgressDidChange has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 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 · FingerprintTimingManager.resolveReferenceTime (cognitive 19) · ×1
  • FingerprintTimingManager.resolveReferenceTime (cognitive 19) podcasts/Fingerprint/FingerprintTimingManager.swift:689 — FingerprintTimingManager.resolveReferenceTime has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, error handling 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PlaylistDetailViewController.tableView (cognitive 19) · ×1
  • PlaylistDetailViewController.tableView (cognitive 19) podcasts/New Detail/PlaylistDetailViewController+TableView.swift:53 — PlaylistDetailViewController.tableView has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscoverCategoryCell.body (cognitive 19) · ×1
  • DiscoverCategoryCell.body (cognitive 19) Pocket Casts TV App/UI/Discover/DiscoverCategoryCell.swift:24 — DiscoverCategoryCell.body has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (15 pts), boolean chains 2, if/else 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NewPlaylistViewController.createManualPlaylist (cognitive 19) · ×1
  • NewPlaylistViewController.createManualPlaylist (cognitive 19) podcasts/New Creation/New Playlist/NewPlaylistViewController.swift:226 — NewPlaylistViewController.createManualPlaylist has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PodcastFeedViewModel.checkIfNewEpisodesAreAvailable (cognitive 19) · ×1
  • PodcastFeedViewModel.checkIfNewEpisodesAreAvailable (cognitive 19) podcasts/Podcasts/Podcast Page/PodcastFeedViewModel.swift:37 — PodcastFeedViewModel.checkIfNewEpisodesAreAvailable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (8 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchResultsView.body (cognitive 19) · ×1
  • SearchResultsView.body (cognitive 19) podcasts/New Search/Views/Results/SearchResultsView.swift:11 — SearchResultsView.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerAction.title (cognitive 18) · ×1
  • PlayerAction.title (cognitive 18) podcasts/Enumerations.swift:241 — PlayerAction.title has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 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 · RefreshOperation.processAutoAddUpNextCandidates (cognitive 18) · ×1
  • RefreshOperation.processAutoAddUpNextCandidates (cognitive 18) Modules/Sources/PocketCastsServer/Public/Refresh/RefreshOperation.swift:205 — RefreshOperation.processAutoAddUpNextCandidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackgroundSyncManager.urlSession (cognitive 18) · ×1
  • BackgroundSyncManager.urlSession (cognitive 18) Modules/Sources/PocketCastsServer/Public/Sync/BackgroundSyncManager+URLSession.swift:24 — BackgroundSyncManager.urlSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioPlayTask.scheduleNextBuffer (cognitive 18) · ×1
  • AudioPlayTask.scheduleNextBuffer (cognitive 18) podcasts/AudioPlayTask.swift:60 — AudioPlayTask.scheduleNextBuffer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadedFilesViewController.tableView (cognitive 18) · ×1
  • DownloadedFilesViewController.tableView (cognitive 18) podcasts/DownloadedFilesViewController.swift:59 — DownloadedFilesViewController.tableView has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (13 pts), match/switch 2 (3 pts), if/else 2 (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 · EffectsPlayer.play (cognitive 18) · ×1
  • EffectsPlayer.play (cognitive 18) podcasts/EffectsPlayer.swift:76 — EffectsPlayer.play has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeaturedSummaryViewController.populateFrom (cognitive 18) · ×1
  • FeaturedSummaryViewController.populateFrom (cognitive 18) podcasts/FeaturedSummaryViewController.swift:194 — FeaturedSummaryViewController.populateFrom has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (3 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 · UserEpisodeManager.updateUserEpisodeImage (cognitive 18) · ×1
  • UserEpisodeManager.updateUserEpisodeImage (cognitive 18) podcasts/UserEpisodeManager.swift:179 — UserEpisodeManager.updateUserEpisodeImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NowPlayingWaveformView.body (cognitive 18) · ×1
  • NowPlayingWaveformView.body (cognitive 18) Pocket Casts TV App/UI/Player/NowPlayingWaveformView.swift:41 — NowPlayingWaveformView.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EpisodeActionButtons.body (cognitive 18) · ×1
  • EpisodeActionButtons.body (cognitive 18) Pocket Casts TV App/UI/Podcasts/EpisodeRow.swift:267 — EpisodeActionButtons.body has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 4 (7 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 · MultiSelectable.showSelectAllOptions (cognitive 18) · ×1
  • MultiSelectable.showSelectAllOptions (cognitive 18) podcasts/Common SwiftUI/List View/MultiSelectable.swift:160 — MultiSelectable.showSelectAllOptions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (8 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 · PodcastSettingsViewController.tableView (cognitive 18) · ×1
  • PodcastSettingsViewController.tableView (cognitive 18) podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift:203 — PodcastSettingsViewController.tableView has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (18 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 · UITableView.firstIndexPath (cognitive 18) · ×1
  • UITableView.firstIndexPath (cognitive 18) podcasts/Extensions/UITableView+MultiSelect.swift:110 — UITableView.firstIndexPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioReadTask.startup (cognitive 17) · ×1
  • AudioReadTask.startup (cognitive 17) podcasts/AudioReadTask.swift:78 — AudioReadTask.startup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 2 (7 pts), error handling 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 · DefaultPlayer.checkIfPlayerFailed (cognitive 17) · ×1
  • DefaultPlayer.checkIfPlayerFailed (cognitive 17) podcasts/DefaultPlayer.swift:331 — DefaultPlayer.checkIfPlayerFailed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (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 · EpisodeManager.url (cognitive 17) · ×1
  • EpisodeManager.url (cognitive 17) podcasts/EpisodeManager.swift:451 — EpisodeManager.url has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (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 · PlaybackManager.performLoad (cognitive 17) · ×1
  • PlaybackManager.performLoad (cognitive 17) podcasts/PlaybackManager.swift:198 — PlaybackManager.performLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · QALaunchHooks.apply (cognitive 17) · ×1
  • QALaunchHooks.apply (cognitive 17) podcasts/Developer Menu/QALaunchHooks.swift:166 — QALaunchHooks.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 1, ternaries 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 · FingerprintReferenceRetriever.decompressGzip (cognitive 17) · ×1
  • FingerprintReferenceRetriever.decompressGzip (cognitive 17) podcasts/Fingerprint/FingerprintReferenceRetriever.swift:121 — FingerprintReferenceRetriever.decompressGzip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MediaOverlayView.body (cognitive 17) · ×1
  • MediaOverlayView.body (cognitive 17) Pocket Casts TV App/UI/Player/MediaOverlayView.swift:12 — MediaOverlayView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpNextButton.draw (cognitive 17) · ×1
  • UpNextButton.draw (cognitive 17) podcasts/Common Components/Buttons/UpNextButton.swift:104 — UpNextButton.draw has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3 (6 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManualPlaylistsChooserViewController.doneTapped (cognitive 17) · ×1
  • ManualPlaylistsChooserViewController.doneTapped (cognitive 17) podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift:173 — ManualPlaylistsChooserViewController.doneTapped has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (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 · UIViewController.longPressSelectOptions (cognitive 17) · ×1
  • UIViewController.longPressSelectOptions (cognitive 17) podcasts/Extensions/UIViewController+MultiSelectActions.swift:4 — UIViewController.longPressSelectOptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (8 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 · PlaylistQueryBuilder.buildDownloadStatusQuery (cognitive 16) · ×1
  • PlaylistQueryBuilder.buildDownloadStatusQuery (cognitive 16) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:761 — PlaylistQueryBuilder.buildDownloadStatusQuery has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UploadFilesUpdateTask.apiTokenAcquired (cognitive 16) · ×1
  • UploadFilesUpdateTask.apiTokenAcquired (cognitive 16) Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFilesUpdateTask.swift:17 — UploadFilesUpdateTask.apiTokenAcquired has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncTask.createIncrementalSyncData (cognitive 16) · ×1
  • SyncTask.createIncrementalSyncData (cognitive 16) Modules/Sources/PocketCastsServer/Public/Sync/SyncTask.swift:242 — SyncTask.createIncrementalSyncData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 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 · AccountViewController.updateDisplayedData (cognitive 16) · ×1
  • AccountViewController.updateDisplayedData (cognitive 16) podcasts/AccountViewController.swift:95 — AccountViewController.updateDisplayedData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserEpisodeManager.presentDeleteOptions (cognitive 16) · ×1
  • UserEpisodeManager.presentDeleteOptions (cognitive 16) podcasts/UserEpisodeManager.swift:247 — UserEpisodeManager.presentDeleteOptions has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 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 · EpisodeDetailViewController.updateButtonStates (cognitive 16) · ×1
  • EpisodeDetailViewController.updateButtonStates (cognitive 16) podcasts/Episode/EpisodeDetailViewController+Actions.swift:118 — EpisodeDetailViewController.updateButtonStates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EpisodeDetailsViewModel.init (cognitive 16) · ×1
  • EpisodeDetailsViewModel.init (cognitive 16) Pocket Casts Watch App/UI/Episode/EpisodeDetailsViewModel.swift:36 — EpisodeDetailsViewModel.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, ternaries 3 (5 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (5 members, 5 shared lines) · ×1
  • Near-duplicate member family (5 members, 5 shared lines) podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:19 — podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:19-91 | podcasts/End of Year/Stories/2023/EpilogueStory2023.swift:17-92 | podcasts/End of Year/Stories/2023/ListeningTimeStory2023.swift:89-134 | podcasts/End of Year/Stories/2023/TopListenedCategoriesStory2023.swift:102-117 | podcasts/End of Year/Stories/2023/YearOverYearStory2023.swift:167-192 — These 5 members are variants of one another: a block of 5 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) podcasts/DownloadsViewController+Swipe.swift:10 — podcasts/DownloadsViewController+Swipe.swift:10-21 | podcasts/ListeningHistoryViewController+Swipe.swift:9-20 | podcasts/New Detail/PlaylistDetailViewController+Swipe.swift:8-19 | podcasts/Podcasts/Podcast Page/PodcastViewController+Swipe.swift:9-20 | podcasts/StarredViewController+Swipe.swift:9-20 | podcasts/UploadedViewController+Swipe.swift:9-20 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) podcasts/Folders/FolderViewController+ContextMenu.swift:33 — podcasts/Folders/FolderViewController+ContextMenu.swift:33-76 | podcasts/Podcasts/All Podcasts/PodcastListViewController+ContextMenu.swift:51-94 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) podcasts/CustomStepper.swift:57 — podcasts/CustomStepper.swift:57-90 | podcasts/CustomTimeStepper.swift:57-90 — 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 (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:21 — podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:21-76 | podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift:30-87 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) podcasts/DefaultPlayer.swift:642 — podcasts/DefaultPlayer.swift:642-682 | podcasts/DefaultPlayer.swift:696-734 — 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 (50 corresponding lines) · ×1
  • Edited copy of a member (50 corresponding lines) podcasts/Fingerprint/FingerprintTimingManager.swift:1220 — podcasts/Fingerprint/FingerprintTimingManager.swift:1220-1269 | podcasts/Fingerprint/FingerprintTimingManager.swift:1280-1336 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 27+ corresponding lines) podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel.swift:276 — podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel.swift:276-302 | podcasts/PlaylistCellViewModel.swift:154-180 | podcasts/PlaylistMetadataLoader/PlaylistMetadataLoader.swift:362-388 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 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 (59 corresponding lines) · ×1
  • Edited copy of a member (59 corresponding lines) podcasts/Share Profile/ShareProfileView.swift:345 — podcasts/Share Profile/ShareProfileView.swift:345-403 | podcasts/Share Profile/ShareProfileView.swift:407-467 — 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 (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) podcasts/Syncing/SyncSigninView.swift:256 — podcasts/Syncing/SyncSigninView.swift:256-302 | podcasts/Syncing/SyncSigninViewController.swift:265-306 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:28 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:28-60 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+DeviceAuth.swift:28-60 — 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 (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) podcasts/ChangeEmailViewController.swift:184 — podcasts/ChangeEmailViewController.swift:184-219 | podcasts/ChangePasswordViewController.swift:202-237 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 29+ corresponding lines) Modules/Sources/PocketCastsServer/Public/Refresh/MainServerHandler.swift:96 — Modules/Sources/PocketCastsServer/Public/Refresh/MainServerHandler.swift:96-128 | Modules/Sources/PocketCastsServer/Public/Refresh/MainServerHandler.swift:130-161 | Modules/Sources/PocketCastsServer/Public/Refresh/MainServerHandler.swift:163-191 | Modules/Sources/PocketCastsServer/Public/Refresh/MainServerHandler.swift:317-348 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 35+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 35+ corresponding lines) Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveEpisodesTask.swift:18 — Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveEpisodesTask.swift:18-52 | Modules/Sources/PocketCastsServer/Private/API Tasks/RetrievePlaylistsTask.swift:9-50 | Modules/Sources/PocketCastsServer/Private/API Tasks/RetrievePodcastsTask.swift:9-50 | Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveStarredTask.swift:17-55 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 28+ corresponding lines) Modules/Sources/PocketCastsServer/Private/API Tasks/CancelSubscriptionSurveyTask.swift:16 — Modules/Sources/PocketCastsServer/Private/API Tasks/CancelSubscriptionSurveyTask.swift:16-45 | Modules/Sources/PocketCastsServer/Private/API Tasks/ReferralRedeemTask.swift:14-41 | Modules/Sources/PocketCastsServer/Private/API Tasks/SupportFeedbackTask.swift:24-53 | Modules/Sources/PocketCastsServer/Private/API Tasks/UserPodcastRatingTask.swift:17-45 — These 4 members are one piece of code written 4 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 4 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) Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:46 — Pocket Casts TV App/UI/Discover/DiscoverSectionEpisodesModel.swift:46-74 | Pocket Casts TV App/UI/Discover/DiscoverSectionModel.swift:52-88 — 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 copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) Modules/Sources/PocketCastsServer/Private/API Tasks/DeleteAccountTask.swift:8 — Modules/Sources/PocketCastsServer/Private/API Tasks/DeleteAccountTask.swift:8-32 | Modules/Sources/PocketCastsServer/Private/API Tasks/RecommendEpisodesTask.swift:9-41 | Modules/Sources/PocketCastsServer/Private/API Tasks/RetrieveLastSyncDateTask.swift:8-35 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 23+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:263 — Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:263-285 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:202-229 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:125-147 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 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, 22+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 22+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:16 — Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:16-39 | Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:50-72 | Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:238-260 | Modules/Sources/PocketCastsDataModel/Private/Managers/EndOfYearDataManager.swift:287-308 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) podcasts/Bookmarks/Episode/BookmarkEpisodeListController.swift:58 — podcasts/Bookmarks/Episode/BookmarkEpisodeListController.swift:58-65 | podcasts/Bookmarks/Player/BookmarksPlayerTabController.swift:145-151 | podcasts/Bookmarks/Profile/BookmarksProfileListController.swift:67-73 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1617-1623 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 16+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:121 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:121-136 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:629-645 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:72-87 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:14-29 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextChangesDataManager.swift:31-47 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:120-136 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) Pocket Casts Watch App/UI/Episode Lists/Download List/DownloadListViewModel.swift:27 — Pocket Casts Watch App/UI/Episode Lists/Download List/DownloadListViewModel.swift:27-41 | Pocket Casts Watch App/UI/Episode Lists/Files List/FilesListViewModel.swift:43-56 | Pocket Casts Watch App/UI/Episode Lists/Filter EpisodeList/FilterEpisodeListViewModel.swift:28-41 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 15+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:310 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:310-325 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:327-344 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:308-323 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:103-118 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:138-154 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:1150-1164 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) Pocket Casts TV App/UI/Discover/DiscoverAllView.swift:15 — Pocket Casts TV App/UI/Discover/DiscoverAllView.swift:15-39 | Pocket Casts TV App/UI/Search/SearchNetworkView.swift:22-43 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 8+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:823 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:823-831 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:231-239 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:250-258 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:260-267 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:280-288 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 7+ corresponding lines) Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:729 — Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:729-735 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:741-747 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:749-755 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:757-763 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:773-779 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:781-787 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 10+ corresponding lines) podcasts/SiriShortcutsManager.swift:155 — podcasts/SiriShortcutsManager.swift:155-165 | podcasts/SiriShortcutsManager.swift:167-176 | podcasts/SiriShortcutsManager.swift:251-261 | podcasts/SiriShortcutsManager.swift:281-291 | podcasts/SiriShortcutsManager.swift:293-303 | podcasts/SiriShortcutsManager.swift:307-316 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) podcasts/InAppPurchases/IAPHelper.swift:171 — podcasts/InAppPurchases/IAPHelper.swift:171-180 | podcasts/InAppPurchases/IAPHelper.swift:182-194 | podcasts/InAppPurchases/IAPHelper.swift:196-206 | podcasts/InAppPurchases/IAPHelper.swift:353-364 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:26 — Modules/Sources/PocketCastsDataModel/Private/Managers/FolderDataManager.swift:26-39 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:248-261 | Modules/Sources/PocketCastsDataModel/Private/Managers/PodcastDataManager.swift:362-375 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:175-187 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 8+ corresponding lines) Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:63 — Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:63-70 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:72-79 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:81-88 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:122-129 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:149-156 | Pocket Casts Watch App/Data & Communication/SessionManager+Send.swift:158-165 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) podcasts/DownloadsViewController+MultiSelect.swift:51 — podcasts/DownloadsViewController+MultiSelect.swift:51-62 | podcasts/ListeningHistoryViewController+MultiSelect.swift:51-62 | podcasts/StarredViewController+Multiselect.swift:51-62 | podcasts/UploadedViewController.+MultiSelect.swift:51-62 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 9+ corresponding lines) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:686 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:686-694 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:288-296 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:298-306 | Modules/Sources/PocketCastsDataModel/Private/Managers/UpNextDataManager.swift:145-155 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:68-76 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 6+ corresponding lines) podcasts/PlayerColorHelper.swift:6 — podcasts/PlayerColorHelper.swift:6-11 | podcasts/PlayerColorHelper.swift:13-18 | podcasts/PlayerColorHelper.swift:20-25 | podcasts/PlayerColorHelper.swift:27-32 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) Modules/Sources/PocketCastsAnalytics/AnalyticsDescribable+Modules.swift:75 — Modules/Sources/PocketCastsAnalytics/AnalyticsDescribable+Modules.swift:75-88 | podcasts/Bookmarks/Bookmarks+Analytics.swift:39-52 | podcasts/UpNextViewController.swift:587-598 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 3+ corresponding lines) podcasts/DownloadsViewController+Swipe.swift:58 — podcasts/DownloadsViewController+Swipe.swift:58-60 | podcasts/ListeningHistoryViewController+Swipe.swift:49-51 | podcasts/New Detail/PlaylistDetailViewController+Swipe.swift:65-67 | podcasts/Podcasts/Podcast Page/PodcastViewController+Swipe.swift:57-59 | podcasts/StarredViewController+Swipe.swift:55-57 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 3+ corresponding lines) podcasts/ListeningHistoryViewController+Table.swift:138 — podcasts/ListeningHistoryViewController+Table.swift:138-140 | podcasts/Podcasts/Podcast Page/PodcastViewController+TableData.swift:249-251 | podcasts/StarredViewController+Table.swift:51-53 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 3+ corresponding lines) podcasts/AddCustomViewController+CollectionView.swift:38 — podcasts/AddCustomViewController+CollectionView.swift:38-40 | podcasts/FeaturedSummaryViewController.swift:116-118 | podcasts/GridLayout.swift:42-44 | podcasts/IconSelectorCell.swift:296-298 | podcasts/LargeListSummaryViewController.swift:182-184 | podcasts/SmallPagedListSummaryViewController.swift:182-184 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 4+ corresponding lines) podcasts/CheckboxCell.swift:13 — podcasts/CheckboxCell.swift:13-16 | podcasts/Episode/EpisodeDetailViewController.swift:130-134 | podcasts/PodcastFilterSelectionCell.swift:25-28 | podcasts/Podcasts/All Podcasts/Cells/FolderListCell.swift:12-15 | podcasts/Podcasts/All Podcasts/Cells/PodcastListCell.swift:7-10 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (41 lines × 3) · ×1
  • Duplicated block (41 lines × 3) podcasts/IconSelectorCell.swift:70 — podcasts/IconSelectorCell.swift:70-110 | podcasts/IconSelectorCell.swift:113-153 | podcasts/IconSelectorCell.swift:156-196 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:133 — Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:133-173 | Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:178-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:24 — podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:24-61 | podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift:33-70 — before extracting anything, compare `podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift` and `podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift` 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.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) podcasts/Enumerations.swift:303 — podcasts/Enumerations.swift:303-336 | podcasts/Enumerations.swift:339-372 — both copies are in the same file, so extract the 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 (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) podcasts/New Creation/New Playlist/NewPlaylistViewController.swift:247 — podcasts/New Creation/New Playlist/NewPlaylistViewController.swift:247-279 | podcasts/New Creation/New Playlist/NewPlaylistViewController.swift:287-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/New Creation/New Playlist/NewPlaylistViewController.swift:287` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (22–33 lines × 2) · ×1
  • Duplicated block (22–33 lines × 2) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:609 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:609-641 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:750-771 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:609` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:642` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:773` 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 (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) podcasts/Folders/FolderViewController+ContextMenu.swift:47 — podcasts/Folders/FolderViewController+ContextMenu.swift:47-76 | podcasts/Podcasts/All Podcasts/PodcastListViewController+ContextMenu.swift:65-94 — 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 `podcasts/Folders/FolderViewController+ContextMenu.swift: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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) Modules/Sources/PocketCastsDataModel/Public/Model/Podcast+fromDictionary.swift:43 — Modules/Sources/PocketCastsDataModel/Public/Model/Podcast+fromDictionary.swift:43-68 | Modules/Sources/PocketCastsServer/Public/ServerPodcastManager+Update.swift:64-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) Pocket Casts TV App/UI/Playlists/PlaylistDetailView.swift:251 — Pocket Casts TV App/UI/Playlists/PlaylistDetailView.swift:251-275 | Pocket Casts TV App/UI/Podcasts/PodcastDetailView.swift:171-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (16–24 lines × 10) · ×1
  • Duplicated block (16–24 lines × 10) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:201 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:201-216 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:229-244 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:248-263 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:311-326 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:357-374 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:468-485 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:542-557 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:690-713 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:812-830 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:835-851 — all 10 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:353` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:200` 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 (22–24 lines × 3) · ×1
  • Duplicated block (22–24 lines × 3) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:481 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:481-502 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:591-612 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:665-688 — 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:481` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:478` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:589` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21–23 lines × 8) · ×1
  • Duplicated block (21–23 lines × 8) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:187 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:187-207 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:215-235 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:262-282 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:431-451 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:576-596 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:776-798 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:850-872 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:895-917 — all 8 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:187` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–23 lines × 3) · ×1
  • Duplicated block (19–23 lines × 3) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:152 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:152-171 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:562-580 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:867-889 — 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–22 lines × 11) · ×1
  • Duplicated block (18–22 lines × 11) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:202 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:202-219 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:230-247 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:249-266 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:312-329 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:359-377 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:469-488 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:543-560 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:654-673 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:690-709 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:813-834 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:836-855 — all 11 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:379` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:221` 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 (18–21 lines × 16) · ×1
  • Duplicated block (18–21 lines × 16) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:182 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:182-200 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:211-228 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:239-256 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:258-275 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:396-415 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:426-444 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:480-497 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:533-550 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:552-569 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:572-589 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:664-683 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:771-791 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:825-844 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:846-865 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:901-920 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:935-954 — all 16 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:258` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:202` 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 (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) podcasts/Lists/EpisodeTableHelper.swift:20 — podcasts/Lists/EpisodeTableHelper.swift:20-40 | podcasts/Lists/EpisodeTableHelper.swift:73-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Lists/EpisodeTableHelper.swift:20` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (16–20 lines × 13) · ×1
  • Duplicated block (16–20 lines × 13) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:196 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:196-211 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:224-239 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:243-258 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:289-304 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:401-420 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:449-464 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:537-552 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:556-571 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:806-825 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:829-846 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:860-878 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:915-932 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:939-956 — all 13 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:421` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:212` 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 (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) Pocket Casts App Clip/AppClipAppDelegate.swift:45 — Pocket Casts App Clip/AppClipAppDelegate.swift:45-62 | podcasts/AppDelegate.swift:316-334 — 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 (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) podcasts/End of Year/Stories/2023/EpilogueStory2023.swift:137 — podcasts/End of Year/Stories/2023/EpilogueStory2023.swift:137-153 | podcasts/Onboarding/Patron/PatronAppIconUnlock.swift:409-427 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–17 lines × 8) · ×1
  • Duplicated block (12–17 lines × 8) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:164 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:164-175 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:295-307 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:344-357 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:381-396 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:408-424 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:455-468 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:922-934 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:946-958 — all 8 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:160` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:293` 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 (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:75 — Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:75-91 | Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:153-169 | Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift:198-214 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) podcasts/Syncing/SyncSigninView.swift:312 — podcasts/Syncing/SyncSigninView.swift:312-326 | podcasts/Syncing/SyncSigninViewController.swift:329-345 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13–16 lines × 6) · ×1
  • Duplicated block (13–16 lines × 6) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:149 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:149-161 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:309-321 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:341-354 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:355-368 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:465-480 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:699-711 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:162` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:322` 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 (12–15 lines × 10) · ×1
  • Duplicated block (12–15 lines × 10) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:150 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:150-162 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:294-306 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:342-355 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:379-393 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:407-421 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:454-465 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:561-572 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:866-879 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:921-933 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:945-957 — all 10 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:357` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:164` 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 (10–15 lines × 8) · ×1
  • Duplicated block (10–15 lines × 8) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:179 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:179-189 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:307-317 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:353-364 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:389-403 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:420-433 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:463-474 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:932-941 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:963-972 — all 8 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:179` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:303` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:352` 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 (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) podcasts/End of Year/Stories/2023/IntroStory2023.swift:19 — podcasts/End of Year/Stories/2023/IntroStory2023.swift:19-32 | podcasts/End of Year/Stories/2023/IntroStory2023.swift:40-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) podcasts/PodcastChapterParser.swift:46 — podcasts/PodcastChapterParser.swift:46-59 | podcasts/PodcastChapterParser.swift:66-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/PodcastChapterParser.swift:46` 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 × 3) · ×1
  • Duplicated block (12–13 lines × 3) Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:349 — Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:349-361 | Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift:367-379 | Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift:159-170 — before extracting anything, compare `Modules/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift` and `Modules/Sources/PocketCastsDataModel/Private/Managers/UserEpisodeDataManager.swift` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 183 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1407 — podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1407-1418 | podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1469-1481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Podcasts/Podcast Page/PodcastViewController.swift:1407` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 9) · ×1
  • Duplicated block (12 lines × 9) Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:148 — Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:148-159 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:180-191 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:308-319 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:340-352 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:354-366 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:390-405 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:421-435 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:464-476 | Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:933-944 — all 9 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:161` calls `executeUpdate` and `Modules/Sources/PocketCastsDataModel/Private/Managers/Util/DatabaseHelper.swift:193` 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 (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) podcasts/DownloadsViewController+Swipe.swift:23 — podcasts/DownloadsViewController+Swipe.swift:23-34 | podcasts/New Detail/PlaylistDetailViewController+Swipe.swift:21-32 | podcasts/Podcasts/Podcast Page/PodcastViewController+Swipe.swift:22-33 | podcasts/StarredViewController+Swipe.swift:22-33 | podcasts/UpNextViewController+Swipe.swift:101-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:17 — Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:17-28 | Pocket Casts TV App/UI/Discover/DiscoverFeaturedPodcastsRow.swift:20-31 | Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift:28-39 — before extracting anything, compare `Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift` and `Pocket Casts TV App/UI/Discover/DiscoverVideoEpisodesRow.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 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 `Pocket Casts TV App/UI/Discover/DiscoverEpisodesRow.swift:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:11 — Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:11-20 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:330-338 | Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:348-358 — 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 `Modules/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift:11` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel.swift:285 — podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel.swift:285-302 | podcasts/PlaylistCellViewModel.swift:163-180 | podcasts/PlaylistMetadataLoader/PlaylistMetadataLoader.swift:371-388 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/New Detail/PlaylistDetailViewModel/PlaylistDetailViewModel.swift:285` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) podcasts/ShortcutManager.swift:27 — podcasts/ShortcutManager.swift:27-34 | podcasts/Utilities/BadgeHelper.swift:28-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 `podcasts/ShortcutManager.swift:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) podcasts/DownloadsViewController+Swipe.swift:13 — podcasts/DownloadsViewController+Swipe.swift:13-21 | podcasts/ListeningHistoryViewController+Swipe.swift:12-20 | podcasts/New Detail/PlaylistDetailViewController+Swipe.swift:11-19 | podcasts/Podcasts/Podcast Page/PodcastViewController+Swipe.swift:12-20 | podcasts/StarredViewController+Swipe.swift:12-20 | podcasts/UploadedViewController+Swipe.swift:12-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/DownloadsViewController+Swipe.swift:13` 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 (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) Pocket Casts TV App/UI/Style/CategoryStyle.swift:14 — Pocket Casts TV App/UI/Style/CategoryStyle.swift:14-62 | podcasts/Onboarding/InterestButton.swift:96-144 — before extracting anything, compare `Pocket Casts TV App/UI/Style/CategoryStyle.swift` and `podcasts/Onboarding/InterestButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–8 lines × 3) · ×1
  • Duplicated block (4–8 lines × 3) podcasts/Common Components/MainEpisodeActionView.swift:305 — podcasts/Common Components/MainEpisodeActionView.swift:305-312 | podcasts/Common Components/MainEpisodeActionView.swift:318-325 | podcasts/Common Components/MainEpisodeActionView.swift:332-335 — 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. 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, `podcasts/Common Components/MainEpisodeActionView.swift:303` calls `addLine`, `CGPoint`, `addCurve` and `podcasts/Common Components/MainEpisodeActionView.swift:332` 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 (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:46 — podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:46-52 | podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:54-60 | podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:62-68 — 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 `podcasts/End of Year/Stories/2023/TopOnePodcastStory2023.swift:46` 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 × 4) · ×1
  • Duplicated block (6 lines × 4) podcasts/WhatsNewPageView.swift:70 — podcasts/WhatsNewPageView.swift:70-75 | podcasts/WhatsNewPageView.swift:83-88 | podcasts/WhatsNewPageView.swift:99-104 | podcasts/WhatsNewPageView.swift:115-120 — 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 `podcasts/WhatsNewPageView.swift:70` 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, `podcasts/WhatsNewPageView.swift:81` calls `setLineSpacing` and `podcasts/WhatsNewPageView.swift:69` 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 (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) podcasts/Podcasts/Share Podcast List/SharePodcastsViewController.swift:117 — podcasts/Podcasts/Share Podcast List/SharePodcastsViewController.swift:117-123 | podcasts/Podcasts/Share Podcast List/SharePublishViewController.swift:153-160 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 11) · ×1
  • Duplicated block (5 lines × 11) Pocket Casts TV App/UI/Style/CategoryStyle.swift:20 — Pocket Casts TV App/UI/Style/CategoryStyle.swift:20-24 | Pocket Casts TV App/UI/Style/CategoryStyle.swift:29-33 | Pocket Casts TV App/UI/Style/CategoryStyle.swift:47-51 | Pocket Casts TV App/UI/Style/CategoryStyle.swift:56-60 | podcasts/DeviceApprove/DeviceApproveView.swift:291-295 | podcasts/End of Year/Stories/2023/ListeningTimeStory2023.swift:117-121 | podcasts/HorizontalCollectionListRowView.swift:130-134 | podcasts/Onboarding/InterestButton.swift:102-106 | podcasts/Onboarding/InterestButton.swift:111-115 | podcasts/Onboarding/InterestButton.swift:129-133 | podcasts/Onboarding/InterestButton.swift:138-142 — before extracting anything, compare `Pocket Casts TV App/UI/Style/CategoryStyle.swift` and `podcasts/Onboarding/InterestButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts TV App/UI/Style/CategoryStyle.swift:20` 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, `podcasts/DeviceApprove/DeviceApproveView.swift:297` calls `cornerRadius` and `Pocket Casts TV App/UI/Style/CategoryStyle.swift:61` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 10) · ×1
  • Duplicated block (5 lines × 10) Pocket Casts TV App/UI/Style/CategoryStyle.swift:17 — Pocket Casts TV App/UI/Style/CategoryStyle.swift:17-21 | Pocket Casts TV App/UI/Style/CategoryStyle.swift:26-30 | Pocket Casts TV App/UI/Style/CategoryStyle.swift:35-39 | Pocket Casts TV App/UI/Style/CategoryStyle.swift:44-48 | Pocket Casts TV App/UI/Style/CategoryStyle.swift:53-57 | podcasts/Onboarding/InterestButton.swift:99-103 | podcasts/Onboarding/InterestButton.swift:108-112 | podcasts/Onboarding/InterestButton.swift:117-121 | podcasts/Onboarding/InterestButton.swift:126-130 | podcasts/Onboarding/InterestButton.swift:135-139 — before extracting anything, compare `Pocket Casts TV App/UI/Style/CategoryStyle.swift` and `podcasts/Onboarding/InterestButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Pocket Casts TV App/UI/Style/CategoryStyle.swift:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (3–5 lines × 4) · ×1
  • Duplicated block (3–5 lines × 4) Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:658 — Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:658-662 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:666-670 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:722-724 | Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:767-771 — 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 `Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:658` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:658` calls `saveEpisode` and `Modules/Sources/PocketCastsDataModel/Public/DataManager.swift:722` 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 (4–5 lines × 3) · ×1
  • Duplicated block (4–5 lines × 3) Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:38 — Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:38-42 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift:74-78 | Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+DeviceAuth.swift:39-42 — 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 `Modules/Sources/PocketCastsServer/Public/API/ApiServerHandler+Account.swift: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.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) podcasts/Bookmarks/Episode/BookmarkEpisodeListController.swift:58 — podcasts/Bookmarks/Episode/BookmarkEpisodeListController.swift:58-62 | podcasts/Bookmarks/Player/BookmarksPlayerTabController.swift:145-149 | podcasts/Bookmarks/Profile/BookmarksProfileListController.swift:69-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/Bookmarks/Episode/BookmarkEpisodeListController.swift:58` 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 (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) podcasts/DownloadsViewController+Swipe.swift:62 — podcasts/DownloadsViewController+Swipe.swift:62-69 | podcasts/ListeningHistoryViewController+Swipe.swift:53-60 | podcasts/New Detail/PlaylistDetailViewController+Swipe.swift:69-76 | podcasts/StarredViewController+Swipe.swift:59-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) podcasts/LogsViewController.swift:24 — podcasts/LogsViewController.swift:24-32 | podcasts/LogsViewController.swift:34-42 | podcasts/OnlineSupportController.swift:75-84 — 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 (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:38 — podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:38-42 | podcasts/End of Year/Stories/2023/EpilogueStory2023.swift:34-38 | podcasts/End of Year/Stories/2023/ListeningTimeStory2023.swift:111-115 | podcasts/End of Year/Stories/2023/TopListenedCategoriesStory2023.swift:105-109 | podcasts/End of Year/Stories/2023/YearOverYearStory2023.swift:180-184 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `podcasts/End of Year/Stories/2023/CompletionRateStory2023.swift:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: PocketCastsUtils — PocketCastsUtils: abstractness 0.16, instability 0.00, distance 0.84 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Minor — 211 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×160
  • Orphaned file podcasts/Onboarding/Patron/PatronAppIconUnlock.swift: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 podcasts/New Search/Views/Results/LocalSearchViewModel.swift: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 podcasts/UserSatisfactionSurveyManager.swift: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 podcasts/Theme+Color.swift: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 podcasts/PlaylistShortcutsViewController.swift: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 podcasts/Utilities/SwiftUI/HighlightedText.swift: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 podcasts/End of Year/Stories/2023/YearOverYearStory2023.swift: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 podcasts/CancelConfirmationView.swift: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 podcasts/End of Year/Stories/2024/YearOverYearCompare2024Story.swift: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 podcasts/PlaylistCellView.swift: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 podcasts/CarPlay/CarPlaySceneDelegate+Interaction.swift: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 podcasts/Onboarding/Plus/PlusButtonStyles.swift: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 podcasts/Sharing/ShareImageView.swift: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 podcasts/PlaylistMetadataLoader/PlaylistCacheInvalidationCoordinator.swift: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 podcasts/End of Year/Stories/2023/ListeningTimeStory2023.swift: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 podcasts/Cancel Subscription/Cancel Subscription/Plans View/CancelSubscriptionPlanRow.swift: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 podcasts/Common SwiftUI/BannerAdView.swift: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 podcasts/New Creation/New Preview/PlaylistPreviewViewModel.swift: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 podcasts/LocalizationHelpers.swift: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 podcasts/End of Year/End of Year 2023/EndOfYear2023StoriesModel.swift: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 WidgetExtension/Up Next/UpNextLargeWidgetView.swift: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 podcasts/DownloadManager+Logging.swift: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 podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift: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 podcasts/CustomTimeStepper.swift: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 Pocket Casts Watch App/UI/Episode/EpisodeDetailsViewModel.swift: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.
  • + 135 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×29
  • Duplicated predicate Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift:159 — `!ServerSettings.lastRefreshSucceeded() || !ServerSettings.lastSyncSucceeded()` appears character-identically in 2 files — Pocket Casts Watch App/UI/Main Page/SourceInterfaceModel.swift, podcasts/ProfileViewController.swift. 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 podcasts/Settings.swift:303 — `!SubscriptionHelper.hasActiveSubscription() || !SyncManager.isUserLoggedIn()` appears character-identically in 2 files — podcasts/Settings.swift, podcasts/UpNextViewController.swift. 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 podcasts/DownloadsViewController+Table.swift:89 — `!multiSelectGestureInProgress || multiSelectGestureInProgress` appears character-identically in 7 files — podcasts/DownloadsViewController+Table.swift, podcasts/ListeningHistoryViewController+Table.swift, podcasts/New Detail/PlaylistDetailViewController+TableView.swift, podcasts/Podcasts/Podcast Page/PodcastViewController+TableData.swift. 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 podcasts/Onboarding/Plus/UpgradeCard.swift:122 — `(viewModel.state == .purchasing) || (viewModel.priceAvailability == .loading)` appears character-identically in 2 files — podcasts/Onboarding/Plus/UpgradeCard.swift, podcasts/Onboarding/Plus/UpgradeLandingView.swift. 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 Pocket Casts App Clip/AppClipAppDelegate.swift:45 — `BuildEnvironment.current != .debug || forceReload` appears character-identically in 3 files — Pocket Casts App Clip/AppClipAppDelegate.swift, Pocket Casts TV App/UI/AppCoordinator.swift, podcasts/AppDelegate.swift. 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 podcasts/DownloadsViewController+Table.swift:57 — `LiquidGlass.isEnabled && indexPath.row == 0` appears character-identically in 2 files — podcasts/DownloadsViewController+Table.swift, podcasts/ListeningHistoryViewController+Table.swift. 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 podcasts/MiniPlayerViewController.swift:894 — `PlaybackManager.shared.isBuffering && PlaybackManager.shared.isPlaying` appears character-identically in 2 files — podcasts/MiniPlayerViewController.swift, podcasts/NowPlayingPlayerItemViewController+Update.swift. 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 podcasts/BackgroundShakeObserver.swift:28 — `PlaybackManager.shared.isSleepTimerActive && Settings.shakeToRestartSleepTimer` appears character-identically in 2 files — podcasts/BackgroundShakeObserver.swift, podcasts/SleepTimerManager.swift. 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 podcasts/PlaybackQueue.swift:409 — `Settings.autoDownloadMobileDataAllowed() || NetworkUtils.shared.isConnectedToUnexpensiveConnection()` appears character-identically in 3 files — podcasts/PlaybackQueue.swift, podcasts/PodcastManager.swift, podcasts/ServerSyncManager.swift. 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 podcasts/ExpandedCollectionViewController.swift:211 — `Settings.openLinks || !URLHelper.isValidScheme(url.scheme)` appears character-identically in 2 files — podcasts/ExpandedCollectionViewController.swift, podcasts/ExpandedEpisodeListViewController.swift. 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 podcasts/EpisodeManager.swift:491 — `Settings.userEpisodeRemoveFileAfterPlaying || Settings.userEpisodeRemoveFromCloudAfterPlaying()` appears character-identically in 2 files — podcasts/EpisodeManager.swift, podcasts/UserEpisode+Formatting.swift. 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 Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift:138 — `autoDownloadStatus == AutoDownloadStatus.userDeletedFile.rawValue || autoDownloadStatus == AutoDownloadStatus.userCancelledDownload.rawValue` appears character-identically in 2 files — Modules/Sources/PocketCastsDataModel/Public/Model/Episode.swift, Modules/Sources/PocketCastsDataModel/Public/Model/UserEpisode.swift. 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 Pocket Casts Watch App/UI/Episode/EpisodeDetailsViewModel.swift:61 — `episode.downloading() || episode.queued()` appears character-identically in 2 files — Pocket Casts Watch App/UI/Episode/EpisodeDetailsViewModel.swift, podcasts/DownloadManager.swift. 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 podcasts/Episode/EpisodeDetailViewController+Actions.swift:109 — `episode.downloading() || episode.queued() || episode.waitingForWifi()` appears character-identically in 2 files — podcasts/Episode/EpisodeDetailViewController+Actions.swift, podcasts/Episode/EpisodeDetailViewController.swift. 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 podcasts/Episode Cells/EpisodeCell.swift:316 — `episode.played() || episode.archived || episode.wasDeleted` appears character-identically in 2 files — podcasts/Episode Cells/EpisodeCell.swift, podcasts/New Creation/New Preview/Rules/Episode Preview/PlaylistEpisodePreviewRowView.swift. 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 podcasts/DownloadManager.swift:591 — `episode.queued() || episode.downloading() || episode.waitingForWifi()` appears character-identically in 3 files — podcasts/DownloadManager.swift, podcasts/Episode/EpisodeDetailViewController+Actions.swift, podcasts/UserEpisodeDetailViewController+Table.swift. 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 Modules/Sources/PocketCastsServer/Public/Upload/UploadManager.swift:115 — `episode.uploadQueued() || episode.uploading() || episode.uploadWaitingForWifi()` appears character-identically in 2 files — Modules/Sources/PocketCastsServer/Public/Upload/UploadManager.swift, podcasts/UserEpisodeDetailViewController+Table.swift. 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 Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFileDeleteTask.swift:25 — `httpStatus == ServerConstants.HttpConstants.ok || httpStatus == ServerConstants.HttpConstants.notFound` appears character-identically in 2 files — Modules/Sources/PocketCastsServer/Private/API Tasks/UploadFileDeleteTask.swift, Modules/Sources/PocketCastsServer/Private/API Tasks/UploadImageDeleteTask.swift. 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 podcasts/New Detail/PlaylistDetailViewController.swift:487 — `isMultiSelectEnabled || isScrolledPastHeader` appears character-identically in 2 files — podcasts/New Detail/PlaylistDetailViewController.swift, podcasts/Podcasts/Podcast Page/PodcastViewController.swift. 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 podcasts/DiscoverNetworksGridView.swift:56 — `item.source != nil && item.isAuthenticated == false` appears character-identically in 2 files — podcasts/DiscoverNetworksGridView.swift, podcasts/ExpandedCollectionViewController.swift. 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 podcasts/LargeListSummaryViewController.swift:90 — `lastLayedOutWidth != view.bounds.width || lastLayedOutInsets != horizontalInsets` appears character-identically in 2 files — podcasts/LargeListSummaryViewController.swift, podcasts/SmallPagedListSummaryViewController.swift. 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 podcasts/Folders/FolderViewController.swift:264 — `latestEpisode.unplayed() && !latestEpisode.archived` appears character-identically in 2 files — podcasts/Folders/FolderViewController.swift, podcasts/HomeGridDataHelper.swift. 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 podcasts/New Detail/PlaylistDetailViewController+EditActions.swift:193 — `listEpisode.episode.downloading() || listEpisode.episode.downloaded(pathFinder: DownloadManager.shared) || listEpisode.episode.queued()` appears character-identically in 2 files — podcasts/New Detail/PlaylistDetailViewController+EditActions.swift, podcasts/Podcasts/Podcast Page/PodcastViewController.swift. 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 podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift:55 — `listenedNumbers.numberOfEpisodes > 0 && listenedNumbers.numberOfPodcasts > 0 && !topPodcasts.isEmpty` appears character-identically in 2 files — podcasts/End of Year/End of Year 2024/EndOfYear2024StoriesModel.swift, podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift. 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 podcasts/Podcasts/Podcast Page/PodcastViewController+Options.swift:45 — `podcast.autoArchiveEpisodeLimit > 0 && podcast.overrideGlobalArchive` appears character-identically in 2 files — podcasts/Podcasts/Podcast Page/PodcastViewController+Options.swift, podcasts/Podcasts/Podcast Page/PodcastViewController+Search.swift. 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.
  • + 4 more in this group — see findings.md.
AX6 · Interface segregation · Fat interface · ×5
  • Fat interface: BaseEpisode (17 requirements) Modules/Sources/PocketCastsDataModel/Public/Model/BaseEpisode.swift:3 — `BaseEpisode` declares 17 requirements: `displayableTitle`, `parentIdentifier`, `downloaded`, `bufferedForStreaming`, `downloadFailed`, `downloading`, `queued`, `waitingForWifi`, `exemptFromAutoDownload`, `pathToDownloadedFile`, `pathToTempFile`, `inProgress`, `played`, `unplayed`, `playbackError`, `videoPodcast`, `mayContainChapters`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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: ServerSyncDelegate (27 requirements) Modules/Sources/PocketCastsServer/Public/Sync/ServerSyncDelegateProtocol.swift:4 — `ServerSyncDelegate` declares 27 requirements: `podcastUpdated`, `podcastAdded`, `checkForUnusedPodcasts`, `applyAutoArchivingToAllPodcasts`, `subscribedToPodcast`, `playlistChanged`, `episodeStarredChanged`, `archiveEpisodeExternal`, `markEpisodeAsPlayedExternal`, `deselectedChaptersChanged`, `episodeCanBeCleanedUp`, `autoDownloadLatestEpisodes`, `cleanupAllUnusedEpisodeBuffers`, `deleteFromDevice`, `autoDownloadUserEpisodes`, `userEpisodeFileProtocol`, `cleanupCloudOnlyFiles`, `performActionsAfterSync`, `isPushEnabled`, `isNewEpisodeNotificationsEnabled`, `defaultPodcastGrouping`, `defaultShowArchived`, `uniqueAppId`, `appVersion`, `privateUserAgent`, `minTimeBetweenProgressSaves`, `production`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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: NavigationProtocol (38 requirements) podcasts/Main/NavigationProtocol.swift:6 — `NavigationProtocol` declares 38 requirements: `navigateToPodcastList`, `navigateToPodcast`, `navigateToPodcastInfo`, `navigateTo`, `navigateToFolder`, `navigateToSuggestedFolders`, `navigateToEpisode`, `navigateToDiscover`, `navigateToDiscoverNetworks`, `navigateToProfile`, `navigateToFilter`, `navigateToAddFilter`, `presentManualPlaylistsChooser`, `navigateToUpNext`, `navigateToFiles`, `navigateToAddCustom`, `showSubscriptionCancelledAcknowledge`, `showSubscriptionRequired`, `showPlusMarketingPage`, `showSettings`, `showSettingsAppearance`, `showPromotionPage`, `showPromotionFinishedAcknowledge`, `showHeadphoneSettings`, `showGeneralSettings`, `showRedeemGuestPass`, `showSignUp`, `showSupporterSignIn`, `showSupporterBundleDetails`, `showTermsOfUse`, `showPrivacyPolicy`, `showWhatsNew`, `showApproveDevice`, `showInSafariViewController`, `showEndOfYearStories`, `dismissPresentedViewController`, `showOnboardingFlow`, `showNotificationsPermissions`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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: PlaySourceViewModel (34 requirements) Pocket Casts Watch App/UI/Play Source/PlaySourceViewModel.swift:17 — `PlaySourceViewModel` declares 34 requirements: `fetchEpisode`, `requiresConfirmation`, `isPlaying`, `inUpNext`, `isCurrentlyPlaying`, `supportsPodcastNavigation`, `playPauseTapped`, `skip`, `changeChapter`, `increasePlaybackSpeed`, `decreasePlaybackSpeed`, `changeSpeedInterval`, `downloaded`, `download`, `pauseDownload`, `deleteDownload`, `removeFromUpNext`, `addToUpNext`, `archive`, `unarchive`, `setStarred`, `markPlayed`, `markAsUnplayed`, `fetchDownloadedEpisodes`, `fetchUserEpisodes`, `fetchPlaylists`, `fetchPlaylist`, `fetchPlaylistEpisodes`, `episodeCount`, `clearUpNext`, `nowPlayingTitle`, `nowPlayingSubTitle`, `nowPlayingTimeRemaining`, `nowPlayingTint`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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: PodcastActionsDelegate (18 requirements) podcasts/Podcasts/Podcast Page/PodcastViewController.swift:41 — `PodcastActionsDelegate` declares 18 requirements: `isSummaryExpanded`, `setSummaryExpanded`, `tableView`, `displayedPodcast`, `settingsTapped`, `fundingTapped`, `folderTapped`, `notificationTapped`, `categoryTapped`, `networkTapped`, `subscribe`, `unsubscribe`, `refreshArtwork`, `showBookmarks`, `showEpisodes`, `showYouMightLike`, `showLogin`, `open`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. 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, 117 significant file(s) lose their only recent owner: podcasts/MiniPlayerViewController.swift, podcasts/PlayerZoomAnimator.swift, podcasts/PlayerContainerViewController+LargeScreen.swift, podcasts/Bookmarks/Details/BookmarkDetailsView.swift, podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift, podcasts/SupporterPodcastViewController.swift, podcasts/Main/MainTabBarController+Animations.swift, podcasts/VideoViewController.swift (+109 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 42 significant file(s) lose their only recent owner: podcasts/MediaExporterResourceLoaderDelegate.swift, podcasts/NotificationsViewController.swift, Pocket Casts TV App/Data/DiscoverManager.swift, podcasts/Onboarding/Plus/NewUpgrade/UpgradeAccountViewModel.swift, podcasts/DeviceApprove/DeviceApproveView.swift, podcasts/Referrals/ReferralsClaimPass.swift, Pocket Casts TV App/UI/Player/NowPlayingViewModel.swift, podcasts/Onboarding/InterestsView.swift (+34 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: podcasts/Share Profile/ShareProfileView.swift, podcasts/Share Profile/ShareProfileViewModel.swift, podcasts/Share Profile/ProfilePhotoMenu.swift. Pair on, review, or document these before any departure.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion Gemfile:1 — `(repository root)` (148296 LoC, 2170 module-visible types across 197 directories) overshoots its size bounds. 2 of 3 build unit(s) (Bundler, SwiftPM) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion Modules/Package.swift:1 — `Modules` (28388 LoC, 476 module-visible types across 44 directories) overshoots its size bounds. 2 of 3 build unit(s) (Bundler, SwiftPM) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (165 single-owned of 880 analysed files in total, 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; 880 of the 1666 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: podcasts/Fingerprint/FingerprintReferenceRetriever.swift, Pocket Casts TV App/UI/Style/FocusedCardDepth.swift, podcasts/Fingerprint/GeneratedChapterSeeker.swift.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found podcasts.xcodeproj/project.pbxproj:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `podcasts.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
D21 · Naming Consistency · `lastUiUpdateTime` spells `Ui` where 67 names in the project spell it `UI` · ×1
  • `lastUiUpdateTime` spells `Ui` where 67 names in the project spell it `UI` podcasts/DownloadProgress.swift:8 — 67 of 69 names in project repository spell the token `UI` (67 of 69; unit: names in project repository containing `UI`). Peers: View.snapshotUIKit (Modules/Sources/EndOfYear/Views/View+Snapshot.swift:16); NowPlayingPlayerItemViewControllerRepresentable.makeUIViewController (Pocket Casts App Clip/NowPlayingPlayerItemViewControllerRepresentable.swift:4); NowPlayingPlayerItemViewControllerRepresentable.updateUIViewController (Pocket Casts App Clip/NowPlayingPlayerItemViewControllerRepresentable.swift:9); ScrollableTextRepresentable.makeUIView (Pocket Casts TV App/UI/Common/ScrollableTextView.swift:65); ScrollableTextRepresentable.updateUIView (Pocket Casts TV App/UI/Common/ScrollableTextView.swift:82). Rename to `lastUIUpdateTime`. [rule N6]
D21 · Naming Consistency · `showINAddVoiceShortcutVC` spells `IN` where 295 names in the project spell it `In` · ×1
  • `showINAddVoiceShortcutVC` spells `IN` where 295 names in the project spell it `In` podcasts/Podcasts/Podcast Page/Podcast Settings/PodcastSettingsViewController+Table.swift:424 — 295 of 296 names in project repository spell the token `In` (295 of 296; unit: names in project repository containing `In`). Peers: FileManager.deviceRemainingFreeSpaceInBytes (Modules/Sources/PocketCastsUtils/Extensions/FileManager+Helper.swift:13); FileManager.deviceTotalSpaceInBytes (Modules/Sources/PocketCastsUtils/Extensions/FileManager+Helper.swift:23); ForegroundRefreshManagement.wasInBackground (Pocket Casts TV App/Data/ForegroundRefreshManagement.swift:14); AppCoordinator.signIn (Pocket Casts TV App/UI/AppCoordinator.swift:62); repository.SignInView (Pocket Casts TV App/UI/Auth/SignInView.swift:3). Rename to `showInAddVoiceShortcutVC`. [rule N6]
D21 · Naming Consistency · `addUiNotificationObservers` spells `Ui` where 67 names in the project spell it `UI` · ×1
  • `addUiNotificationObservers` spells `Ui` where 67 names in the project spell it `UI` podcasts/VideoViewController.swift:301 — 67 of 69 names in project repository spell the token `UI` (67 of 69; unit: names in project repository containing `UI`). Peers: View.snapshotUIKit (Modules/Sources/EndOfYear/Views/View+Snapshot.swift:16); NowPlayingPlayerItemViewControllerRepresentable.makeUIViewController (Pocket Casts App Clip/NowPlayingPlayerItemViewControllerRepresentable.swift:4); NowPlayingPlayerItemViewControllerRepresentable.updateUIViewController (Pocket Casts App Clip/NowPlayingPlayerItemViewControllerRepresentable.swift:9); ScrollableTextRepresentable.makeUIView (Pocket Casts TV App/UI/Common/ScrollableTextView.swift:65); ScrollableTextRepresentable.updateUIView (Pocket Casts TV App/UI/Common/ScrollableTextView.swift:82). Rename to `addUINotificationObservers`. [rule N6]
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 160 of 885 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; 885 of the 1666 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: podcasts/Onboarding/Patron/PatronAppIconUnlock.swift, podcasts/New Search/Views/Results/LocalSearchViewModel.swift, podcasts/UserSatisfactionSurveyManager.swift, podcasts/Theme+Color.swift, podcasts/PlaylistShortcutsViewController.swift, podcasts/Utilities/SwiftUI/HighlightedText.swift, podcasts/End of Year/Stories/2023/YearOverYearStory2023.swift, podcasts/CancelConfirmationView.swift (and 152 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.
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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST .github/workflows/claude-code-review.yml:9 — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (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 6 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.
X5 · Nullable reference types · Ruby's type checker does not check nil everywhere · ×1
  • Ruby's type checker does not check nil everywhere — This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 2 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch Modules/Sources/PocketCastsUtils/General/MediaFileHandle.swift:49 — `safeFileSize` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Minor — 6 finding(s)
D12 · Dependency Hygiene · Outdated · ×6
  • Outdated: automattic-tracks-ios — `automattic-tracks-ios` is resolved at 4.3.0, but 4.3.1 is the newest release tagged on https://github.com/Automattic/Automattic-Tracks-iOS within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update automattic-tracks-ios` reaches this one with no change to Package.swift.
  • Outdated: grdb.swift — `grdb.swift` is resolved at 7.10.0, but 7.12.0 is the newest release tagged on https://github.com/groue/GRDB.swift.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update grdb.swift` reaches this one with no change to Package.swift.
  • Outdated: lottie-ios — `lottie-ios` is resolved at 4.6.0, but 4.6.1 is the newest release tagged on https://github.com/airbnb/lottie-ios.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update lottie-ios` reaches this one with no change to Package.swift.
  • Outdated: pocket-casts-client-dependencies — `pocket-casts-client-dependencies` is resolved at 0.4.0, but 0.4.1 is the newest release tagged on https://github.com/Automattic/pocket-casts-client-dependencies within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update pocket-casts-client-dependencies` reaches this one with no change to Package.swift.
  • Outdated: swift-protobuf — `swift-protobuf` is resolved at 1.36.1, but 1.41.0 is the newest release tagged on https://github.com/apple/swift-protobuf.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-protobuf` reaches this one with no change to Package.swift.
  • Outdated: swiftsoup — `swiftsoup` is resolved at 2.13.5, but 2.14.4 is the newest release tagged on https://github.com/scinfu/SwiftSoup.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swiftsoup` reaches this one with no change to Package.swift.

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-fda2b6f8f7304273aa6790026ce6c70d/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-fda2b6f8f7304273aa6790026ce6c70d/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-fda2b6f8f7304273aa6790026ce6c70d/history-2.json --exit-code 0 --source .1artifacts/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=12800" --report-format json --report-path /tmp/watchdog-gitleaks-fda2b6f8f7304273aa6790026ce6c70d/history-3.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=17000 --max-count=6695" --report-format json --report-path /tmp/watchdog-gitleaks-fda2b6f8f7304273aa6790026ce6c70d/history-4.json --exit-code 0 --source .8artifacts/raw/gitleaks-history-4.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-fda2b6f8f7304273aa6790026ce6c70d/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude Modules/Sources/PocketCastsServer/Private/Protobuffer .4artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 172 file(s) — `Modules/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift`, `Modules/Sources/PocketCastsServer/Public/ApiSetting.swift`, `Modules/Sources/PocketCastsServer/Public/Cache/ShowInfoDataRetriever.swift`, `Modules/Sources/PocketCastsServer/Public/WhatsNew/WhatsNewManager.swift`, `Modules/Sources/PocketCastsUtils/General/Mutex.swift`, … (+167 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1e8f1-9fca-7621-88aa-cd9fac46e324 · 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