Public report of writingmate/aidictation, published 16 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, 16 November 2026, 23:53 UTC · Survey ID cd_b7117d353e014f68a13d02c56e9e54cc

writingmate/aidictation

Measured 16 November 2026, 23:49 UTC, at code version da09d3c

First survey, so nothing to compare with yet Code coverage: not measuredBoundary Type-Coupling: not measured

Code coverage is not measured: Suite not runnable in-image.

Boundary Type-Coupling is not measured: Bounded contexts not declared.

CAI score 49.1out 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: 132,400 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 1.4 person-years · Weakest lens: Code Health, 40.5

Findings by how serious they are

175 critical 966 serious 67 minor

19 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
16 November 2026, 23:49 UTC

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

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

62of 62 dimensions measured by tools.
1193of 1208 findings point to an exact file and line, so you can open each one in the code. The other 15 concern the repository as a whole, such as missing documentation.
62dimensions across 7 lenses, read from 132,400 lines of product code in 2 projects.
Chapters

Executive summary

writingmate/aidictation falls short of our standard for a preview release because its Explicit debt dimensions are rated Critical, and it has errors that are caught and ignored. It scores 49.1 out of 100, which alone would earn Adequate, but it is rated Weak: a rating can't sit more than one step above its weakest group.

Code Health, at 40.5, is the weakest lens and counts most in the score. The best first step is handling the discarded errors, worth about 7.8 points. Removing the copied code comes next, worth about 5.7 points. Raising Code Health to 67 would lift the score to about 56.3.

Ninety-two errors are caught and ignored, so failures can go unnoticed. Fifty-eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Handling or logging the ignored errors and pinning each tool to an exact version would close both risks. Updating the vulnerable packages would fix the 15 packages with a known security hole, and passing outside input through environment variables would deal with the five pipeline steps that put outside input straight into a shell command. The loop of parts of the code that depend on each other needs breaking by moving the shared parts into a project of their own.

The product code is 132,400 lines, about €200,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.
Code Health 40.5 · counts for 46%Production Readiness 47.0 · counts for 25%Performance 60.0 · counts for 14%Maturity 66.4 · counts for 8%Security and Compliance 67.4 · counts for 4%Domain Modelling 74.4 · counts for 2%Architecture 75.8 · counts for 1%

If Code Health rose from 40.5 to 67, the lowest score rated Strong, the score would rise from 49.1 to about 56.3.

Code composition: what the lines of code are
Business logic 47%Supporting code 29%Tests 24%
Rebuild cost: about €200,000 · Estimate
Cost to rebuild€66,000 to €330,000, for 1,095 to 3,520 hours of work, about 1.4 person-years for 1 to 3 engineers
Difficulty of the problemHigh, 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 49. 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: 132,400 lines of product code
Comment linesThe estimate prices 109,613 lines. Comment lines count towards the size of 132,400 lines but aren't priced as work.
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 92 EmptyCatchBlock finding(s) in Explicit Debt — start with AudioProcessingCoordinator.cs (20), Program.cs (20), REDACTED (11).
Raises the score by about 7.8 points · Medium effort · Explicit Debt
2
Act on each finding's own remediation rather than one rule: the move depends on what recurs.
Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
Raises the score by about 5.7 points · Medium effort · Code Duplication
3
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.
Raises the score by about 3.8 points · Medium effort · Security & performance tooling

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 €200,000 to build again, about 1.4 person-years of work. Its weakest lens is Code Health, at 40.5 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 92 EmptyCatchBlock finding(s) in Explicit Debt. Of all the actions in this report, it raises the score most for the work it takes: about 7.8 points for medium effort, because it clears the 92 Explicit Debt findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 45,809 lines over the last 90 days, which is about 185,781 lines a year. At that pace, the extra work comes to an estimated 13 to 78.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

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

116 modules, with 138 dependencies between them. 5 loops run through 16 of the modules, marked above the diagonal.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 AIDictation.Models2 com.whispermate.aidictation.data.local.ManagedAudioSourceFiles3 com.whispermate.aidictation.data.remote.TranscriptionClient4 com.whispermate.aidictation.domain.model5 com.whispermate.aidictation.review6 com.whispermate.aidictation.service.CaptureNativeFence7 com.whispermate.aidictation.service.ExclusiveRequestFence8 com.whispermate.aidictation.ui.views9 AIDictation.ViewModels10 com.whispermate.aidictation.data.local.ParakeetLiteRtModel11 com.whispermate.aidictation.data.local.ParakeetTranscriber12 com.whispermate.aidictation.data.local.entity13 com.whispermate.aidictation.data.preferences.AppPreferences14 rkr.simplekeyboard.inputmethod.latin.inputlogic15 AIDictation.Views16 com.whispermate.aidictation.data.local.dao17 com.whispermate.aidictation.data.local.entity.RecordingEntity18 com.whispermate.aidictation.data.preferences19 rkr.simplekeyboard.inputmethod.latin20 AIDictation.Services21 com.whispermate.aidictation.data.local22 com.whispermate.aidictation.telemetry23 com.whispermate.aidictation.ui.screens.language24 com.whispermate.aidictation.ui.screens.transcription25 rkr.simplekeyboard.inputmethod.latin.utils26 (global)27 com.whispermate.aidictation.data.remote28 com.whispermate.aidictation.di29 com.whispermate.aidictation.util30 rkr.simplekeyboard.inputmethod.keyboard.internal31 com.whispermate.aidictation.data.repository32 rkr.simplekeyboard.inputmethod.keyboard33 com.whispermate.aidictation34 com.whispermate.aidictation.service.AndroidAudioProcessingCoordinator35 rkr.simplekeyboard.inputmethod.latin.settings36 com.whispermate.aidictation.service37 rkr.simplekeyboard.inputmethod.event38 com.whispermate.aidictation.ui.screens.main39 com.whispermate.aidictation.ui.screens.onboarding40 com.whispermate.aidictation.ui.screens.recording
1 AIDictation.Models
2 com.whispermate.aidictation.data.local.ManagedAudioSourceFiles
3 com.whispermate.aidictation.data.remote.TranscriptionClient
4 com.whispermate.aidictation.domain.model
5 com.whispermate.aidictation.review
6 com.whispermate.aidictation.service.CaptureNativeFence
7 com.whispermate.aidictation.service.ExclusiveRequestFence
8 com.whispermate.aidictation.ui.views
9 AIDictation.ViewModels6
10 com.whispermate.aidictation.data.local.ParakeetLiteRtModel1
11 com.whispermate.aidictation.data.local.ParakeetTranscriber2
12 com.whispermate.aidictation.data.local.entity1
13 com.whispermate.aidictation.data.preferences.AppPreferences4
14 rkr.simplekeyboard.inputmethod.latin.inputlogic2112
15 AIDictation.Views228
16 com.whispermate.aidictation.data.local.dao4
17 com.whispermate.aidictation.data.local.entity.RecordingEntity11
18 com.whispermate.aidictation.data.preferences41
19 rkr.simplekeyboard.inputmethod.latin11232
20 AIDictation.Services141
21 com.whispermate.aidictation.data.local1222
22 com.whispermate.aidictation.telemetry212
23 com.whispermate.aidictation.ui.screens.language11
24 com.whispermate.aidictation.ui.screens.transcription61
25 rkr.simplekeyboard.inputmethod.latin.utils42
26 (global)226
27 com.whispermate.aidictation.data.remote421
28 com.whispermate.aidictation.di21
29 com.whispermate.aidictation.util1
30 rkr.simplekeyboard.inputmethod.keyboard.internal1211
31 com.whispermate.aidictation.data.repository111113212
32 rkr.simplekeyboard.inputmethod.keyboard63311
33 com.whispermate.aidictation122
34 com.whispermate.aidictation.service.AndroidAudioProcessingCoordinator6235
35 rkr.simplekeyboard.inputmethod.latin.settings81
36 com.whispermate.aidictation.service7111311196
37 rkr.simplekeyboard.inputmethod.event1
38 com.whispermate.aidictation.ui.screens.main611233
39 com.whispermate.aidictation.ui.screens.onboarding51222
40 com.whispermate.aidictation.ui.screens.recording33
Uses a module listed above itPart of a loopThe module itself
1 AIDictation.Models2 com.whispermate.aidictation.data.local.ManagedAudioSourceFiles3 com.whispermate.aidictation.data.remote.TranscriptionClient4 com.whispermate.aidictation.domain.model5 com.whispermate.aidictation.review6 com.whispermate.aidictation.service.CaptureNativeFence7 com.whispermate.aidictation.service.ExclusiveRequestFence8 com.whispermate.aidictation.ui.views9 AIDictation.ViewModels10 com.whispermate.aidictation.data.local.ParakeetLiteRtModel11 com.whispermate.aidictation.data.local.ParakeetTranscriber12 com.whispermate.aidictation.data.local.entity13 com.whispermate.aidictation.data.preferences.AppPreferences14 rkr.simplekeyboard.inputmethod.latin.inputlogic15 AIDictation.Views16 com.whispermate.aidictation.data.local.dao17 com.whispermate.aidictation.data.local.entity.RecordingEntity18 com.whispermate.aidictation.data.preferences19 rkr.simplekeyboard.inputmethod.latin20 AIDictation.Services21 com.whispermate.aidictation.data.local22 com.whispermate.aidictation.telemetry23 com.whispermate.aidictation.ui.screens.language24 com.whispermate.aidictation.ui.screens.transcription25 rkr.simplekeyboard.inputmethod.latin.utils26 (global)27 com.whispermate.aidictation.data.remote28 com.whispermate.aidictation.di29 com.whispermate.aidictation.util30 rkr.simplekeyboard.inputmethod.keyboard.internal31 com.whispermate.aidictation.data.repository32 rkr.simplekeyboard.inputmethod.keyboard33 com.whispermate.aidictation34 com.whispermate.aidictation.service.AndroidAudioProcessingCoordinator35 rkr.simplekeyboard.inputmethod.latin.settings36 com.whispermate.aidictation.service37 rkr.simplekeyboard.inputmethod.event38 com.whispermate.aidictation.ui.screens.main39 com.whispermate.aidictation.ui.screens.onboarding40 com.whispermate.aidictation.ui.screens.recordingAIDictation.Models1com.whispermate.aidictation.data.local.ManagedAudioSourceFiles2com.whispermate.aidictation.data.remote.TranscriptionClient3com.whispermate.aidictation.domain.model4com.whispermate.aidictation.review5com.whispermate.aidictation.service.CaptureNativeFence6com.whispermate.aidictation.service.ExclusiveRequestFence7com.whispermate.aidictation.ui.views8AIDictation.ViewModels9com.whispermate.aidictation.data.local.ParakeetLiteRtModel10com.whispermate.aidictation.data.local.ParakeetTranscriber11com.whispermate.aidictation.data.local.entity12com.whispermate.aidictation.data.preferences.AppPreferences13rkr.simplekeyboard.inputmethod.latin.inputlogic14AIDictation.Views15com.whispermate.aidictation.data.local.dao16com.whispermate.aidictation.data.local.entity.RecordingEntity17com.whispermate.aidictation.data.preferences18rkr.simplekeyboard.inputmethod.latin19AIDictation.Services20com.whispermate.aidictation.data.local21com.whispermate.aidictation.telemetry22com.whispermate.aidictation.ui.screens.language23com.whispermate.aidictation.ui.screens.transcription24rkr.simplekeyboard.inputmethod.latin.utils25(global)26com.whispermate.aidictation.data.remote27com.whispermate.aidictation.di28com.whispermate.aidictation.util29rkr.simplekeyboard.inputmethod.keyboard.internal30com.whispermate.aidictation.data.repository31rkr.simplekeyboard.inputmethod.keyboard32com.whispermate.aidictation33com.whispermate.aidictation.service.AndroidAudioProcessingCoordinator34rkr.simplekeyboard.inputmethod.latin.settings35com.whispermate.aidictation.service36rkr.simplekeyboard.inputmethod.event37com.whispermate.aidictation.ui.screens.main38com.whispermate.aidictation.ui.screens.onboarding39com.whispermate.aidictation.ui.screens.recording4061214211222841141112321411222212116142226421211121111111321263311122623581711131119616112335122233+76 more modules (most-connected shown)

At a glance — Code Health · 40.5 · Weak · gated by D17, R10 ·

At a glance — Architecture · 75.8 · Adequate · gated by AX2 ·

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

At a glance — Readiness · 47.0 · Adequate · gated by P3, P7 ·

At a glance — Security · 67.4 · Adequate · gated by D29, D36 ·

At a glance — Domain Modelling · 74.4 · Adequate · gated by DM11 ·

At a glance — Performance · 60.0 · Adequate ·

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 — Injection71High / Critical
A03:2025 — Software Supply Chain Failures30High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Resolve the 92 EmptyCatchBlock finding(s) in Explicit Debt — start with AudioProcessingCoordinator.cs (20), Program.cs (20), REDACTED (11); Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract; 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.

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

Do thisHelpsEffortDimension
Resolve the 92 EmptyCatchBlock finding(s) in Explicit Debt — start with AudioProcessingCoordinator.cs (20), Program.cs (20), REDACTED (11).+7.8 ptsMediumExplicit Debt
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.+5.7 ptsMediumCode Duplication
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.+3.8 ptsMediumSecurity & performance tooling
Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.+2.3 ptsMediumOutbound HTTP resilience
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.+1.6 ptsMediumDead Code
Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.+1.6 ptsMediumAsync & latency hygiene
Resolve the 2 No assertions finding(s) in Test Quality — start with TranscriptionCleanupPromptTests.swift (2).+0.7 ptsLowTest Quality
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+1.3 ptsMediumObservability

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
AIDictation.Windows/RecoveryContract/Program.cs1.0SlopExplicit Debt: EmptyCatchBlock
AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs1.7SlopExplicit Debt: EmptyCatchBlock
AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs2.2SlopExplicit Debt: EmptyCatchBlock
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.5SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.5SlopDependency Vulnerabilities: High CVE: REDACTED
AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs2.5SlopExplicit Debt: EmptyCatchBlock
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
AIDictation.Windows/AIDictation/Services/HotkeyService.cs2.8SlopExplicit Debt: EmptyCatchBlock
REDACTED3.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED3.0MixedStatic Analysis (SAST): High: REDACTED
AIDictation.Windows/AIDictation/Services/ClipboardService.cs3.3MixedExplicit Debt: EmptyCatchBlock
AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs3.6MixedExplicit Debt: EmptyCatchBlock
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED

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

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

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

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

Could not be resolved — 19

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

Methodology & how to trust this report

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

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

What we checked — 62 dimensions across the health lenses
D1D2D3D4D5D6D10D13D14D15D17D19D20D21D24D26D27D28D29D30D34D35D36D37D43D44AX10AX2AX3AX4AX5AX6AX9DM10DM11DM12DM6DM9GD1M1M2M3M4P1P2P3P4P6P7P8PF3R1R10R2R3R5R6R7R8R9X20X5

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, 1193 of 1208 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 01a1e6c4-2fdf-729e-aaf7-fd304aaac65a.

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 test suite could not be built/run in-image (commonly external-service dependencies — a database, a broker — we won't provision). To have it measured, make the suite runnable without them. For context only, test code is ≈ 4% of production LoC (5,481 test / 131,158 production) — a rough proxy, NOT a coverage measurement, so it is excluded from the score. You can widen what we reach: optional: make the suite runnable without a database, broker or other service we do not provision, and real coverage is measured on the next scan.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 111 test(s) behind this row are the ones the code-model census could read, and this repository also carries at least 18 test source file(s) (.kt) that it cannot: it reads the test types the .swift frontend declared, so a suite in any other language is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .swift, and the built-in reliability runner cannot re-run the .swift test suite(s) — so reliability was not measured for the repository as a whole. The Java/Kotlin (AIDictationAndroid, Gradle): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (4 contributor(s) across 1060 commit(s) sampled, automation and bot accounts excluded). One of them holds 95% of the history; the other 3 hold 1.7% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'AIDictation.Windows/AIDictation/AIDictation.csproj' with message: Package 'CredentialManagement 1.0.2' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8….
  • D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 92 deducted marker(s) and the 4.8/KLoC density on this row were taken over this repository's .NET projects ALONE: .swift (63,964 lines, 58% of production source), .kt (21,024 lines, 19% of production source) went unread, because every marker collector on this path is reached through a C# workspace. D17's marker collectors need a compiler we do not have for that language, so none of its nine marker kinds were read there. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their 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 — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
  • D23 Boundary Type-Coupling — 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. Large codebase (131,158 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — 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. Tracing effort is measured over resolved call sites, and all 1149 sampled here came from .swift files. This repository's .kt source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
  • 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. `AIDictation.Windows/AIDictation/Services/SentryTelemetry.cs`, `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/AudioRequestPolicy.kt`, `Whishpermate/WhisperMateIOS/ContentView.swift`, `Whishpermate/WhisperMateShared/AudioVisualizationView.swift`, `Whishpermate/WhisperMateShared/Networking/TranscriptionCleanupGuard.swift`, … (+12 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.
  • DM8 Value-object opportunities — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The frontend declares that it computes whether a construction is produced or passed, yet 302 of 508 constructions arrived without the answer. Arm two skipped them; it did not clear them.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — 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.
  • X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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'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. 20 further occurrence(s) are not listed individually; the score already reflects all 60.
  • X21 Side-effecting pattern guard — 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.
  • X22 Contradicted release guard — 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.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
  • X25 Inert configuration knob — 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.
  • X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 58 further occurrence(s) are not listed individually; the score already reflects all 98.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • 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.
  • 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.
  • 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 Complexity6.2 / 10Adequate✓ Tool-verified

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

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

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

109 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MobileAudioProcessingStore.validateSnapshotLayoutLocked at 85. A further 9 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 KeyCodeHelper.string at 49 — they are counted neither in the figure above nor in this dimension's score. 3 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: Whishpermate/WhisperMateShared/DesignSystem.swift (DSTypography.font at 32), Whishpermate/WhisperMateShared/Models/Language.swift (Language.displayName at 27), AIDictation.Windows/AIDictation/Models/Hotkey.cs (Hotkey.GetKeyDisplayName at 21). 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.

MobileAudioProcessingStore.validateSnapshotLayoutLocked (cyclomatic 85)Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2232
HotkeyOption.from (cyclomatic 48)Whishpermate/Whispermate/Views/HotkeyRecorderView.swift:164
AudioProcessingCoordinator.StartCaptureAsync (cyclomatic 45)AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:204
MobileAudioProcessingStore.normalizeInterruptedAttempts (cyclomatic 44)Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1376
OnboardingScreenKt.OnboardingScreen (cyclomatic 41)AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:216

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

What to do

  1. Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with MobileAudioProcessingStore.validateSnapshotLayoutLocked (cyclomatic 85). — Refactoring it lifts Cyclomatic Complexity from 6.2 to about 6.5/10.

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

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

146 method(s) exceeded the cognitive complexity threshold of 15; the worst was MobileAudioProcessingStore.normalizeInterruptedAttempts at 91.

OpenAIClient.chatCompletion (cognitive 16) · ×2Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:545
MobileAudioProcessingStore.normalizeInterruptedAttempts (cognitive 91)Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1376
MobileAudioProcessingStore.validateSnapshotLayoutLocked (cognitive 85)Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2232
AppState.handleRecorderFinalizationTerminal (cognitive 85)Whishpermate/Whispermate/Services/AppState.swift:827
AudioRecorder.start (cognitive 59)AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/util/AudioRecorder.kt:139

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

What to do

  1. Bring the 3 bodies over 60 down to 60 or less in Cognitive Complexity — start with MobileAudioProcessingStore.normalizeInterruptedAttempts (cognitive 91), MobileAudioProcessingStore.validateSnapshotLayoutLocked (cognitive 85), AppState.handleRecorderFinalizationTerminal (cognitive 85). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 5.6 to about 6.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

122 god class(es) detected.

MethodTooLong: Contract.VerifyCoordinatorDeadlineRacesAsync · ×40AIDictation.Windows/RecoveryContract/Program.cs:1904
FileTooLong: WhisperMateIOS/ContentView.swift · ×36Whishpermate/WhisperMateIOS/ContentView.swift
ClassTooLong: AppState · ×24Whishpermate/Whispermate/Services/AppState.swift:15
TooManyMethods: OverlayDictationAccessibilityService · ×22AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:161

What to do

  1. Resolve the 40 MethodTooLong finding(s) in God Classes — start with AppState.swift (7), Program.cs (6), AudioProcessingCoordinator.cs (5). — One of this dimension's main actionable groups (40 warning-level).
  2. Resolve the 36 FileTooLong finding(s) in God Classes — start with AudioRecorder.swift (2), OpenAIClient.swift (2), ContentView.swift. — One of this dimension's main actionable groups (36 warning-level).
  3. Resolve the 24 ClassTooLong finding(s) in God Classes — start with ContentView.swift (2), AudioRecorder.swift (2), OpenAIClient.swift (2). — One of this dimension's main actionable groups (24 warning-level).

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

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

272 duplicated block group(s) detected. 9.1 % of the production lines (11,969 of 131,158) are in a reported copy. A further 202 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 57 of the 474 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (9 lines × 2) · ×19AIDictation.Windows/RecoveryContract/Program.cs:1139
Duplicated block (6 lines × 2) · ×15AIDictation.Windows/RecoveryContract/Program.cs:1528
Duplicated block (10 lines × 2) · ×13Whishpermate/WhisperMateIOS/ContentView.swift:230
Edited copy of a member (9 corresponding lines) · ×12AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:410
Duplicated block (12 lines × 2) · ×12AIDictation.Windows/AIDictation/Services/ClipboardService.cs:200

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

What to do

  1. Resolve the 19 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with FnKeyMonitor.swift (2), validate_ios_audio_processing_recovery.swift (2), Program.cs. — One of this dimension's main actionable groups (19 warning-level).
  2. Resolve the 15 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with PromptRule.swift (2), MacAudioProcessingStore.swift (2), Program.cs. — One of this dimension's main actionable groups (15 warning-level).
  3. Resolve the 13 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with ContentView.swift (3), validate_ios_audio_processing_recovery.swift (2), Recording.swift. — One of this dimension's main actionable groups (13 warning-level).

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

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

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

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

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

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

2 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

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

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

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

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

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

7 of 147 classes have LCOM4 above 3.

Low cohesion: StatusBarManager (LCOM4 13) · ×7Whishpermate/Whispermate/Services/StatusBarManager.swift:78

What to do

  1. Resolve the 7 Low cohesion finding(s) in Cohesion (LCOM4) — start with StatusBarManager.swift, WhispermateApp.swift, APIProvider.swift. — One of this dimension's main actionable groups (7 warning-level).

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

D10 · Test Quality9.7 / 10Stronggated by 2 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.7 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 2 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 111 tests. Measured on the .swift suite only — at least 18 test source file(s) (.kt) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: testDictationRequiresStandaloneFillerDeletion · ×2Whishpermate/WhispermateTests/TranscriptionCleanupPromptTests.swift:4

What to do

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

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.2 / 10Stronggated by 15 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.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: Whishpermate/Whispermate/Services/AppState.swift (26×39=1014); AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt (18×41=738); Whishpermate/WhisperMateIOS/ContentView.swift (21×26=546)

Hotspot: Whishpermate/Whispermate/Services/AppState.swift · ×15Whishpermate/Whispermate/Services/AppState.swift:827

What to do

  1. Resolve the 15 Hotspot finding(s) in Churn × Complexity Hotspots — start with AppState.swift, OnboardingScreen.kt, ContentView.swift. — One of this dimension's main actionable groups (15 warning-level).

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

D17 · Explicit Debt0.5 / 10Critical✓ 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 0.5 / 10 · rule-coverage 100% · ceiling Prevented

92 deducted debt markers + unmeasured dead symbols across 17268 LoC in the .NET projects (4.8/KLoC) → score 0.5. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .swift, .kt (78% of production source) was not read, and carries at least 0 uncounted task marker(s) in 0 file(s).

EmptyCatchBlock · ×92REDACTED:254

What to do

  1. Resolve the 92 EmptyCatchBlock finding(s) in Explicit Debt — start with AudioProcessingCoordinator.cs (20), Program.cs (20), REDACTED (11). — One of this dimension's main actionable groups (92 issue-level).

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

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

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

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

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

2 of 2 documentation facets pass in full. 16 document(s) read across 6 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 foundAIDictation.Windows/AIDictation/AIDictation.csproj:4

What to do

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

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

D21 · Naming 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

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

`StartTrackedClose` returns an awaitable but lacks the `Async` suffix its 110 peers carryAIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:566

✓ On the Gold path — maintain.

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

D24 · Comment Value7.9 7.7 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 7.7 / 10 · rule-coverage 98% · ceiling Documented

5 of 235 judged comments only repeat the code they sit on (2.1 %). 6 comment(s) in another language or script were not judged.

redundant comment · ×5REDACTED:107
doc comments repeat the namesAIDictation.Windows/AIDictation/Services/AppState.cs:272

What to do

  1. Resolve the 5 redundant comment finding(s) in Comment Value — start with REDACTED (2), HotkeyService.cs (2), MainWindow.xaml.cs. — One of this dimension's main actionable groups (5 recommendation-level).

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

D26 · Project Cohesion10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 of 2 projects flagged as possibly oversized/incoherent.

✓ On the Gold path — maintain.

Detailed fixes: d26_recommendation.md.

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

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

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

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

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

0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: medium — clean/modular boundaries expected. Measured over the .swift source only — this repository's .kt was not sampled for call sites, so this score covers part of the tree, not all of it.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)2.2 / 10Critical✓ Tool-verified

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

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

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

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

71 finding(s): 0 critical, 65 high, 6 medium, 0 low. 58 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 4 file(s) — `AIDictation.Windows/AIDictation/Services/SentryTelemetry.cs` (lines 12–143), `AIDictationAndroid/gradlew` (line 74, line 178), `Whishpermate/Whispermate/Services/HotkeyManager.swift` (line 347, line 815, line 866, …), `ci_scripts/write_secrets_plist.sh` (line 4) — 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. In 1 of those file(s) — `AIDictation.Windows/AIDictation/Services/SentryTelemetry.cs` — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything. Separately, one or more rules could not re-parse an embedded snippet in 9 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities6.5 / 10Adequate✓ Tool-verified

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 6.5 / 10 · rule-coverage 100% · ceiling Documented

19 finding(s): 0 critical, 15 high, 4 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 15 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (15). — One of this dimension's main actionable groups (15 issue-level).
  2. Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 warning-level).

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

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

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

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

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 42 of the 55 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

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

Strongest change-coupling: SettingsScreen.kt↔TranscriptionSettingsScreen.kt 90%; MainScreen.kt↔TranscriptionSettingsScreen.kt 80%; TranscriptionCleanupPrompt.kt↔validate_transcription_cleanup_prompt.swift 73%

Boundary-crossing change coupling: TranscriptionCleanupPrompt.kt ↔ validate_transcription_cleanup_prompt.swiftAIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionCleanupPrompt.kt:1
Change coupling: MainScreen.kt ↔ TranscriptionSettingsScreen.kt · ×8AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt:1
Change-coupling hub: SettingsScreen.kt → TranscriptionRepository.kt, CircularMicButton.kt, TranscriptionSettingsScreen.kt, CircularMicButtonView.ktAIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with TranscriptionCleanupPrompt.kt. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 8 Change coupling finding(s) in Change Coupling — start with ContentView.swift (2), MainScreen.kt, KeyboardViewController.swift. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with SettingsScreen.kt. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition9.6 / 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.

AX2 · Stateful singletons1.9 / 10Critical✓ Tool-verified

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

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

  • `AppState` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (CurrentAudioLevel, PeakAudioLevel, RecordingDuration; e.g. `CurrentAudioLevel` at line 262). — AIDictation.Windows/AIDictation/Services/AppState.cs:10
  • `AuthService` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (IsAuthenticated, IsLoading, ErrorMessage, CurrentUser; e.g. `IsAuthenticated` at line 83). — AIDictation.Windows/AIDictation/Services/AuthService.cs:22
  • `HotkeyService` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_dictationHotkey, _commandHotkey, _dictationKeyDown, _commandKeyDown, _keyboardHookId, _mouseHookId; e.g. `_dictationHotkey` at line 145). — AIDictation.Windows/AIDictation/Services/HotkeyService.cs:15
  • `OverlayService` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_overlayWindow, _position, _hideWhenIdle, _colorTheme, _isEnabled; e.g. `_overlayWindow` at line 45). — AIDictation.Windows/AIDictation/Services/OverlayService.cs:11
  • `SettingsService` keeps one instance of itself in the static `Instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (DictionaryEntries, Shortcuts, ContextRules; e.g. `DictionaryEntries` at line 161). — AIDictation.Windows/AIDictation/Services/SettingsService.cs:16
  • `OverlayWindow` is not registered, but the singleton `OverlayService` creates it and keeps it in `_overlayWindow`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_position, _hideWhenIdle, _colorTheme, _isHovering, _resetToken, _state; e.g. `_position` at line 114). — AIDictation.Windows/AIDictation/Views/OverlayWindow.xaml.cs:19
  • `SentryTelemetry` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_started; e.g. `_started` at line 48). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — AIDictation.Windows/AIDictation/Services/SentryTelemetry.cs:12
  • `ApiConfigManager` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (transcriptionConfig; e.g. `transcriptionConfig` in `switchTranscriptionToCloud` at line 68). — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/preferences/ApiConfigManager.kt:40
  • `InstallationAnalytics` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (authResolved, observedUserId; e.g. `authResolved` in `start` at line 86). — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/telemetry/InstallationAnalytics.kt:53

What to do

  • Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
  • Java/Kotlin: keep container singletons stateless — move per-request data into locals or a request-scoped bean — or back the state with java.util.concurrent types (ConcurrentHashMap, AtomicInteger/AtomicReference), guard it with synchronized / a Lock (Kotlin: withLock), or mark a flag that is only ever overwritten volatile (@Volatile).
  • A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
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.

  • The namespaces AIDictation.Services ↔ AIDictation.Views depend on each other. The lightest dependency in the cycle is AIDictation.Services → AIDictation.Views (AIDictation.Services.OverlayService → AIDictation.Views.OverlayWindow, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — AIDictation.Windows/AIDictation/Services/OverlayService.cs:4

What to do

  • Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

  • `IAudioProcessingStore` declares 20 members: `PersistenceHealthy`, `BeginCaptureAsync`, `CaptureBecameReadyAsync`, `BeginFinalizationAsync`, `AdoptFinalizedCaptureAsync`, `RecordCaptureKnownIncompleteAsync`, `BeginRecognitionAsync`, `SaveCheckpointAsync`, `SaveRawResultAsync`, `CompleteAsync`, `ClaimUsageAsync`, `FailAsync`, `CancelAsync`, `AbandonAttemptAsync`, `TombstoneAsync`, `ClearAsync`, `RecoverOnLaunchAsync`, `ImportLegacyFinalizedSourceAsync`, `AcceptLegacySourceOwnershipAsync`, `GetAsync`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. — AIDictation.Windows/AIDictation/Services/AudioProcessingContracts.cs:63
  • `RecordingDao` declares 28 abstract methods: `getAllRecordings`, `getRecordingById`, `getActiveRecordings`, `getFinalizationRecoveryCandidates`, `getInactiveRecordings`, `getDeletedRecordingsWithSources`, `insertRecording`, `claimRetry`, `advanceCapture`, `promoteRecoveredFinalizedSource`, `checkpoint`, `markRecognitionComplete`, `finishAttemptRow`, `finishRecognitionPreservingProgressRow`, `normalizeAbandonedAttemptRows`, `tombstone`, `tombstoneExact`, `tombstoneAllInactive`, `clearDeletedSourcePath`, `insertUsageClaim`, `insertInstallationAnalyticsEvent`, `getUsageClaimById`, `getNextPendingUsageClaimId`, `observePendingUsageClaimCount`, `markUsageClaimed`, `getUsageClaimCount`, `activeCount`, `getRecordingCount`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/dao/RecordingDao.kt:18

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
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.

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

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

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

DM11 · Constructible invalid state3.0 / 10Weak✓ Tool-verified

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

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

  • `InstallationAnalyticsEventEntity`'s public constructor takes `eventId`, `installationId`, `anonymousId`, `eventName`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `InstallationAnalyticsEventEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/entity/InstallationAnalyticsEventEntity.kt:11
  • `RecordingEntity`'s public constructor takes `id`, `transcription`, `audioFilePath`, `status`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `RecordingEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/entity/RecordingEntity.kt:10
  • `UsageClaimEntity`'s public constructor takes `id`, `recordingId`, `state`, `usageDestination` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `UsageClaimEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/entity/UsageClaimEntity.kt:17

What to do

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

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

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

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

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

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

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

DM9 · Scattered domain decisions9.2 / 10Exemplary✓ Tool-verified

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

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

  • AIDictation.Services.AudioAttemptLease's [AttemptId, ClearGeneration, DeletionGeneration, RecordingId] are judged in AIDictation.Services.AudioProcessingCoordinator, AIDictation.Services.AudioRecorderService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • AIDictation.Services.AudioAttemptLease's [AttemptId, ClearGeneration, DeletionGeneration, RecordingId] are judged in AIDictation.Services.AudioProcessingCoordinator, Contract.FakeCoordinatorStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.

What to do

  • Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
GD1 · Unfinished & placeholder code9.8 / 10Exemplary✓ Tool-verified

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

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

  • A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×5) — AIDictation.Windows/AIDictation/Converters/OnboardingConverters.cs:55, AIDictation.Windows/AIDictation/Converters/SettingsConverters.cs:53, AIDictation.Windows/AIDictation/Converters/SettingsConverters.cs:74, …

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation2.0 / 10Weak✓ 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 gates10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability5.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 1/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 tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add 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 15 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:8
  • `AIDictation.Windows/AIDictation/AIDictation.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — AIDictation.Windows/AIDictation/AIDictation.csproj:21

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.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

P6 · Release 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.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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

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

  • `new HttpClient { Timeout = Timeout.InfiniteTimeSpan }` builds an outbound HTTP client, and what is applied to it does not bound it. Its `Timeout` is set to `Timeout.InfiniteTimeSpan`, which removes HttpClient's own bound rather than setting one. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. (×3) — AIDictation.Windows/AIDictation/Services/LanguagePostProcessService.cs:46, AIDictation.Windows/AIDictation/Services/TranscriptionService.cs:35, AIDictation.Windows/AIDictation/Services/WhisperLocalService.cs:85
  • `new HttpClient(new DelegateHandler(async (request, token) => { sentBody = awa...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — AIDictation.Windows/RecoveryContract/Program.cs:1604
  • `new HttpClient(new DelegateHandler((_, _) => Task.FromResult(JsonResponse(sta...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — AIDictation.Windows/RecoveryContract/Program.cs:1632
  • `new HttpClient(new DelegateHandler((_, _) => Task.FromResult(new HttpResponse...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — AIDictation.Windows/RecoveryContract/Program.cs:1640
  • `new HttpClient(new DelegateHandler((_, _) => { var content = new ByteArrayCon...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — AIDictation.Windows/RecoveryContract/Program.cs:1655
  • `new HttpClient(new DelegateHandler((_, _) => Task.FromResult(response)))` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — AIDictation.Windows/RecoveryContract/Program.cs:1681
  • `new HttpClient(new DelegateHandler(async (_, token) => { await Task.Delay(Tim...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — AIDictation.Windows/RecoveryContract/Program.cs:1690
  • `new HttpClient(new DelegateHandler((_, _) => ignoredCleanup.Task))` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — AIDictation.Windows/RecoveryContract/Program.cs:1704

What to do

  • Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.
P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

PF3 · Async & latency hygiene6.0 / 10Adequate✓ 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.

  • `testStickyCancellationBeforeNewAndRetryAllocationReturns` is async and calls .wait() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — scripts/validate_ios_audio_processing_recovery.swift:748
  • `testBoundedDeepValidationAndCaptureLimitFinalization` is async and calls Thread.sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — scripts/validate_ios_audio_processing_recovery.swift:961
  • 11 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • `.GetAwaiter() .GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×3) — REDACTED:663, AIDictation.Windows/RecoveryContract/Program.cs:1911, AIDictation.Windows/RecoveryContract/Program.cs:1947
  • `deleteRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — AIDictation.Windows/RecoveryContract/Program.cs:1531
  • `clearRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — AIDictation.Windows/RecoveryContract/Program.cs:1559
  • `factoryRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — AIDictation.Windows/RecoveryContract/Program.cs:1818
  • `release.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — AIDictation.Windows/RecoveryContract/Program.cs:1863
  • `_captureSnapshotRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — AIDictation.Windows/RecoveryContract/Program.cs:3388
  • `_synchronousSetupRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — AIDictation.Windows/RecoveryContract/Program.cs:3411
  • `_startPreparingRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — AIDictation.Windows/RecoveryContract/Program.cs:3598
  • `_startRetryingRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — AIDictation.Windows/RecoveryContract/Program.cs:3618

What to do

  • Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
  • Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
R1 · Type Safety8.5 / 10Strong✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • 21 duplicated blocks under marketing/videos/ have copies in at least two of the sibling directories 2026-07-30-how-to-use-dictation-on-mac, 2026-08-01-voice-typing-android, 2026-08-02-open-source-speech-to-text — 14 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 21 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:13
  • marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:13 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:13 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:13
  • marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:39 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:41 — the two spans are one implementation copied and then locally edited — 502 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:39
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/components.tsx:154 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:212 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/components.tsx:154
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/components.tsx:11 · marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:13 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:13 — the 3 copies are spread across 3 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/components.tsx:11
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:245 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:110 — the two spans are one implementation copied and then locally edited — 359 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:245
  • marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:74 · marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:181 — the two spans are one implementation copied and then locally edited — 290 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:74
  • marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:188 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:185 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:188
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/theme.ts:5 · marketing/videos/2026-08-01-voice-typing-android/src/theme.ts:4 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/theme.ts:5
  • marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:254 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:213 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:254
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/Root.tsx:21 · marketing/videos/2026-08-01-voice-typing-android/src/Root.tsx:21 · marketing/videos/2026-08-02-open-source-speech-to-text/src/Root.tsx:21 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/Root.tsx:21
  • marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:232 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:196 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:232
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:300 · marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:263 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:222 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:300
  • supabase/functions/appsumo-webhook/index.ts:122 · supabase/functions/appsumo-webhook/index.ts:172 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — supabase/functions/appsumo-webhook/index.ts:122
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:22 · marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:23 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:22
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/Root.tsx:15 · marketing/videos/2026-08-01-voice-typing-android/src/Root.tsx:15 · marketing/videos/2026-08-02-open-source-speech-to-text/src/Root.tsx:15 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/Root.tsx:15
  • marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:165 · marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:170 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:165
  • marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:118 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:127 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:118
  • marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:26 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:234 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:26

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • (anonymous) has cyclomatic complexity 38 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — supabase/functions/appsumo-webhook/index.ts:49
  • declareNoSocialMedia has cyclomatic complexity 20 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/submit_ios_for_review.mjs:99
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

R5 · Dependency Freshness9.6 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling6.7 / 10Strong✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add eslint as package.json scripts and run them in CI.
R7 · Dead Code6.4 / 10Adequate✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 4 application, 3 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run typecheck` — an undetected custom entry would make these reachable.
  • no import path from any entry point (4 application, 3 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make — supabase/functions/appsumo-webhook/index.ts
  • no import path from any entry point (4 application, 3 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (supabase/functions/appsumo-webhook/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — supabase/functions/_shared/appsumo-tiers.ts

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types8.7 / 10Strong✓ Tool-verified

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

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

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

What to do

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

Reference — by lens

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

LensScoreRatingImpact
Code Health40.5Weak — gated by D17, R10Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture75.8Adequate — gated by AX2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity66.4Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness47.0Adequate — gated by P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security67.4Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling74.4Adequate — gated by DM11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateStrongest area.
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.

  • AXR1 Runtime accessibility (rendered) — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 24 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 22 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 72 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AX1 Captive dependencies — no DI registrations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half has no runner
  • D12 Dependency Hygiene — Dependency hygiene not measured
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .java, .kt, .py, .rb, .swift, .ts, .tsx, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
  • 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) — 17 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 dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured
  • DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
  • DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
  • DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • DM8 Value-object opportunities — not scored — the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show one)
  • 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
  • IC1 Incompleteness & stubs — IC1 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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'.
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R4 Test Coverage — the JS/TS workspace (18 production file(s)) has no JavaScript/TypeScript test, but it is 2.55% of this repository's production source and the other 97.45% carries 5,228 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • X1 Async correctness — X1 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X12 Unreachable branch — X12 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — X13 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 — X18 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 — X2 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X21 Side-effecting pattern guard — X21 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X22 Contradicted release guard — X22 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 — X24 reached only 19% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X25 Inert configuration knob — X25 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X26 Unsynchronised callback handoff — X26 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X27 Collection changed while being enumerated — X27 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — X29 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X3 Exception handling — X3 reached only 16% of this repository's production lines — swift (63,964 lines), kotlin (21,024 lines), python (3,634 lines), typescript (2,137 lines), javascript (1,242 lines), ruby (1,125 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 — 175 finding(s)
D17 · Explicit Debt · EmptyCatchBlock · ×92
  • EmptyCatchBlock REDACTED:254 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:460 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:489 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:525 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:562 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:666 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:667 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:811 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:837 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:855 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock REDACTED:933 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Helpers/CredentialHelper.cs:104 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Helpers/CredentialHelper.cs:122 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Helpers/CredentialHelper.cs:137 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Helpers/CredentialHelper.cs:160 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Helpers/CredentialHelper.cs:195 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioExportDeadline.cs:46 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:185 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:846 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:857 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:951 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1136 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1237 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1280 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1304 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • + 67 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 33 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AX3 · Project dependency cycles · Namespace dependency cycle · ×1
  • Namespace dependency cycle AIDictation.Windows/AIDictation/Services/OverlayService.cs:4 — The namespaces AIDictation.Services ↔ AIDictation.Views depend on each other. The lightest dependency in the cycle is AIDictation.Services → AIDictation.Views (AIDictation.Services.OverlayService → AIDictation.Views.OverlayWindow, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
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: TranscriptionCleanupPrompt.kt ↔ validate_transcription_cleanup_prompt.swift AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionCleanupPrompt.kt:1 — `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionCleanupPrompt.kt` (context AIDictationAndroid) and `scripts/validate_transcription_cleanup_prompt.swift` (context scripts) sit in DIFFERENT parts of the tree yet change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — 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 8 shared commits counted here, the most recent 3 are `365f9a75` Harden cleanup prompt so dictated requests are edited, not acted on; `3bd23948` Fit the dictation boundary within the cleanup prompt word budget; `f5456b35` Keep dictated requests as text instead of fulfilling them — run `git show` on any of them.
Serious — 966 finding(s)
D3 · God Classes · MethodTooLong · ×40
  • MethodTooLong: Contract.VerifyCoordinatorDeadlineRacesAsync AIDictation.Windows/RecoveryContract/Program.cs:1904 — MethodTooLong — VerifyCoordinatorDeadlineRacesAsync runs 666 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 566 over it, 6.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Contract.VerifyDurableStoreAsync AIDictation.Windows/RecoveryContract/Program.cs:705 — MethodTooLong — VerifyDurableStoreAsync runs 495 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 395 over it, 4.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: Contract.VerifyHttpMatrixAsync AIDictation.Windows/RecoveryContract/Program.cs:54 — MethodTooLong — VerifyHttpMatrixAsync runs 247 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 147 over it, 2.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.handleRecorderFinalizationTerminal Whishpermate/Whispermate/Services/AppState.swift:827 — MethodTooLong — handleRecorderFinalizationTerminal runs 238 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 138 over it, 2.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AudioProcessingCoordinator.StartCaptureAsync AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:204 — MethodTooLong — StartCaptureAsync runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InlineRecordingCoordinator.transcribeAudio Whishpermate/WhisperMateIOS/ContentView.swift:3679 — MethodTooLong — transcribeAudio runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AndroidAudioProcessingCoordinator.retry AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1079 — MethodTooLong — retry runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× 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: MobileAudioProcessingStore.normalizeInterruptedAttempts Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1376 — MethodTooLong — normalizeInterruptedAttempts 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: RecordingSheetView.transcribeAudio Whishpermate/WhisperMateIOS/RecordingSheetView.swift:904 — MethodTooLong — transcribeAudio runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Contract.VerifyFinalizedAdoptionRecoveryAsync AIDictation.Windows/RecoveryContract/Program.cs:1255 — MethodTooLong — VerifyFinalizedAdoptionRecoveryAsync runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× 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: OnboardingScreenKt.ButtonDemoStep AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:724 — MethodTooLong — ButtonDemoStep runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.runRetranscription Whishpermate/Whispermate/Services/AppState.swift:1422 — MethodTooLong — runRetranscription runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× 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: Contract.VerifyDeferredDeletedCleanupAsync AIDictation.Windows/RecoveryContract/Program.cs:1425 — MethodTooLong — VerifyDeferredDeletedCleanupAsync runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AndroidAudioProcessingCoordinator.stopCapture AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:509 — MethodTooLong — stopCapture runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingsView.accountSection Whishpermate/Whispermate/Views/SettingsView.swift:376 — MethodTooLong — accountSection runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InlineRecordingCoordinator.beginRecording Whishpermate/WhisperMateIOS/ContentView.swift:3288 — MethodTooLong — beginRecording runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InlineRecordingCoordinator.stopRecording Whishpermate/WhisperMateIOS/ContentView.swift:3498 — MethodTooLong — stopRecording 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: AppState.executeTranscriptionAttempt Whishpermate/Whispermate/Services/AppState.swift:2241 — MethodTooLong — executeTranscriptionAttempt runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingsView.generalSection Whishpermate/Whispermate/Views/SettingsView.swift:806 — MethodTooLong — generalSection runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AudioProcessingCoordinator.StopAndTranscribeAsync AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:459 — MethodTooLong — StopAndTranscribeAsync runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AudioProcessingCoordinator.RunRecognitionAsync AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1075 — MethodTooLong — RunRecognitionAsync runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AudioRecorder.start AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/util/AudioRecorder.kt:139 — MethodTooLong — start runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.startRealtimeTranscriptionIfAvailable Whishpermate/Whispermate/Services/AppState.swift:2763 — MethodTooLong — startRealtimeTranscriptionIfAvailable runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× 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: AndroidAudioProcessingCoordinator.startCapture AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:342 — MethodTooLong — startCapture runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppState.finalizeRecording Whishpermate/Whispermate/Services/AppState.swift:660 — MethodTooLong — finalizeRecording runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× 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.
  • + 15 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×36
  • FileTooLong: WhisperMateIOS/ContentView.swift Whishpermate/WhisperMateIOS/ContentView.swift — FileTooLong — 3195 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2695 over it, 6.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Services/AppState.swift Whishpermate/Whispermate/Services/AppState.swift — FileTooLong — 3030 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: AppState (16-3871). The bar is 500 significant lines; this is 2530 over it, 6.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: RecoveryContract/Program.cs AIDictation.Windows/RecoveryContract/Program.cs — FileTooLong — 2973 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2473 over it, 5.95× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Services/MacAudioProcessingStore.swift Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift — FileTooLong — 2503 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2003 over it, 5.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Services/MobileAudioProcessingStore.swift Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift — FileTooLong — 2216 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1716 over it, 4.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: service/OverlayDictationAccessibilityService.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt — FileTooLong — 1999 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: OverlayDictationAccessibilityService (161-2916). The bar is 500 significant lines; this is 1499 over it, 4.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: Services/AudioProcessingCoordinator.cs AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs — FileTooLong — 1433 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 933 over it, 2.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Views/SettingsView.swift Whishpermate/Whispermate/Views/SettingsView.swift — FileTooLong — 1335 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: SettingsView (118-1847). The bar is 500 significant lines; this is 835 over it, 2.67× 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: service/AndroidAudioProcessingCoordinator.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt — FileTooLong — 1309 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: AndroidAudioProcessingCoordinator (196-1726). The bar is 500 significant lines; this is 809 over it, 2.62× 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: Services/KeyboardDictationHandoff.swift Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift — FileTooLong — 1264 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: KeyboardDictationHandoff (12-1803). The bar is 500 significant lines; this is 764 over it, 2.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: onboarding/OnboardingScreen.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt — FileTooLong — 1207 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 707 over it, 2.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: WhisperMateIOS/RecordingSheetView.swift Whishpermate/WhisperMateIOS/RecordingSheetView.swift — FileTooLong — 1199 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: RecordingSheetView (6-1517). The bar is 500 significant lines; this is 699 over it, 2.40× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Services/AudioRecorder.swift Whishpermate/Whispermate/Services/AudioRecorder.swift — FileTooLong — 1132 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: AudioRecorder (6-1174). The bar is 500 significant lines; this is 632 over it, 2.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: Views/OnboardingView.swift Whishpermate/Whispermate/Views/OnboardingView.swift — FileTooLong — 1066 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: OnboardingView (4-1338). The bar is 500 significant lines; this is 566 over it, 2.13× 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: Services/AudioProcessingStore.cs AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs — FileTooLong — 965 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 465 over it, 1.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: formal/mac_audio_store_model.py formal/mac_audio_store_model.py — FileTooLong — 765 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 265 over it, 1.53× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Services/AudioRecorder.swift Whishpermate/WhisperMateShared/Services/AudioRecorder.swift — FileTooLong — 763 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: AudioRecorder (46-1037). The bar is 500 significant lines; this is 263 over it, 1.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Services/OverlayWindowManager.swift Whishpermate/Whispermate/Services/OverlayWindowManager.swift — FileTooLong — 756 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: OverlayWindowManager (89-1162). The bar is 500 significant lines; this is 256 over it, 1.51× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Components/TranscriptionSettingsView.swift Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift — FileTooLong — 744 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 244 over it, 1.49× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: WhisperMateKeyboard/KeyboardViewController.swift Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift — FileTooLong — 742 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: KeyboardViewController (5-1059). The bar is 500 significant lines; this is 242 over it, 1.48× 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: Services/HotkeyManager.swift Whishpermate/Whispermate/Services/HotkeyManager.swift — FileTooLong — 715 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: HotkeyManager (6-1036). The bar is 500 significant lines; this is 215 over it, 1.43× 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: Services/OpenAIClient.swift Whishpermate/Whispermate/Services/OpenAIClient.swift — FileTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: OpenAIClient (224-1031). The bar is 500 significant lines; this is 208 over it, 1.42× 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: formal/android_overlay_model.py formal/android_overlay_model.py — FileTooLong — 693 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 193 over it, 1.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Services/AudioRecorderService.cs AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs — FileTooLong — 673 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 173 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Services/AudioDeviceManager.swift Whishpermate/Whispermate/Services/AudioDeviceManager.swift — FileTooLong — 664 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: AudioDeviceManager (10-1003). 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.
  • + 11 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×24
  • ClassTooLong: AppState Whishpermate/Whispermate/Services/AppState.swift:15 — ClassTooLong — 2867 significant lines (blank, comment-only and punctuation-only lines excluded), 84 methods. The bar is 400 significant lines; this is 2467 over it, 7.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: Contract AIDictation.Windows/RecoveryContract/Program.cs — ClassTooLong — 2284 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 1884 over it, 5.71× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: OverlayDictationAccessibilityService AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:161 — ClassTooLong — 1894 significant lines (blank, comment-only and punctuation-only lines excluded), 126 methods. The bar is 400 significant lines; this is 1494 over it, 4.74× 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: ContentView Whishpermate/WhisperMateIOS/ContentView.swift:21 — ClassTooLong — 1310 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 910 over it, 3.28× 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: KeyboardDictationHandoff Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:12 — ClassTooLong — 1260 significant lines (blank, comment-only and punctuation-only lines excluded), 73 methods. The bar is 400 significant lines; this is 860 over it, 3.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SettingsView Whishpermate/Whispermate/Views/SettingsView.swift:118 — ClassTooLong — 1155 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 755 over it, 2.89× 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: AndroidAudioProcessingCoordinator AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:196 — ClassTooLong — 1150 significant lines (blank, comment-only and punctuation-only lines excluded), 38 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: RecordingSheetView Whishpermate/WhisperMateIOS/RecordingSheetView.swift:6 — ClassTooLong — 1131 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 731 over it, 2.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: InlineRecordingCoordinator Whishpermate/WhisperMateIOS/ContentView.swift:2732 — ClassTooLong — 1100 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 700 over it, 2.75× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OnboardingView Whishpermate/Whispermate/Views/OnboardingView.swift:4 — ClassTooLong — 938 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 538 over it, 2.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AudioRecorder Whishpermate/Whispermate/Services/AudioRecorder.swift:6 — ClassTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 371 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.
  • ClassTooLong: KeyboardViewController Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:5 — ClassTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 339 over it, 1.85× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OverlayWindowManager Whishpermate/Whispermate/Services/OverlayWindowManager.swift:89 — ClassTooLong — 696 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 296 over it, 1.74× 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: AudioRecorder Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:46 — ClassTooLong — 663 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 263 over it, 1.66× 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: AudioDeviceManager Whishpermate/Whispermate/Services/AudioDeviceManager.swift:10 — ClassTooLong — 648 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 248 over it, 1.62× 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: HotkeyManager Whishpermate/Whispermate/Services/HotkeyManager.swift:6 — ClassTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 224 over it, 1.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OpenAIClient Whishpermate/Whispermate/Services/OpenAIClient.swift:224 — ClassTooLong — 548 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 148 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: AuthManager Whishpermate/WhisperMateShared/Services/AuthManager.swift:55 — ClassTooLong — 529 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 129 over it, 1.32× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TranscriptionResult AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionClient.kt:46 — ClassTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 118 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SharedTranscriptionService Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:3 — ClassTooLong — 494 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 94 over it, 1.24× 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: OpenAIClient Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:32 — ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 91 over it, 1.23× 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: ClipboardManager Whishpermate/Whispermate/Services/ClipboardManager.swift:5 — ClassTooLong — 487 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 87 over it, 1.22× 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: RecordingOverlayView Whishpermate/Whispermate/Views/RecordingOverlayView.swift:4 — ClassTooLong — 439 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 39 over it, 1.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.
  • ClassTooLong: AuthRepository AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/repository/AuthRepository.kt:52 — ClassTooLong — 403 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 3 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · TooManyMethods · ×22
  • TooManyMethods: OverlayDictationAccessibilityService AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:161 — TooManyMethods — 126 methods. The bar is 30 methods; this is 96 over it, 4.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MobileAudioProcessingStore Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:181 — TooManyMethods — 94 methods. The bar is 30 methods; this is 64 over it, 3.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AppState Whishpermate/Whispermate/Services/AppState.swift:15 — TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MacAudioProcessingStore Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:13 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: App REDACTED — TooManyMethods — 540 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SettingsViewModel AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs — TooManyMethods — 436 significant lines (blank, comment-only and punctuation-only lines excluded), 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: KeyboardViewController Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:5 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: AudioProcessingCoordinator AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs — TooManyMethods — 1399 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HotkeyManager Whishpermate/Whispermate/Services/HotkeyManager.swift:6 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OverlayWindowManager Whishpermate/Whispermate/Services/OverlayWindowManager.swift:89 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ContentView Whishpermate/WhisperMateIOS/ContentView.swift:21 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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: AudioProcessingStore AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs — TooManyMethods — 875 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AudioRecorderService AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs — TooManyMethods — 633 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AudioRecorder Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:46 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AndroidAudioProcessingCoordinator AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:196 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AudioDeviceManager Whishpermate/Whispermate/Services/AudioDeviceManager.swift:10 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AuthRepository AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/repository/AuthRepository.kt:52 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: FakeCoordinatorStore AIDictation.Windows/RecoveryContract/Program.cs — TooManyMethods — 349 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 30 methods; this is 3 over it, 1.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: RecordingSheetView Whishpermate/WhisperMateIOS/RecordingSheetView.swift:6 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.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: AuthManager Whishpermate/WhisperMateShared/Services/AuthManager.swift:55 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AudioRecorder Whishpermate/Whispermate/Services/AudioRecorder.swift:6 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OverlayMicButtonView AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:23 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×19
  • Duplicated block (9 lines × 2) AIDictation.Windows/RecoveryContract/Program.cs:1139 — AIDictation.Windows/RecoveryContract/Program.cs:1139-1147 | AIDictation.Windows/RecoveryContract/Program.cs:1174-1182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictation.Windows/RecoveryContract/Program.cs:1139` 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, `AIDictation.Windows/RecoveryContract/Program.cs:1149` calls `Exists`, `Delete` and `AIDictation.Windows/RecoveryContract/Program.cs:1184` 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) Whishpermate/WhisperMateIOS/ContentView.swift:341 — Whishpermate/WhisperMateIOS/ContentView.swift:341-349 | Whishpermate/WhisperMateIOS/ContentView.swift:475-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateIOS/ContentView.swift:341` 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 `spacing` to `16` in one and `8` 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) Whishpermate/WhisperMateShared/Services/DebugLog.swift:58 — Whishpermate/WhisperMateShared/Services/DebugLog.swift:58-66 | Whishpermate/Whispermate/Services/DebugLog.swift:67-75 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/DebugLog.swift` and `Whishpermate/Whispermate/Services/DebugLog.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:250 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:250-259 | Whishpermate/Whispermate/Services/MacAsyncDeadline.swift:52-60 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:250` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) Whishpermate/Whispermate/Services/ClipboardManager.swift:583 — Whishpermate/Whispermate/Services/ClipboardManager.swift:583-591 | Whishpermate/Whispermate/Services/ClipboardManager.swift:625-633 — both copies are in the same file, so extract the 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) Whishpermate/Whispermate/Services/FnKeyMonitor.swift:127 — Whishpermate/Whispermate/Services/FnKeyMonitor.swift:127-135 | Whishpermate/Whispermate/Services/HotkeyManager.swift:568-576 — 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 `Whishpermate/Whispermate/Services/FnKeyMonitor.swift:127` 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, `Whishpermate/Whispermate/Services/FnKeyMonitor.swift:122` calls `info` and `Whishpermate/Whispermate/Services/HotkeyManager.swift:563` 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) Whishpermate/Whispermate/Services/HotkeyManager.swift:500 — Whishpermate/Whispermate/Services/HotkeyManager.swift:500-508 | Whishpermate/Whispermate/Services/HotkeyManager.swift:531-539 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/HotkeyManager.swift:500` 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) Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:136 — Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:136-144 | Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:212-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:136` 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) Whishpermate/Whispermate/Views/HistoryView.swift:140 — Whishpermate/Whispermate/Views/HistoryView.swift:140-148 | Whishpermate/Whispermate/Views/HistoryView.swift:302-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/HistoryView.swift:140` 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) Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:106 — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:106-114 | Whishpermate/Whispermate/Services/SentryTelemetry.swift:165-173 — before extracting anything, compare `Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift` and `Whishpermate/Whispermate/Services/SentryTelemetry.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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 `Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:106` 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) Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:181 — Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:181-189 | Whishpermate/Whispermate/WhispermateApp.swift:167-175 — 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) Whishpermate/WhisperMateShared/Services/RecordingFinalizationAttempt.swift:25 — Whishpermate/WhisperMateShared/Services/RecordingFinalizationAttempt.swift:25-33 | Whishpermate/WhisperMateShared/Services/RecordingPreparationAttempt.swift:38-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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (9 lines × 2) Whishpermate/Whispermate/Services/FnKeyMonitor.swift:257 — Whishpermate/Whispermate/Services/FnKeyMonitor.swift:257-265 | Whishpermate/Whispermate/Services/HotkeyManager.swift:589-597 — 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) Whishpermate/Whispermate/Services/SendToAIManager.swift:95 — Whishpermate/Whispermate/Services/SendToAIManager.swift:95-103 | Whishpermate/Whispermate/Services/TextFormattingManager.swift:190-198 — before extracting anything, compare `Whishpermate/Whispermate/Services/SendToAIManager.swift` and `Whishpermate/Whispermate/Services/TextFormattingManager.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:28 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:28-36 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt:371-379 — before extracting anything, compare `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt: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) scripts/validate_ios_audio_processing_recovery.swift:695 — scripts/validate_ios_audio_processing_recovery.swift:695-703 | scripts/validate_ios_audio_processing_recovery.swift:847-855 — both copies are in the same file, so extract the 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) scripts/validate_ios_audio_processing_recovery.swift:1396 — scripts/validate_ios_audio_processing_recovery.swift:1396-1406 | scripts/validate_ios_audio_processing_recovery.swift:1470-1478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:1396` 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) scripts/validate_keyboard_audio_recovery.swift:207 — scripts/validate_keyboard_audio_recovery.swift:207-219 | scripts/validate_keyboard_audio_recovery.swift:440-448 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_keyboard_audio_recovery.swift:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) scripts/validate_macos_realtime_finalization.swift:345 — scripts/validate_macos_realtime_finalization.swift:345-353 | scripts/validate_macos_realtime_finalization.swift:423-431 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D15 · Churn × Complexity Hotspots · Hotspot · ×15
  • Hotspot: Whishpermate/Whispermate/Services/AppState.swift Whishpermate/Whispermate/Services/AppState.swift:827 — Whishpermate/Whispermate/Services/AppState.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in AppState.handleRecorderFinalizationTerminal at line 827. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/Whispermate/Services/AppState.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: AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:216 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in OnboardingScreenKt.OnboardingScreen at line 216. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Whishpermate/WhisperMateIOS/ContentView.swift Whishpermate/WhisperMateIOS/ContentView.swift:3288 — Whishpermate/WhisperMateIOS/ContentView.swift changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in InlineRecordingCoordinator.beginRecording at line 3288. 5 of those changes were fix/bug commits, and the other 16 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/WhisperMateIOS/ContentView.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: scripts/validate_ios_audio_processing_recovery.swift scripts/validate_ios_audio_processing_recovery.swift:2204 — scripts/validate_ios_audio_processing_recovery.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in validate_ios_audio_processing_recovery.swift.testIOSCallerRecoveryContracts at line 2204. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- scripts/validate_ios_audio_processing_recovery.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: Whishpermate/Whispermate/Views/SettingsView.swift Whishpermate/Whispermate/Views/SettingsView.swift:376 — Whishpermate/Whispermate/Views/SettingsView.swift changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in SettingsView.accountSection at line 376. 1 of those changes was a fix/bug commit, and the other 20 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/Whispermate/Views/SettingsView.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: AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1584 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in OverlayDictationAccessibilityService.startRecording at line 1584. 1 of those changes was a fix/bug commit, and the other 21 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Whishpermate/Whispermate/Views/RecordingOverlayView.swift Whishpermate/Whispermate/Views/RecordingOverlayView.swift:354 — Whishpermate/Whispermate/Views/RecordingOverlayView.swift changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in RecordingOverlayView.contentView at line 354. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/Whispermate/Views/RecordingOverlayView.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: Whishpermate/Whispermate/Services/AudioRecorder.swift Whishpermate/Whispermate/Services/AudioRecorder.swift:556 — Whishpermate/Whispermate/Services/AudioRecorder.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AudioRecorder.processCaptureBuffer at line 556. 3 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/Whispermate/Services/AudioRecorder.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: scripts/validate_macos_transcription_attempt_snapshot.swift scripts/validate_macos_transcription_attempt_snapshot.swift:130 — scripts/validate_macos_transcription_attempt_snapshot.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ValidateMacOSTranscriptionAttemptSnapshot.main at line 130. 1 of those changes was a fix/bug commit, 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- scripts/validate_macos_transcription_attempt_snapshot.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: AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt:75 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in MainScreenKt.MainScreen at line 75. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:425 — Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in RecordingDetailView.body at line 425. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/Whispermate/Views/HistoryMasterDetailView.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: formal/android_overlay_model.py formal/android_overlay_model.py:539 — formal/android_overlay_model.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in android_overlay_model.system_actions at line 539. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- formal/android_overlay_model.py`: 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: Whishpermate/Whispermate/Services/OpenAIClient.swift Whishpermate/Whispermate/Services/OpenAIClient.swift:294 — Whishpermate/Whispermate/Services/OpenAIClient.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in OpenAIClient.transcribe at line 294. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/Whispermate/Services/OpenAIClient.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: Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:724 — Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in KeyboardViewController.reconcileHandoff at line 724. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/WhisperMateKeyboard/KeyboardViewController.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: Whishpermate/WhisperMateIOS/RecordingSheetView.swift Whishpermate/WhisperMateIOS/RecordingSheetView.swift:904 — Whishpermate/WhisperMateIOS/RecordingSheetView.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in RecordingSheetView.transcribeAudio at line 904. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 15:25:17 -08:00' --until='2026-11-15 15:25:17 -08:00' --full-history --no-merges -- Whishpermate/WhisperMateIOS/RecordingSheetView.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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×15
  • Duplicated block (6 lines × 2) AIDictation.Windows/RecoveryContract/Program.cs:1528 — AIDictation.Windows/RecoveryContract/Program.cs:1528-1533 | AIDictation.Windows/RecoveryContract/Program.cs:1556-1561 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictation.Windows/RecoveryContract/Program.cs:1528` 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 (6 lines × 2) Whishpermate/WhisperMateShared/Models/PromptRule.swift:73 — Whishpermate/WhisperMateShared/Models/PromptRule.swift:73-78 | Whishpermate/Whispermate/Models/PromptRule.swift:74-79 — before extracting anything, compare `Whishpermate/WhisperMateShared/Models/PromptRule.swift` and `Whishpermate/Whispermate/Models/PromptRule.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1108 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1108-1113 | Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift:101-111 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/AudioRecorder.swift` and `Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 (6 lines × 2) Whishpermate/WhisperMateShared/Services/DebugLog.swift:13 — Whishpermate/WhisperMateShared/Services/DebugLog.swift:13-18 | Whishpermate/Whispermate/Services/DebugLog.swift:19-24 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/DebugLog.swift` and `Whishpermate/Whispermate/Services/DebugLog.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 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 `Whishpermate/WhisperMateShared/Services/DebugLog.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.
  • Duplicated block (6 lines × 2) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1080 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1080-1085 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1462-1467 — both copies are in the same file, so extract the 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, `Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1460` calls `now` and `Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1078` 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) Whishpermate/WhisperMateShared/Models/PromptRule.swift:65 — Whishpermate/WhisperMateShared/Models/PromptRule.swift:65-70 | Whishpermate/Whispermate/Models/PromptRule.swift:66-71 — before extracting anything, compare `Whishpermate/WhisperMateShared/Models/PromptRule.swift` and `Whishpermate/Whispermate/Models/PromptRule.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) Whishpermate/Whispermate/Services/FnKeyMonitor.swift:140 — Whishpermate/Whispermate/Services/FnKeyMonitor.swift:140-145 | Whishpermate/Whispermate/Services/HotkeyManager.swift:582-587 — 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 `Whishpermate/Whispermate/Services/FnKeyMonitor.swift:140` 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 (6 lines × 2) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1358 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1358-1363 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1430-1435 — both copies are in the same file, so extract the 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) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1993 — AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1993-1998 | AIDictation.Windows/AIDictation/Services/BoundedHttpContentReader.cs:188-193 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) Whishpermate/WhisperMateShared/Models/Recording.swift:37 — Whishpermate/WhisperMateShared/Models/Recording.swift:37-42 | Whishpermate/Whispermate/Models/Recording.swift:118-123 — 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) Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:130 — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:130-135 | Whishpermate/Whispermate/Services/SentryTelemetry.swift:230-235 — before extracting anything, compare `Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift` and `Whishpermate/Whispermate/Services/SentryTelemetry.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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. 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:232 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:232-237 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:291-296 — 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 (6 lines × 2) formal/android_overlay_model.py:949 — formal/android_overlay_model.py:949-954 | formal/android_overlay_model.py:964-969 — both copies are in the same file, so extract the 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) scripts/validate_ios_audio_processing_recovery.swift:1298 — scripts/validate_ios_audio_processing_recovery.swift:1298-1303 | scripts/validate_ios_audio_processing_recovery.swift:1380-1388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) scripts/validate_macos_audio_processing_store.swift:1705 — scripts/validate_macos_audio_processing_store.swift:1705-1710 | scripts/validate_macos_audio_processing_store.swift:1738-1743 — both copies are in the same file, so extract the 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×14
  • Sync-over-async blocking scripts/validate_ios_audio_processing_recovery.swift:748 — `testStickyCancellationBeforeNewAndRetryAllocationReturns` is async and calls .wait() — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking scripts/validate_ios_audio_processing_recovery.swift:961 — `testBoundedDeepValidationAndCaptureLimitFinalization` is async and calls Thread.sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
  • Sync-over-async blocking — 11 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking REDACTED:663 — `.GetAwaiter() .GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:1911 — `.GetAwaiter() .GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:1947 — `.GetAwaiter() .GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:1531 — `deleteRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:1559 — `clearRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:1818 — `factoryRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:1863 — `release.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:3388 — `_captureSnapshotRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:3411 — `_synchronousSetupRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:3598 — `_startPreparingRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking AIDictation.Windows/RecoveryContract/Program.cs:3618 — `_startRetryingRelease.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×13
  • Duplicated block (10 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:230 — Whishpermate/WhisperMateIOS/ContentView.swift:230-239 | Whishpermate/WhisperMateIOS/ContentView.swift:581-590 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateIOS/ContentView.swift:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3689 — Whishpermate/WhisperMateIOS/ContentView.swift:3689-3698 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:911-920 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3689` 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) Whishpermate/WhisperMateIOS/ContentView.swift:4265 — Whishpermate/WhisperMateIOS/ContentView.swift:4265-4274 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:240-249 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:4265` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Whishpermate/WhisperMateShared/Models/Recording.swift:44 — Whishpermate/WhisperMateShared/Models/Recording.swift:44-53 | Whishpermate/Whispermate/Models/Recording.swift:125-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. 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) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:478 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:478-487 | Whishpermate/Whispermate/Services/OpenAIClient.swift:693-702 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:478` 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) Whishpermate/WhisperMateShared/Services/AuthManager.swift:480 — Whishpermate/WhisperMateShared/Services/AuthManager.swift:480-489 | Whishpermate/WhisperMateShared/Services/AuthManager.swift:504-513 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateShared/Services/AuthManager.swift:480` 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) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:419 — Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:419-430 | Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:468-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:419` 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:87 — Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:87-96 | Whishpermate/Whispermate/Services/SecretsLoader.swift:65-74 — 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 `Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:87` 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) Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:50 — Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:50-59 | Whishpermate/Whispermate/Services/KeychainHelper.swift:42-51 — before extracting anything, compare `Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift` and `Whishpermate/Whispermate/Services/KeychainHelper.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:261 — Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:261-270 | Whishpermate/Whispermate/Services/SonioxRealtimeTranscriptionClient.swift:294-303 — 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 (10 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:158 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:158-167 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt:475-484 — before extracting anything, compare `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:251 — scripts/validate_ios_audio_processing_recovery.swift:251-260 | scripts/validate_ios_audio_processing_recovery.swift:1587-1596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:251` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:414 — scripts/validate_ios_audio_processing_recovery.swift:414-423 | scripts/validate_ios_audio_processing_recovery.swift:479-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×12
  • Edited copy of a member (9 corresponding lines) AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:410 — AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:410-418 | AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs:798-806 — 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) Whishpermate/WhisperMateShared/DesignSystem.swift:79 — Whishpermate/WhisperMateShared/DesignSystem.swift:79-87 | Whishpermate/WhisperMateShared/DesignSystem.swift:96-104 — 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) AIDictation.Windows/AIDictation/Services/HistoryService.cs:123 — AIDictation.Windows/AIDictation/Services/HistoryService.cs:123-131 | AIDictation.Windows/AIDictation/Services/HistoryService.cs:136-145 — 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) Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:105 — Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:105-113 | Whishpermate/Whispermate/Services/SecretsLoader.swift:82-91 — 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) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:161 — Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:161-169 | Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:193-201 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/preferences/ApiConfigManager.kt:74 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/preferences/ApiConfigManager.kt:74-82 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/preferences/ApiConfigManager.kt:84-92 — 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) Whishpermate/Whispermate/WhispermateApp.swift:33 — Whishpermate/Whispermate/WhispermateApp.swift:33-41 | Whishpermate/Whispermate/WhispermateApp.swift:43-51 — 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) Whishpermate/Whispermate/Services/AudioDeviceManager.swift:933 — Whishpermate/Whispermate/Services/AudioDeviceManager.swift:933-943 | Whishpermate/Whispermate/Services/FnKeyMonitor.swift:117-125 — 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) Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:20 — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:20-28 | Whishpermate/Whispermate/Services/AppState.swift:2981-2989 — 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) Whishpermate/WhisperMateIOS/ContentView.swift:4062 — Whishpermate/WhisperMateIOS/ContentView.swift:4062-4070 | Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:331-342 — 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) Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:30 — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:30-38 | Whishpermate/Whispermate/Services/AppState.swift:2991-2999 — 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) Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:40 — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:40-48 | Whishpermate/Whispermate/Services/AppState.swift:2941-2954 — 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 (12 lines × 2) · ×12
  • Duplicated block (12 lines × 2) AIDictation.Windows/AIDictation/Services/ClipboardService.cs:200 — AIDictation.Windows/AIDictation/Services/ClipboardService.cs:200-211 | AIDictation.Windows/AIDictation/Services/ClipboardService.cs:216-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictation.Windows/AIDictation/Services/ClipboardService.cs:200` 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) AIDictation.Windows/RecoveryContract/Program.cs:844 — AIDictation.Windows/RecoveryContract/Program.cs:844-855 | AIDictation.Windows/RecoveryContract/Program.cs:917-928 — both copies are in the same file, so extract the 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, `AIDictation.Windows/RecoveryContract/Program.cs:844` calls `True`, `Exists` and `AIDictation.Windows/RecoveryContract/Program.cs:917` 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) Whishpermate/WhisperMateIOS/ContentView.swift:433 — Whishpermate/WhisperMateIOS/ContentView.swift:433-444 | Whishpermate/WhisperMateIOS/ContentView.swift:597-608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateIOS/ContentView.swift:433` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `12` in one and `10` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Whishpermate/WhisperMateIOS/ContentView.swift:445` calls `lineLimit` and `Whishpermate/WhisperMateIOS/ContentView.swift:609` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1541 — Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1541-1552 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1584-1595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1541` 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, `Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1553` calls `pickerStyle`, `buttonStyle` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1597` 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) Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:85 — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:85-96 | Whishpermate/Whispermate/Services/SentryTelemetry.swift:85-96 — before extracting anything, compare `Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift` and `Whishpermate/Whispermate/Services/SentryTelemetry.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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 (12 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:158 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:158-169 | Whishpermate/Whispermate/Services/OpenAIClient.swift:349-360 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:158` 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) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:432 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:432-443 | Whishpermate/Whispermate/Services/OpenAIClient.swift:656-667 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:432` 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) Whishpermate/Whispermate/Services/AppState.swift:1639 — Whishpermate/Whispermate/Services/AppState.swift:1639-1650 | Whishpermate/Whispermate/Services/AppState.swift:1709-1720 — both copies are in the same file, so extract the 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) Whishpermate/Whispermate/Services/ClipboardManager.swift:610 — Whishpermate/Whispermate/Services/ClipboardManager.swift:610-621 | Whishpermate/Whispermate/Services/ClipboardManager.swift:639-650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/ClipboardManager.swift:610` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) Whishpermate/Whispermate/Services/AppState.swift:4045 — Whishpermate/Whispermate/Services/AppState.swift:4045-4056 | Whishpermate/Whispermate/Services/VoiceActivityDetector.swift:162-173 — 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 (12 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:169 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:169-180 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt:486-497 — before extracting anything, compare `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) scripts/validate_macos_audio_processing_store.swift:578 — scripts/validate_macos_audio_processing_store.swift:578-589 | scripts/validate_macos_audio_processing_store.swift:610-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_macos_audio_processing_store.swift:610` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×12
  • Duplicated block (11 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:522 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:522-532 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:507-517 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 (11 lines × 2) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:537 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:537-547 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:652-662 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:537` 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, `Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:535` calls `partialURL`, `finalURL` and `Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:650` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:165 — Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:165-175 | Whishpermate/Whispermate/Services/SonioxRealtimeTranscriptionClient.swift:222-232 — 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 `Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:162` calls `enqueue` and `Whishpermate/Whispermate/Services/SonioxRealtimeTranscriptionClient.swift:219` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:120 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:120-130 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:963-973 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:120` 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) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:150 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:150-160 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:992-1002 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:150` 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) Whishpermate/Whispermate/Views/OnboardingView.swift:426 — Whishpermate/Whispermate/Views/OnboardingView.swift:426-436 | Whishpermate/Whispermate/Views/OnboardingView.swift:437-447 — both copies are in the same file, so extract the 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, `Whishpermate/Whispermate/Views/OnboardingView.swift:424` calls `modeStars`, `VStack` and `Whishpermate/Whispermate/Views/OnboardingView.swift:436` 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) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:193 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:193-203 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:69-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 (11 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:306 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:306-316 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:303-313 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 (11 lines × 2) Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:94 — Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:94-104 | Whishpermate/Whispermate/Services/SonioxRealtimeTranscriptionClient.swift:122-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) Whishpermate/Whispermate/Services/FnKeyMonitor.swift:167 — Whishpermate/Whispermate/Services/FnKeyMonitor.swift:167-177 | Whishpermate/Whispermate/Services/HotkeyManager.swift:698-708 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt:226 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt:226-236 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt:243-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt:226` 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) scripts/validate_keyboard_audio_recovery.swift:1074 — scripts/validate_keyboard_audio_recovery.swift:1074-1084 | scripts/validate_keyboard_audio_recovery.swift:1094-1104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_keyboard_audio_recovery.swift:1074` 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 (6 corresponding lines) · ×11
  • Edited copy of a member (6 corresponding lines) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1979 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1979-1984 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1992-1997 — 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) Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:78 — Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:78-83 | Whishpermate/Whispermate/Services/AudioRecorder.swift:1437-1444 — 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) Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:13 — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:13-18 | Whishpermate/Whispermate/Services/AppState.swift:2956-2961 — 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) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:96 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:96-101 | Whishpermate/Whispermate/Services/OpenAIClient.swift:279-284 — 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) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1046 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1046-1051 | Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift:14-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) Whishpermate/WhisperMateShared/Models/PromptRule.swift:51 — Whishpermate/WhisperMateShared/Models/PromptRule.swift:51-56 | Whishpermate/Whispermate/Models/PromptRule.swift:52-57 — 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) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:737 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:737-742 | Whishpermate/Whispermate/Services/AppState.swift:4001-4006 — 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) Whishpermate/WhisperMateShared/AudioVisualizationView.swift:367 — Whishpermate/WhisperMateShared/AudioVisualizationView.swift:367-372 | Whishpermate/Whispermate/Views/RecordingOverlayView.swift:777-782 — 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) Whishpermate/WhisperMateShared/Models/APIProvider.swift:233 — Whishpermate/WhisperMateShared/Models/APIProvider.swift:233-238 | Whishpermate/Whispermate/Models/APIProvider.swift:544-549 — 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) Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:203 — Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:203-208 | Whishpermate/Whispermate/Services/HistoryManager.swift:140-147 — 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) scripts/validate_ios_audio_processing_recovery.swift:185 — scripts/validate_ios_audio_processing_recovery.swift:185-190 | scripts/validate_macos_audio_processing_store.swift:106-112 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×11
  • Duplicated block (16 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3026 — Whishpermate/WhisperMateIOS/ContentView.swift:3026-3041 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1373-1388 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3026` 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 (16 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3525 — Whishpermate/WhisperMateIOS/ContentView.swift:3525-3540 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:797-812 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3525` 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) Whishpermate/WhisperMateIOS/ContentView.swift:4045 — Whishpermate/WhisperMateIOS/ContentView.swift:4045-4060 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1214-1229 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 (16 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:12 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:12-27 | Whishpermate/Whispermate/Services/OpenAIClient.swift:13-28 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 (16 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:675 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:675-690 | Whishpermate/Whispermate/Services/OpenAIClient.swift:924-939 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:675` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) Whishpermate/Whispermate/Services/HotkeyManager.swift:510 — Whishpermate/Whispermate/Services/HotkeyManager.swift:510-525 | Whishpermate/Whispermate/Services/HotkeyManager.swift:541-556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/HotkeyManager.swift:510` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:91 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:91-106 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:934-949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) Whishpermate/Whispermate/Views/SettingsView.swift:1139 — Whishpermate/Whispermate/Views/SettingsView.swift:1139-1154 | Whishpermate/Whispermate/Views/SettingsView.swift:1171-1186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/SettingsView.swift:1139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:76 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:76-91 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:175-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:174 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:174-189 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:239-254 — 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:174` 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) scripts/validate_keyboard_audio_recovery.swift:611 — scripts/validate_keyboard_audio_recovery.swift:611-627 | scripts/validate_keyboard_audio_recovery.swift:636-651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_keyboard_audio_recovery.swift:611` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×11
  • Duplicated block (8 lines × 2) AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:411 — AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:411-418 | AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs:799-806 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) REDACTED:358 — REDACTED:358-365 | REDACTED:366-373 — both copies are in the same file, so extract the 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) Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:11 — Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:11-18 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:11-18 — 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 `Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:11` 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) Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:106 — Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:106-113 | Whishpermate/Whispermate/Services/SecretsLoader.swift:84-91 — 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 `Whishpermate/Whispermate/Services/SecretsLoader.swift:84` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Whishpermate/Whispermate/Services/SecretsLoader.swift:83` calls `trimmingCharacters` and `Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:105` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1515 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1515-1522 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1546-1553 — both copies are in the same file, so extract the 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) Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:121 — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:121-128 | Whishpermate/Whispermate/Services/SentryTelemetry.swift:180-187 — before extracting anything, compare `Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift` and `Whishpermate/Whispermate/Services/SentryTelemetry.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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 (8 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:515 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:515-522 | Whishpermate/Whispermate/Services/OpenAIClient.swift:752-763 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 (8 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:109 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:109-116 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:208-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1332 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1332-1339 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt:728-735 — 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1332` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:275 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:275-282 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:380-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:275` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) scripts/validate_keyboard_audio_recovery.swift:826 — scripts/validate_keyboard_audio_recovery.swift:826-833 | scripts/validate_keyboard_audio_recovery.swift:857-864 — both copies are in the same file, so extract the 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) · ×10
  • Edited copy of a member (11 corresponding lines) Whishpermate/WhisperMateShared/AudioVisualizationView.swift:210 — Whishpermate/WhisperMateShared/AudioVisualizationView.swift:210-221 | Whishpermate/Whispermate/Views/RecordingOverlayView.swift:707-717 — 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) Whishpermate/Whispermate/Services/AudioDeviceManager.swift:661 — Whishpermate/Whispermate/Services/AudioDeviceManager.swift:661-671 | Whishpermate/Whispermate/Services/AudioDeviceManager.swift:673-683 — 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) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:255 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:255-265 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:249-259 — 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) Whishpermate/WhisperMateShared/Services/RuntimeCallbackAttempt.swift:315 — Whishpermate/WhisperMateShared/Services/RuntimeCallbackAttempt.swift:315-325 | Whishpermate/Whispermate/Services/PrivacyPermissionFlowManager.swift:64-76 — 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) Whishpermate/Whispermate/Services/AppState.swift:4074 — Whishpermate/Whispermate/Services/AppState.swift:4074-4084 | Whishpermate/Whispermate/Services/VoiceActivityDetector.swift:195-205 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/repository/SubscriptionRepository.kt:139 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/repository/SubscriptionRepository.kt:139-151 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/repository/SubscriptionRepository.kt:153-163 — 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) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:220 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:220-230 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:215-225 — 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) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:403 — Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:403-413 | Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:106-117 — 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) Whishpermate/WhisperMateIOS/ContentView.swift:1078 — Whishpermate/WhisperMateIOS/ContentView.swift:1078-1091 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:592-602 — 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) scripts/validate_release_transcription_config.py:168 — scripts/validate_release_transcription_config.py:168-184 | scripts/validate_release_transcription_config.py:188-198 — 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×10
  • Outbound HTTP without resilience AIDictation.Windows/AIDictation/Services/LanguagePostProcessService.cs:46 — `new HttpClient { Timeout = Timeout.InfiniteTimeSpan }` builds an outbound HTTP client, and what is applied to it does not bound it. Its `Timeout` is set to `Timeout.InfiniteTimeSpan`, which removes HttpClient's own bound rather than setting one. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/AIDictation/Services/TranscriptionService.cs:35 — `new HttpClient { Timeout = Timeout.InfiniteTimeSpan }` builds an outbound HTTP client, and what is applied to it does not bound it. Its `Timeout` is set to `Timeout.InfiniteTimeSpan`, which removes HttpClient's own bound rather than setting one. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/AIDictation/Services/WhisperLocalService.cs:85 — `new HttpClient { Timeout = Timeout.InfiniteTimeSpan }` builds an outbound HTTP client, and what is applied to it does not bound it. Its `Timeout` is set to `Timeout.InfiniteTimeSpan`, which removes HttpClient's own bound rather than setting one. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/RecoveryContract/Program.cs:1604 — `new HttpClient(new DelegateHandler(async (request, token) => { sentBody = awa...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/RecoveryContract/Program.cs:1632 — `new HttpClient(new DelegateHandler((_, _) => Task.FromResult(JsonResponse(sta...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/RecoveryContract/Program.cs:1640 — `new HttpClient(new DelegateHandler((_, _) => Task.FromResult(new HttpResponse...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/RecoveryContract/Program.cs:1655 — `new HttpClient(new DelegateHandler((_, _) => { var content = new ByteArrayCon...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/RecoveryContract/Program.cs:1681 — `new HttpClient(new DelegateHandler((_, _) => Task.FromResult(response)))` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/RecoveryContract/Program.cs:1690 — `new HttpClient(new DelegateHandler(async (_, token) => { await Task.Delay(Tim...` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
  • Outbound HTTP without resilience AIDictation.Windows/RecoveryContract/Program.cs:1704 — `new HttpClient(new DelegateHandler((_, _) => ignoredCleanup.Task))` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×9
  • Edited copy of a member (25 corresponding lines) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1504 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1504-1528 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1534-1568 — 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) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:263 — Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:263-293 | Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:295-319 — 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) Whishpermate/WhisperMateLiveActivity/KeyboardDictationLiveActivity.swift:143 — Whishpermate/WhisperMateLiveActivity/KeyboardDictationLiveActivity.swift:143-170 | Whishpermate/WhisperMateLiveActivity/KeyboardDictationLiveActivity.swift:199-223 — 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) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:721 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:721-745 | Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:747-771 — 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) Whishpermate/Whispermate/Services/AudioDeviceManager.swift:907 — Whishpermate/Whispermate/Services/AudioDeviceManager.swift:907-931 | Whishpermate/Whispermate/Services/FnKeyMonitor.swift:74-100 — 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) Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:61 — Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:61-87 | Whishpermate/Whispermate/Services/KeychainHelper.swift:53-77 — 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) AIDictation.Windows/RecoveryContract/Program.cs:2964 — AIDictation.Windows/RecoveryContract/Program.cs:2964-2990 | AIDictation.Windows/RecoveryContract/Program.cs:2996-3020 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1321 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1321-1345 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt:719-745 — 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) scripts/validate_macos_recording_recovery.swift:189 — scripts/validate_macos_recording_recovery.swift:189-213 | scripts/validate_macos_recording_recovery.swift:256-286 — 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 (8 corresponding lines) · ×9
  • Edited copy of a member (8 corresponding lines) Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:117 — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:117-124 | scripts/validate_ios_realtime_transcription.swift:203-210 — 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) formal/mac_audio_store_model.py:831 — formal/mac_audio_store_model.py:831-838 | formal/mac_audio_store_model.py:866-875 — 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) Whishpermate/WhisperMateShared/Models/APIProvider.swift:292 — Whishpermate/WhisperMateShared/Models/APIProvider.swift:292-299 | Whishpermate/Whispermate/Models/APIProvider.swift:451-459 — 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) Whishpermate/WhisperMateShared/Models/APIProvider.swift:301 — Whishpermate/WhisperMateShared/Models/APIProvider.swift:301-308 | Whishpermate/Whispermate/Models/APIProvider.swift:461-469 — 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) Whishpermate/WhisperMateShared/Models/APIProvider.swift:310 — Whishpermate/WhisperMateShared/Models/APIProvider.swift:310-317 | Whishpermate/Whispermate/Models/APIProvider.swift:471-479 — 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) Whishpermate/WhisperMateShared/Models/APIProvider.swift:319 — Whishpermate/WhisperMateShared/Models/APIProvider.swift:319-326 | Whishpermate/Whispermate/Models/APIProvider.swift:481-489 — 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) Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:48 — Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:48-55 | Whishpermate/Whispermate/Services/SecretsLoader.swift:52-59 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2874 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2874-2881 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayRewritePanelView.kt:370-377 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:182 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:182-189 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingViewModel.kt:378-385 — 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.
D35 · Change Coupling · Change coupling · ×8
  • Change coupling: MainScreen.kt ↔ TranscriptionSettingsScreen.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt:1 — `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `4e38d37c` Android: grouped-list segments for History, Languages, and the transc…; `078e8b5d` Revert "Android: white pages with light-grey cards across the main sc…; `7384fba5` Android: white pages with light-grey cards across the main screens — run `git show` on any of them.
  • Change coupling: ContentView.swift ↔ KeyboardRecordingView.swift Whishpermate/WhisperMateIOS/ContentView.swift:1 — `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateKeyboard/KeyboardRecordingView.swift` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 7 shared commits counted here, the most recent 3 are `328fd61b` fix(ios-keyboard): Fix keyboard dictation setup screen hidden and app…; `2bb5caa4` Implement iOS and keyboard audio recovery; `3d918858` Let free users earn words through referrals — run `git show` on any of them.
  • Change coupling: KeyboardViewController.swift ↔ AudioRecorder.swift Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:1 — `Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift` and `Whishpermate/WhisperMateShared/Services/AudioRecorder.swift` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 `4b3d293d` iOS: reuse the standby audio session for keyboard recording; `3ba9ec79` iOS 0.0.106: fix keyboard Quick Dictation start from background; `7476536b` iOS keyboard: keep Quick Dictation armed after first tap — run `git show` on any of them.
  • Change coupling: ContentView.swift ↔ KeyboardViewController.swift Whishpermate/WhisperMateIOS/ContentView.swift:1 — `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift` change together 58% of the time (11 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 11 shared commits counted here, the most recent 3 are `3ba9ec79` iOS 0.0.106: fix keyboard Quick Dictation start from background; `7476536b` iOS keyboard: keep Quick Dictation armed after first tap; `328fd61b` fix(ios-keyboard): Fix keyboard dictation setup screen hidden and app… — run `git show` on any of them.
  • Change coupling: OnboardingManager.swift ↔ SettingsView.swift Whishpermate/Whispermate/Services/OnboardingManager.swift:1 — `Whishpermate/Whispermate/Services/OnboardingManager.swift` and `Whishpermate/Whispermate/Views/SettingsView.swift` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 9 shared commits counted here, the most recent 3 are `eef22cc3` Stabilize macOS audio and settings before release; `c77007b8` Reduce login friction before the next macOS release; `07addc14` Keep overlay color independent from app theme — run `git show` on any of them.
  • Change coupling: SupabaseManager.swift ↔ SettingsView.swift Whishpermate/WhisperMateShared/Services/SupabaseManager.swift:1 — `Whishpermate/WhisperMateShared/Services/SupabaseManager.swift` and `Whishpermate/Whispermate/Views/SettingsView.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 `b6f312b9` Replace monthly free tier with 5,000-word trial; `3d918858` Let free users earn words through referrals; `3e71ba97` Prepare macOS recording overlay and runtime fixes for release — run `git show` on any of them.
  • Change coupling: Navigation.kt ↔ MainScreen.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/Navigation.kt:1 — `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/Navigation.kt` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f39e66d9` Ship Android 0.0.25; `6fcce4fe` Flatten settings choices around account and processing; `f8798563` Added API provider and model settings — run `git show` on any of them.
  • Change coupling: APIProvider.swift ↔ ClipboardManager.swift Whishpermate/Whispermate/Models/APIProvider.swift:1 — `Whishpermate/Whispermate/Models/APIProvider.swift` and `Whishpermate/Whispermate/Services/ClipboardManager.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 — 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 5 shared commits counted here, the most recent 3 are `8edd9e4a` Use the website realtime endpoint for cloud dictation; `de61ea69` Stop stale shipped transcription config from taking cloud offline; `85d4e287` Stop stale shipped transcription config from taking cloud offline — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×8
  • Edited copy of a member (14 corresponding lines) Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:106 — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:106-119 | Whishpermate/Whispermate/Services/SentryTelemetry.swift:165-178 — 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) AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:926 — AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:926-939 | AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:942-955 — 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) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2798 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2798-2811 | Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:525-553 — 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) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:290 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:290-304 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:288-301 — 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) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:837 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:837-850 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:976-993 — 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) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:803 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:803-816 | Whishpermate/Whispermate/Services/AudioRecorder.swift:939-955 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1314 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1314-1327 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1329-1345 — 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) Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:50 — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:50-63 | Whishpermate/Whispermate/Services/AppState.swift:2963-2979 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×8
  • Duplicated block (7 lines × 2) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:271 — Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:271-277 | Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:302-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:271` 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) Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:101 — Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:101-107 | Whishpermate/Whispermate/Services/KeychainHelper.swift:86-92 — before extracting anything, compare `Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift` and `Whishpermate/Whispermate/Services/KeychainHelper.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:101` 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 (7 lines × 2) Whishpermate/Whispermate/Services/SendToAIManager.swift:17 — Whishpermate/Whispermate/Services/SendToAIManager.swift:17-23 | Whishpermate/Whispermate/Services/TextFormattingManager.swift:45-51 — before extracting anything, compare `Whishpermate/Whispermate/Services/SendToAIManager.swift` and `Whishpermate/Whispermate/Services/TextFormattingManager.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 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 `Whishpermate/Whispermate/Services/SendToAIManager.swift:17` 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, `Whishpermate/Whispermate/Services/TextFormattingManager.swift:52` calls `showNotification` and `Whishpermate/Whispermate/Services/SendToAIManager.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 (7 lines × 2) Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:351 — Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:351-357 | Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:429-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:351` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `6` in one and `16` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:436` calls `dsFont` and `Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:358` 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) Whishpermate/WhisperMateShared/Services/RecordingFinalizationAttempt.swift:35 — Whishpermate/WhisperMateShared/Services/RecordingFinalizationAttempt.swift:35-41 | Whishpermate/WhisperMateShared/Services/RecordingPreparationAttempt.swift:64-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (7 lines × 2) Whishpermate/WhisperMateShared/Services/RecordingFinalizationAttempt.swift:43 — Whishpermate/WhisperMateShared/Services/RecordingFinalizationAttempt.swift:43-49 | Whishpermate/WhisperMateShared/Services/RecordingPreparationAttempt.swift:72-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. 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (7 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:534 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:534-540 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:519-525 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 (7 lines × 2) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:98 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:98-104 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:51-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×8
  • Duplicated block (5 lines × 2) AIDictation.Windows/RecoveryContract/Program.cs:731 — AIDictation.Windows/RecoveryContract/Program.cs:731-736 | AIDictation.Windows/RecoveryContract/Program.cs:1029-1033 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictation.Windows/RecoveryContract/Program.cs:1029` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:243 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:243-247 | Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:573-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:79 — Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:79-83 | Whishpermate/Whispermate/Services/AudioRecorder.swift:1438-1444 — 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 `Whishpermate/Whispermate/Services/AudioRecorder.swift:1438` 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 (5 lines × 2) Whishpermate/Whispermate/Views/SettingsView.swift:870 — Whishpermate/Whispermate/Views/SettingsView.swift:870-874 | Whishpermate/Whispermate/Views/SettingsView.swift:1648-1658 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/SettingsView.swift:870` 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 `spacing` to `12` in one and `10` 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 (5 lines × 2) Whishpermate/WhisperMateShared/Models/PromptRule.swift:81 — Whishpermate/WhisperMateShared/Models/PromptRule.swift:81-85 | Whishpermate/Whispermate/Models/PromptRule.swift:82-86 — before extracting anything, compare `Whishpermate/WhisperMateShared/Models/PromptRule.swift` and `Whishpermate/Whispermate/Models/PromptRule.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Whishpermate/Whispermate/Services/HotkeyGestureResolver.swift:23 — Whishpermate/Whispermate/Services/HotkeyGestureResolver.swift:23-27 | Whishpermate/Whispermate/Services/HotkeyManager.swift:1043-1047 — 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) Whishpermate/WhisperMateShared/Managers/DictionaryManager.swift:93 — Whishpermate/WhisperMateShared/Managers/DictionaryManager.swift:93-97 | Whishpermate/WhisperMateShared/Managers/ShortcutManager.swift:88-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:323 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:323-327 | Whishpermate/Whispermate/Services/OpenAIClient.swift:564-568 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:323` 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 · Edited copy of a member (10 corresponding lines) · ×7
  • Edited copy of a member (10 corresponding lines) Whishpermate/WhisperMateShared/Models/ContextRule.swift:26 — Whishpermate/WhisperMateShared/Models/ContextRule.swift:26-35 | Whishpermate/WhisperMateShared/Models/Recording.swift:26-35 — 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) Whishpermate/WhisperMateShared/Services/DebugLog.swift:45 — Whishpermate/WhisperMateShared/Services/DebugLog.swift:45-54 | Whishpermate/Whispermate/Services/DebugLog.swift:51-63 — 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) Whishpermate/WhisperMateShared/Models/APIProvider.swift:346 — Whishpermate/WhisperMateShared/Models/APIProvider.swift:346-355 | Whishpermate/Whispermate/Models/APIProvider.swift:523-534 — 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) Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:83 — Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:83-92 | Whishpermate/Whispermate/WhispermateApp.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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/preferences/OverlayBubblePreferences.kt:16 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/preferences/OverlayBubblePreferences.kt:16-26 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:734-743 — 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) Whishpermate/WhisperMateShared/Services/AuthManager.swift:58 — Whishpermate/WhisperMateShared/Services/AuthManager.swift:58-67 | Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:294-304 — 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) Whishpermate/WhisperMateIOS/ContentView.swift:2694 — Whishpermate/WhisperMateIOS/ContentView.swift:2694-2705 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1557-1566 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×7
  • Duplicated block (13 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:2942 — Whishpermate/WhisperMateIOS/ContentView.swift:2942-2954 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1313-1325 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:2942` 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.
  • Duplicated block (13 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:733 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:733-745 | Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:759-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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:733` 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.
  • Duplicated block (13 lines × 2) Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:75 — Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:75-87 | Whishpermate/Whispermate/Services/KeychainHelper.swift:65-77 — before extracting anything, compare `Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift` and `Whishpermate/Whispermate/Services/KeychainHelper.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:54 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:54-66 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:899-911 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:440 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:440-452 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:425-437 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 (13 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:454 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:454-466 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:439-451 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 (13 lines × 2) scripts/validate_macos_recording_recovery.swift:198 — scripts/validate_macos_recording_recovery.swift:198-210 | scripts/validate_macos_recording_recovery.swift:272-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_macos_recording_recovery.swift:198` 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, `scripts/validate_macos_recording_recovery.swift:211` calls `require` and `scripts/validate_macos_recording_recovery.swift:285` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D6 · Cohesion (LCOM4) · Low cohesion · ×7
  • Low cohesion: StatusBarManager (LCOM4 13) Whishpermate/Whispermate/Services/StatusBarManager.swift:78 — StatusBarManager'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: AppDelegate (LCOM4 6) Whishpermate/Whispermate/WhispermateApp.swift:302 — AppDelegate's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TranscriptionProviderManager (LCOM4 6) Whishpermate/Whispermate/Models/APIProvider.swift:178 — TranscriptionProviderManager's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OverlayService (LCOM4 4) AIDictation.Windows/AIDictation/Services/OverlayService.cs:11 — OverlayService's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FakeRecorder (LCOM4 4) AIDictation.Windows/RecoveryContract/Program.cs:3278 — FakeRecorder's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OverlayWindowManager (LCOM4 4) Whishpermate/Whispermate/Services/OverlayWindowManager.swift:89 — OverlayWindowManager's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HoldButton (LCOM4 4) Whishpermate/Whispermate/Views/HoldToRecordButton.swift:40 — HoldButton's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
AX2 · Stateful singletons · Stateful shared instance · ×6
  • Stateful shared instance: AppState AIDictation.Windows/AIDictation/Services/AppState.cs:10 — `AppState` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (CurrentAudioLevel, PeakAudioLevel, RecordingDuration; e.g. `CurrentAudioLevel` at line 262).
  • Stateful shared instance: AuthService AIDictation.Windows/AIDictation/Services/AuthService.cs:22 — `AuthService` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (IsAuthenticated, IsLoading, ErrorMessage, CurrentUser; e.g. `IsAuthenticated` at line 83).
  • Stateful shared instance: HotkeyService AIDictation.Windows/AIDictation/Services/HotkeyService.cs:15 — `HotkeyService` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_dictationHotkey, _commandHotkey, _dictationKeyDown, _commandKeyDown, _keyboardHookId, _mouseHookId; e.g. `_dictationHotkey` at line 145).
  • Stateful shared instance: OverlayService AIDictation.Windows/AIDictation/Services/OverlayService.cs:11 — `OverlayService` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_overlayWindow, _position, _hideWhenIdle, _colorTheme, _isEnabled; e.g. `_overlayWindow` at line 45).
  • Stateful shared instance: SettingsService AIDictation.Windows/AIDictation/Services/SettingsService.cs:16 — `SettingsService` keeps one instance of itself in the static `Instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (DictionaryEntries, Shortcuts, ContextRules; e.g. `DictionaryEntries` at line 161).
  • Stateful shared instance: OverlayWindow AIDictation.Windows/AIDictation/Views/OverlayWindow.xaml.cs:19 — `OverlayWindow` is not registered, but the singleton `OverlayService` creates it and keeps it in `_overlayWindow`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_position, _hideWhenIdle, _colorTheme, _isHovering, _resetToken, _state; e.g. `_position` at line 114).
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×6
  • Edited copy of a member (22 corresponding lines) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1106 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1106-1127 | Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift:99-128 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:31 — Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:31-55 | scripts/validate_ios_realtime_transcription.swift:212-233 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:162 — AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:162-183 | AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs:229-252 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:156 — Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:156-177 | Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:303-324 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:404 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:404-425 | Whishpermate/Whispermate/Services/AppState.swift:3462-3487 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1983 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1983-2004 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:378-399 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×6
  • Edited copy of a member (15 corresponding lines) Whishpermate/Whispermate/Services/HotkeyManager.swift:259 — Whishpermate/Whispermate/Services/HotkeyManager.swift:259-273 | Whishpermate/Whispermate/Services/HotkeyManager.swift:304-318 — 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) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:77 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:77-91 | Whishpermate/Whispermate/Services/OpenAIClient.swift:258-274 — 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) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:3234 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:3234-3248 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:3250-3267 — 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) AIDictation.Windows/AIDictation/Views/OnboardingWindow.xaml.cs:58 — AIDictation.Windows/AIDictation/Views/OnboardingWindow.xaml.cs:58-72 | AIDictation.Windows/AIDictation/Views/SettingsWindow.xaml.cs:33-47 — 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) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:234 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:234-249 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:229-243 — 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) scripts/validate_parakeet_runtime_recovery.swift:147 — scripts/validate_parakeet_runtime_recovery.swift:147-168 | scripts/validate_parakeet_runtime_recovery.swift:202-216 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×6
  • Edited copy of a member (18 corresponding lines) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:743 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:743-760 | Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:762-781 — 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) Whishpermate/Whispermate/Services/ClipboardManager.swift:57 — Whishpermate/Whispermate/Services/ClipboardManager.swift:57-74 | Whishpermate/Whispermate/Services/ClipboardManager.swift:77-103 — 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) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:381 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:381-398 | Whishpermate/Whispermate/Services/OpenAIClient.swift:617-636 — 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) Whishpermate/WhisperMateIOS/ContentView.swift:3472 — Whishpermate/WhisperMateIOS/ContentView.swift:3472-3496 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:748-765 — 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) Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:263 — Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:263-281 | Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:283-300 — 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) Whishpermate/WhisperMateShared/Services/RuntimeCallbackAttempt.swift:159 — Whishpermate/WhisperMateShared/Services/RuntimeCallbackAttempt.swift:159-176 | Whishpermate/WhisperMateShared/Services/RuntimeCallbackAttempt.swift:178-196 — 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 (12 corresponding lines) · ×6
  • Edited copy of a member (12 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:101 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:101-112 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt:404-415 — 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) Whishpermate/WhisperMateShared/Services/ReviewPromptStore.swift:46 — Whishpermate/WhisperMateShared/Services/ReviewPromptStore.swift:46-60 | Whishpermate/WhisperMateShared/Services/ReviewPromptStore.swift:64-75 — 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) AIDictation.Windows/AIDictation/Services/HotkeyService.cs:306 — AIDictation.Windows/AIDictation/Services/HotkeyService.cs:306-317 | AIDictation.Windows/AIDictation/Services/HotkeyService.cs:329-340 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:239 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:239-250 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:298-309 — 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) Whishpermate/WhisperMateShared/Models/APIProvider.swift:240 — Whishpermate/WhisperMateShared/Models/APIProvider.swift:240-256 | Whishpermate/Whispermate/Models/APIProvider.swift:390-401 — 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) Whishpermate/WhisperMateIOS/ContentView.swift:2777 — Whishpermate/WhisperMateIOS/ContentView.swift:2777-2788 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1460-1473 — 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 · Duplicated block (21 lines × 2) · ×6
  • Duplicated block (21 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:4122 — Whishpermate/WhisperMateIOS/ContentView.swift:4122-4142 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1422-1442 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 (21 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:639 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:639-659 | Whishpermate/Whispermate/Services/OpenAIClient.swift:883-903 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:639` 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 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:722 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:722-742 | Whishpermate/Whispermate/Services/OpenAIClient.swift:975-995 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 (21 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:748 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:748-768 | Whishpermate/Whispermate/Services/OpenAIClient.swift:1004-1024 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 (21 lines × 2) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:553 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:553-573 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:674-694 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:553` 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 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:39 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:39-59 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt:382-402 — before extracting anything, compare `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×6
  • Duplicated block (19 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3570 — Whishpermate/WhisperMateIOS/ContentView.swift:3570-3588 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:826-844 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 (19 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:4025 — Whishpermate/WhisperMateIOS/ContentView.swift:4025-4043 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1194-1212 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 (19 lines × 2) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:424 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:424-442 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:517-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:424` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:420 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:420-438 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:405-423 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:420` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:502 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:502-520 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:487-505 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:502` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1199 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1199-1217 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1259-1277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1199` 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:355 — Whishpermate/WhisperMateIOS/ContentView.swift:355-368 | Whishpermate/WhisperMateIOS/ContentView.swift:370-383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateIOS/ContentView.swift:355` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:51 — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:51-64 | Whishpermate/Whispermate/Services/SentryTelemetry.swift:51-64 — before extracting anything, compare `Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift` and `Whishpermate/Whispermate/Services/SentryTelemetry.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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) Whishpermate/Whispermate/Services/AppState.swift:851 — Whishpermate/Whispermate/Services/AppState.swift:851-864 | Whishpermate/Whispermate/Services/AppState.swift:1088-1101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:144 — Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:144-157 | Whishpermate/Whispermate/Services/SonioxRealtimeTranscriptionClient.swift:149-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 `Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:144` 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 (14 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:306 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:306-319 | Whishpermate/Whispermate/Services/OpenAIClient.swift:533-546 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:306` 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:215 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:215-228 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:584-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:215` 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 (24 corresponding lines) · ×5
  • Edited copy of a member (24 corresponding lines) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:693 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:693-719 | Whishpermate/Whispermate/Services/OpenAIClient.swift:942-972 — 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) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1522 — Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1522-1555 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1572-1595 — 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) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2202 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2202-2228 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2248-2271 — 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) AIDictation.Windows/AIDictation/Services/AudioExportDeadline.cs:114 — AIDictation.Windows/AIDictation/Services/AudioExportDeadline.cs:114-144 | AIDictation.Windows/AIDictation/Services/AudioHttpRecoveryPolicy.cs:294-317 — 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) Whishpermate/WhisperMateIOS/ContentView.swift:1215 — Whishpermate/WhisperMateIOS/ContentView.swift:1215-1248 | Whishpermate/Whispermate/Views/SettingsView.swift:679-702 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Whishpermate/WhisperMateIOS/OnboardingView.swift:149 — Whishpermate/WhisperMateIOS/OnboardingView.swift:149-171 | Whishpermate/WhisperMateIOS/OnboardingView.swift:173-223 | Whishpermate/WhisperMateIOS/OnboardingView.swift:225-270 | Whishpermate/WhisperMateIOS/OnboardingView.swift:272-293 — 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) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:227 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:227-327 | Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:545-627 | Whishpermate/Whispermate/Services/OpenAIClient.swift:426-568 | Whishpermate/Whispermate/Services/OpenAIClient.swift:786-869 — 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) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1871 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1871-1878 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1880-1887 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2750-2758 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2760-2767 — 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) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:120 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:120-233 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:610-700 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:963-1068 | Whishpermate/Whispermate/Views/SettingsView.swift:1858-1903 — 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) scripts/validate_macos_audio_processing_store.swift:285 — scripts/validate_macos_audio_processing_store.swift:285-323 | scripts/validate_macos_audio_processing_store.swift:371-398 | scripts/validate_macos_audio_processing_store.swift:400-462 | scripts/validate_macos_audio_processing_store.swift:573-635 — 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 (17 corresponding lines) · ×5
  • Edited copy of a member (17 corresponding lines) Whishpermate/Whispermate/Services/OverlayWindowManager.swift:900 — Whishpermate/Whispermate/Services/OverlayWindowManager.swift:900-916 | Whishpermate/Whispermate/Services/OverlayWindowManager.swift:918-935 — 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) Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:235 — Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:235-251 | Whishpermate/Whispermate/Services/SonioxRealtimeTranscriptionClient.swift:200-220 — 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) AIDictation.Windows/AIDictation/Services/AppState.cs:97 — AIDictation.Windows/AIDictation/Services/AppState.cs:97-113 | AIDictation.Windows/AIDictation/Services/AppState.cs:131-149 — 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) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:250 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:250-266 | Whishpermate/Whispermate/Services/MacAsyncDeadline.swift:51-67 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/components/SettingsIconTile.kt:28 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/components/SettingsIconTile.kt:28-44 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:175-192 — 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 (16 corresponding lines) · ×5
  • Edited copy of a member (16 corresponding lines) Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:87 — Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:87-103 | Whishpermate/Whispermate/Services/SecretsLoader.swift:65-80 — 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) Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:328 — Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:328-343 | Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:345-360 — 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) Whishpermate/WhisperMateIOS/ContentView.swift:885 — Whishpermate/WhisperMateIOS/ContentView.swift:885-900 | Whishpermate/WhisperMateIOS/OnboardingView.swift:436-452 — 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) REDACTED:823 — REDACTED:823-841 | REDACTED:844-859 — 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) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:283 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:283-298 | Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:300-319 — 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 (4 corresponding lines) · ×5
  • Edited copy of a member (4 corresponding lines) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:528 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:528-531 | Whishpermate/Whispermate/Services/OpenAIClient.swift:770-773 — 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) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:510 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:510-513 | Whishpermate/Whispermate/Services/OpenAIClient.swift:730-733 — 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) Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:60 — Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:60-63 | Whishpermate/Whispermate/WhispermateApp.swift:58-61 — 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) Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:8 — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:8-11 | Whishpermate/Whispermate/Services/AppState.swift:3001-3004 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2883 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2883-2886 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:488-491 — 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.
GD1 · Unfinished & placeholder code · Unfinished stub · ×5
  • Unfinished stub — throws NotImplementedException AIDictation.Windows/AIDictation/Converters/OnboardingConverters.cs:55 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException AIDictation.Windows/AIDictation/Converters/SettingsConverters.cs:53 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException AIDictation.Windows/AIDictation/Converters/SettingsConverters.cs:74 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException AIDictation.Windows/AIDictation/Converters/SettingsConverters.cs:94 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException AIDictation.Windows/AIDictation/Converters/SettingsConverters.cs:130 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×4
  • Edited copy of a member (20 corresponding lines) Whishpermate/WhisperMateShared/AudioVisualizationView.swift:345 — Whishpermate/WhisperMateShared/AudioVisualizationView.swift:345-365 | Whishpermate/Whispermate/Views/RecordingOverlayView.swift:755-775 — 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) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:269 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:269-288 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:263-286 — 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) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1111 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1111-1136 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1140-1159 — 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) Whishpermate/Whispermate/Services/AudioDeviceManager.swift:611 — Whishpermate/Whispermate/Services/AudioDeviceManager.swift:611-631 | Whishpermate/Whispermate/Services/AudioDeviceManager.swift:730-749 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×4
  • Edited copy of a member (29 corresponding lines) Whishpermate/WhisperMateIOS/ContentView.swift:4248 — Whishpermate/WhisperMateIOS/ContentView.swift:4248-4276 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:217-250 — 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.
  • Edited copy of a member (29 corresponding lines) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:341 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:341-369 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:338-372 — 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.
  • Edited copy of a member (29 corresponding lines) Whishpermate/Whispermate/Services/AppState.swift:1170 — Whishpermate/Whispermate/Services/AppState.swift:1170-1207 | Whishpermate/Whispermate/Services/AppState.swift:1209-1237 — 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.
  • Edited copy of a member (29 corresponding lines) scripts/validate_parakeet_runtime.swift:92 — scripts/validate_parakeet_runtime.swift:92-120 | scripts/validate_parakeet_runtime.swift:122-159 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×4
  • Edited copy of a member (13 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2160 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2160-2172 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2246-2260 — 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) AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:241 — AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:241-253 | AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs:428-441 — 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) Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:260 — Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:260-274 | Whishpermate/Whispermate/Services/SonioxRealtimeTranscriptionClient.swift:293-305 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/language/LanguageSettingsViewModel.kt:80 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/language/LanguageSettingsViewModel.kt:80-94 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingViewModel.kt:189-201 — 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 (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:353 — AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:353-367 | AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs:689-703 — 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 (15 lines × 2) Whishpermate/WhisperMateShared/Models/PromptRule.swift:28 — Whishpermate/WhisperMateShared/Models/PromptRule.swift:28-42 | Whishpermate/Whispermate/Models/PromptRule.swift:29-43 — before extracting anything, compare `Whishpermate/WhisperMateShared/Models/PromptRule.swift` and `Whishpermate/Whispermate/Models/PromptRule.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:318 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:318-332 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:315-329 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 (15 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:1777 — scripts/validate_ios_audio_processing_recovery.swift:1777-1791 | scripts/validate_ios_audio_processing_recovery.swift:1805-1819 — both copies are in the same file, so extract the 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 after the matched lines, `scripts/validate_ios_audio_processing_recovery.swift:1792` calls `pendingUsageWordCount`, `require` and `scripts/validate_ios_audio_processing_recovery.swift:1820` 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 × 3) · ×4
  • Duplicated block (11 lines × 3) AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:290 — AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:290-300 | AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:392-402 | AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:591-601 — 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 `AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:290` 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 (11 lines × 3) Whishpermate/WhisperMateIOS/OnboardingView.swift:175 — Whishpermate/WhisperMateIOS/OnboardingView.swift:175-185 | Whishpermate/WhisperMateIOS/OnboardingView.swift:227-237 | Whishpermate/WhisperMateIOS/OnboardingView.swift:274-284 — 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 `Whishpermate/WhisperMateIOS/OnboardingView.swift:175` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `10` in one and `8` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 3) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:46 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:46-56 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:141-151 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/SuggestionClient.kt:35-45 — 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt: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 × 3) scripts/validate_macos_audio_processing_store.swift:286 — scripts/validate_macos_audio_processing_store.swift:286-296 | scripts/validate_macos_audio_processing_store.swift:372-382 | scripts/validate_macos_audio_processing_store.swift:574-584 — 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×3
  • Edited copy of a member (19 corresponding lines) Whishpermate/Whispermate/Services/FnKeyMonitor.swift:127 — Whishpermate/Whispermate/Services/FnKeyMonitor.swift:127-145 | Whishpermate/Whispermate/Services/HotkeyManager.swift:568-587 — 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) Whishpermate/Whispermate/Services/TextInsertionFormatter.swift:56 — Whishpermate/Whispermate/Services/TextInsertionFormatter.swift:56-74 | Whishpermate/Whispermate/Services/TextInsertionFormatter.swift:76-94 — 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) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1494 — AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1494-1512 | AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1517-1536 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×3
  • Edited copy of a member (7 corresponding lines) Whishpermate/WhisperMateShared/Services/DebugLog.swift:12 — Whishpermate/WhisperMateShared/Services/DebugLog.swift:12-18 | Whishpermate/Whispermate/Services/DebugLog.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) Whishpermate/WhisperMateShared/Managers/ShortcutManager.swift:70 — Whishpermate/WhisperMateShared/Managers/ShortcutManager.swift:70-76 | Whishpermate/WhisperMateShared/Managers/ShortcutManager.swift:78-85 — 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) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1992 — AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1992-1998 | AIDictation.Windows/AIDictation/Services/BoundedHttpContentReader.cs:187-193 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×3
  • Edited copy of a member (5 corresponding lines) Whishpermate/WhisperMateShared/Models/APIProvider.swift:357 — Whishpermate/WhisperMateShared/Models/APIProvider.swift:357-361 | Whishpermate/Whispermate/Models/APIProvider.swift:538-542 — 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) Whishpermate/WhisperMateShared/Models/PromptRule.swift:9 — Whishpermate/WhisperMateShared/Models/PromptRule.swift:9-13 | Whishpermate/Whispermate/Models/PromptRule.swift:10-14 — 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) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2535 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2535-2539 | Whishpermate/WhisperMateShared/Services/SubscriptionManager.swift:201-205 — 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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3333 — Whishpermate/WhisperMateIOS/ContentView.swift:3333-3356 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:657-680 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3333` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:34 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:34-57 | Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:73-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. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:34` 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 (24 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:246 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:246-269 | Whishpermate/Whispermate/Services/OpenAIClient.swift:460-483 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:246` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) Whishpermate/Whispermate/Services/AppState.swift:3572 — Whishpermate/Whispermate/Services/AppState.swift:3572-3593 | Whishpermate/Whispermate/Services/AppState.swift:3601-3622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/AppState.swift:3572` 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 (22 lines × 2) Whishpermate/Whispermate/Services/SendToAIManager.swift:70 — Whishpermate/Whispermate/Services/SendToAIManager.swift:70-91 | Whishpermate/Whispermate/Services/TextFormattingManager.swift:108-129 — before extracting anything, compare `Whishpermate/Whispermate/Services/SendToAIManager.swift` and `Whishpermate/Whispermate/Services/TextFormattingManager.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 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 `Whishpermate/Whispermate/Services/SendToAIManager.swift:70` 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, `Whishpermate/Whispermate/Services/SendToAIManager.swift:67` calls `AXUIElementCreateApplication` and `Whishpermate/Whispermate/Services/TextFormattingManager.swift:105` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (22 lines × 2) scripts/validate_macos_audio_processing_store.swift:807 — scripts/validate_macos_audio_processing_store.swift:807-828 | scripts/validate_macos_audio_processing_store.swift:883-904 — both copies are in the same file, so extract the 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:163 — AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:163-182 | AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs:230-249 — 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, `AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs:251` calls `SaveLanguageSelection` and `AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:183` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (20 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3615 — Whishpermate/WhisperMateIOS/ContentView.swift:3615-3634 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:858-877 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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.
  • Duplicated block (20 lines × 2) Whishpermate/Whispermate/Views/RecordingOverlayView.swift:132 — Whishpermate/Whispermate/Views/RecordingOverlayView.swift:132-151 | Whishpermate/Whispermate/Views/RecordingOverlayView.swift:164-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/RecordingOverlayView.swift:132` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×3
  • Duplicated block (12–13 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3970 — Whishpermate/WhisperMateIOS/ContentView.swift:3970-3981 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1151-1163 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3970` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/LanguagePostProcessClient.kt:73 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/LanguagePostProcessClient.kt:73-85 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionClient.kt:307-318 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/LanguagePostProcessClient.kt: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.
  • Duplicated block (12–13 lines × 2) scripts/validate_apple_http_audio_recovery.swift:433 — scripts/validate_apple_http_audio_recovery.swift:433-444 | scripts/validate_apple_http_audio_recovery.swift:447-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
DM11 · Constructible invalid state · Constructible in an invalid state · ×3
  • Constructible in an invalid state: InstallationAnalyticsEventEntity AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/entity/InstallationAnalyticsEventEntity.kt:11 — `InstallationAnalyticsEventEntity`'s public constructor takes `eventId`, `installationId`, `anonymousId`, `eventName`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `InstallationAnalyticsEventEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: RecordingEntity AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/entity/RecordingEntity.kt:10 — `RecordingEntity`'s public constructor takes `id`, `transcription`, `audioFilePath`, `status`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `RecordingEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: UsageClaimEntity AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/entity/UsageClaimEntity.kt:17 — `UsageClaimEntity`'s public constructor takes `id`, `recordingId`, `state`, `usageDestination` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `UsageClaimEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×3
  • Duplicated block (5 lines × 2 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:165 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:165 · marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:170 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (5 lines × 2 locations) marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:118 — marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:118 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:127 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (5 lines × 2 locations) marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:26 — marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:26 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:234 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
AX2 · Stateful singletons · Stateful singleton · ×2
  • Stateful singleton: ApiConfigManager AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/preferences/ApiConfigManager.kt:40 — `ApiConfigManager` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (transcriptionConfig; e.g. `transcriptionConfig` in `switchTranscriptionToCloud` at line 68).
  • Stateful singleton: InstallationAnalytics AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/telemetry/InstallationAnalytics.kt:53 — `InstallationAnalytics` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (authResolved, observedUserId; e.g. `authResolved` in `start` at line 86).
D10 · Test Quality · No assertions · ×2
  • No assertions: testDictationRequiresStandaloneFillerDeletion Whishpermate/WhispermateTests/TranscriptionCleanupPromptTests.swift:4 — 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: testTransformedOutputRequiresStandaloneFillerDeletion Whishpermate/WhispermateTests/TranscriptionCleanupPromptTests.swift:43 — 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.
D2 · Cognitive Complexity · OpenAIClient.chatCompletion (cognitive 16) · ×2
  • OpenAIClient.chatCompletion (cognitive 16) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:545 — OpenAIClient.chatCompletion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 4 (5 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • OpenAIClient.chatCompletion (cognitive 16) Whishpermate/Whispermate/Services/OpenAIClient.swift:786 — OpenAIClient.chatCompletion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 4 (5 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) Whishpermate/WhisperMateShared/Services/DebugLog.swift:21 — Whishpermate/WhisperMateShared/Services/DebugLog.swift:21-30 | Whishpermate/WhisperMateShared/Services/DebugLog.swift:33-42 | Whishpermate/WhisperMateShared/Services/DebugLog.swift:69-78 | Whishpermate/Whispermate/Services/DebugLog.swift:27-36 | Whishpermate/Whispermate/Services/DebugLog.swift:39-48 | Whishpermate/Whispermate/Services/DebugLog.swift:78-87 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:50 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:50-119 | Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:121-167 | Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:169-214 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:46-105 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:107-157 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:159-209 — 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 (34 corresponding lines) · ×2
  • Edited copy of a member (34 corresponding lines) Whishpermate/Whispermate/Views/OnboardingView.swift:586 — Whishpermate/Whispermate/Views/OnboardingView.swift:586-625 | Whishpermate/Whispermate/Views/OnboardingView.swift:1470-1503 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1549 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1549-1582 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2012-2049 — 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 (48 corresponding lines) · ×2
  • Edited copy of a member (48 corresponding lines) Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:45 — Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:45-92 | Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:324-376 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (48 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:603 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:603-650 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1472-1522 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (46 corresponding lines) · ×2
  • Edited copy of a member (46 corresponding lines) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:329 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:329-379 | Whishpermate/Whispermate/Services/OpenAIClient.swift:570-615 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (46 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:116 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:116-161 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingViewModel.kt:203-250 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) Whishpermate/Whispermate/Services/SendToAIManager.swift:57 — Whishpermate/Whispermate/Services/SendToAIManager.swift:57-91 | Whishpermate/Whispermate/Services/TextFormattingManager.swift:90-129 — 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) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:173 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:173-209 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:238-272 — 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 (36 corresponding lines) · ×2
  • Edited copy of a member (36 corresponding lines) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:22 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:22-57 | Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:60-96 — 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.
  • Edited copy of a member (36 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/recording/RecordingSheet.kt:250 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/recording/RecordingSheet.kt:250-294 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/recording/RecordingSheet.kt:297-332 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×2
  • Edited copy of a member (26 corresponding lines) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:416 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:416-442 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:510-535 — 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) scripts/validate_macos_audio_processing_store.swift:1704 — scripts/validate_macos_audio_processing_store.swift:1704-1735 | scripts/validate_macos_audio_processing_store.swift:1737-1762 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/LanguagePostProcessClient.kt:126 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/LanguagePostProcessClient.kt:126-146 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionClient.kt:639-659 — 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) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:744 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:744-767 | Whishpermate/Whispermate/Services/AppState.swift:3960-3980 — 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 copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:11 — Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:11-35 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:11-33 — 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) Whishpermate/WhisperMateShared/Services/AuthManager.swift:478 — Whishpermate/WhisperMateShared/Services/AuthManager.swift:478-500 | Whishpermate/WhisperMateShared/Services/AuthManager.swift:502-524 — 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 copies of one member (3 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 5+ corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1027 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1027-1033 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:494-498 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayRewritePanelView.kt:385-389 — 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) Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:121 — Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:121-125 | Whishpermate/WhisperMateShared/Models/PromptRule.swift:58-62 | Whishpermate/Whispermate/Models/PromptRule.swift:59-63 — 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 (3 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 13+ corresponding lines) AIDictation.Windows/AIDictation/Services/AudioHttpRecoveryPolicy.cs:203 — AIDictation.Windows/AIDictation/Services/AudioHttpRecoveryPolicy.cs:203-220 | AIDictation.Windows/AIDictation/Services/BoundedHttpContentReader.cs:196-208 | AIDictation.Windows/AIDictation/Services/LanguagePostProcessService.cs: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 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) scripts/validate_macos_recording_recovery.swift:64 — scripts/validate_macos_recording_recovery.swift:64-80 | scripts/validate_macos_recording_recovery.swift:82-94 | scripts/validate_macos_recording_recovery.swift:122-140 — 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 · Duplicated block (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:17 — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:17-49 | Whishpermate/Whispermate/Services/SentryTelemetry.swift:17-49 — before extracting anything, compare `Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift` and `Whishpermate/Whispermate/Services/SentryTelemetry.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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 (33 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:468 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:468-500 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:453-485 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:468` 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 (23–24 lines × 2) · ×2
  • Duplicated block (23–24 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3800 — Whishpermate/WhisperMateIOS/ContentView.swift:3800-3822 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1017-1040 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3800` 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, `Whishpermate/WhisperMateIOS/ContentView.swift:3799` calls `showError` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1017` 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 (23–24 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:347 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:347-369 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:349-372 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:347` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (18–21 lines × 2) · ×2
  • Duplicated block (18–21 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:340 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:340-360 | Whishpermate/Whispermate/Services/OpenAIClient.swift:579-596 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:340` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–21 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:271 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:271-288 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:266-286 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:271` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×2
  • Duplicated block (19–20 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3371 — Whishpermate/WhisperMateIOS/ContentView.swift:3371-3389 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:682-701 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3371` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–20 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3933 — Whishpermate/WhisperMateIOS/ContentView.swift:3933-3951 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1121-1140 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3933` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) Whishpermate/WhisperMateShared/AudioVisualizationView.swift:348 — Whishpermate/WhisperMateShared/AudioVisualizationView.swift:348-365 | Whishpermate/Whispermate/Views/RecordingOverlayView.swift:758-775 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateShared/AudioVisualizationView.swift:348` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (18 lines × 2) Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:66 — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:66-83 | Whishpermate/Whispermate/Services/SentryTelemetry.swift:66-83 — before extracting anything, compare `Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift` and `Whishpermate/Whispermate/Services/SentryTelemetry.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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 (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) Whishpermate/Whispermate/Services/MacAsyncDeadline.swift:70 — Whishpermate/Whispermate/Services/MacAsyncDeadline.swift:70-84 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:3454-3469 — 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 (15–16 lines × 2) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:659 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:659-673 | Whishpermate/Whispermate/Views/SettingsView.swift:1870-1885 — 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 `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:659` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:746 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:746-760 | Whishpermate/Whispermate/Services/AppState.swift:3962-3975 — 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 `Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:746` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) Whishpermate/Whispermate/WhispermateApp.swift:967 — Whishpermate/Whispermate/WhispermateApp.swift:967-981 | Whishpermate/Whispermate/WhispermateApp.swift:1022-1035 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/WhispermateApp.swift:967` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–14 lines × 2) · ×2
  • Duplicated block (8–14 lines × 2) Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:170 — Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:170-183 | Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:315-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–14 lines × 2) scripts/validate_macos_audio_processing_store.swift:476 — scripts/validate_macos_audio_processing_store.swift:476-489 | scripts/validate_macos_audio_processing_store.swift:509-516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_macos_audio_processing_store.swift:476` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×2
  • Duplicated block (11–14 lines × 2) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:803 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:803-816 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:857-867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:803` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11–14 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:437 — scripts/validate_ios_audio_processing_recovery.swift:437-447 | scripts/validate_ios_audio_processing_recovery.swift:540-553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:437` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×2
  • Duplicated block (18–20 lines × 2) Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:14 — Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:14-31 | Whishpermate/Whispermate/Services/KeychainHelper.swift:9-28 — before extracting anything, compare `Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift` and `Whishpermate/Whispermate/Services/KeychainHelper.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (18–20 lines × 2) scripts/validate_macos_audio_processing_store.swift:545 — scripts/validate_macos_audio_processing_store.swift:545-562 | scripts/validate_macos_audio_processing_store.swift:1614-1633 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_macos_audio_processing_store.swift:545` 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 × 3) · ×2
  • Duplicated block (12 lines × 3) Whishpermate/Whispermate/Services/OpenAIClient.swift:961 — Whishpermate/Whispermate/Services/OpenAIClient.swift:961-972 | Whishpermate/Whispermate/Services/OpenAIClient.swift:990-1001 | Whishpermate/Whispermate/Services/OpenAIClient.swift:1019-1030 — 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 `Whishpermate/Whispermate/Services/OpenAIClient.swift:961` 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.
  • Duplicated block (12 lines × 3) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:694 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:694-705 | Whishpermate/Whispermate/Services/AppState.swift:4032-4043 | Whishpermate/Whispermate/Services/VoiceActivityDetector.swift:149-160 — 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:806 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:806-816 | Whishpermate/Whispermate/Services/AudioRecorder.swift:946-955 — 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 `Whishpermate/Whispermate/Services/AudioRecorder.swift:946` 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 (10–11 lines × 2) Whishpermate/Whispermate/Services/AppState.swift:3234 — Whishpermate/Whispermate/Services/AppState.swift:3234-3244 | Whishpermate/Whispermate/Services/AppState.swift:3739-3748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) AIDictation.Windows/RecoveryContract/Program.cs:846 — AIDictation.Windows/RecoveryContract/Program.cs:846-855 | AIDictation.Windows/RecoveryContract/Program.cs:919-928 | AIDictation.Windows/RecoveryContract/Program.cs:1431-1440 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `AIDictation.Windows/RecoveryContract/Program.cs:844` calls `True`, `Exists` and `AIDictation.Windows/RecoveryContract/Program.cs:917` 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 × 3) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:95 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:95-104 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:194-203 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/SuggestionClient.kt:67-76 — 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:95` 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, `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:93` calls `d` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/SuggestionClient.kt:65` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–10 lines × 3) · ×2
  • Duplicated block (7–10 lines × 3) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1542 — Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1542-1551 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1585-1594 | Whishpermate/Whispermate/Services/OverlayWindowManager.swift:562-568 — 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 `Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1542` 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–10 lines × 3) scripts/validate_ios_audio_processing_recovery.swift:994 — scripts/validate_ios_audio_processing_recovery.swift:994-1003 | scripts/validate_ios_audio_processing_recovery.swift:1255-1261 | scripts/validate_ios_audio_processing_recovery.swift:1582-1588 — 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, `scripts/validate_ios_audio_processing_recovery.swift:1251` calls `require`, `fileExists`, `testFullDecodeRejectsTruncation` and `scripts/validate_ios_audio_processing_recovery.swift:992` 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 (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:915 — AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:915-924 | AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1366-1374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:915` 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 × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionClient.kt:669 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionClient.kt:669-677 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1713-1722 — 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionClient.kt:669` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionClient.kt:677` calls `resumeWithException`, `shutdownNow` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1722` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–10 lines × 2) · ×2
  • Duplicated block (6–10 lines × 2) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2710 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2710-2715 | Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:488-497 — 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 `Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2710` 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–10 lines × 2) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2832 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2832-2837 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2904-2913 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2904` 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) Whishpermate/WhisperMateIOS/ContentView.swift:355 — Whishpermate/WhisperMateIOS/ContentView.swift:355-363 | Whishpermate/WhisperMateIOS/ContentView.swift:370-378 | Whishpermate/WhisperMateIOS/ContentView.swift:385-393 — 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 `Whishpermate/WhisperMateIOS/ContentView.swift:355` 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 × 3) Whishpermate/Whispermate/Services/ClipboardManager.swift:596 — Whishpermate/Whispermate/Services/ClipboardManager.swift:596-604 | Whishpermate/Whispermate/Services/ClipboardManager.swift:608-616 | Whishpermate/Whispermate/Services/ClipboardManager.swift:637-645 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1092 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1092-1097 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1518-1523 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1549-1554 — 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 (6 lines × 3) scripts/validate_keyboard_audio_recovery.swift:123 — scripts/validate_keyboard_audio_recovery.swift:123-132 | scripts/validate_keyboard_audio_recovery.swift:242-247 | scripts/validate_keyboard_audio_recovery.swift:300-309 — 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 `scripts/validate_keyboard_audio_recovery.swift:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `scripts/validate_keyboard_audio_recovery.swift:249` calls `addingTimeInterval` and `scripts/validate_keyboard_audio_recovery.swift:311` 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 (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:164 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:164-180 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingViewModel.kt:360-376 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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 (17 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:765 — scripts/validate_ios_audio_processing_recovery.swift:765-781 | scripts/validate_ios_audio_processing_recovery.swift:816-832 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:765` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:281 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:281-287 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:386-392 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:630-636 — 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt: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.
  • Duplicated block (7 lines × 3) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/components/CircularMicButton.kt:196 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/components/CircularMicButton.kt:196-202 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:220-226 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:279-285 — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:968 — scripts/validate_ios_audio_processing_recovery.swift:968-975 | scripts/validate_ios_audio_processing_recovery.swift:1584-1590 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:968` 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–8 lines × 2) scripts/validate_release_transcription_config.py:176 — scripts/validate_release_transcription_config.py:176-183 | scripts/validate_release_transcription_config.py:191-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_release_transcription_config.py:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×2
  • Duplicated block (5 lines × 6) scripts/validate_macos_audio_processing_store.swift:544 — scripts/validate_macos_audio_processing_store.swift:544-548 | scripts/validate_macos_audio_processing_store.swift:754-758 | scripts/validate_macos_audio_processing_store.swift:818-828 | scripts/validate_macos_audio_processing_store.swift:894-904 | scripts/validate_macos_audio_processing_store.swift:1169-1179 | scripts/validate_macos_audio_processing_store.swift:1613-1623 — 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 `scripts/validate_macos_audio_processing_store.swift:544` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 6) scripts/validate_macos_audio_processing_store.swift:79 — scripts/validate_macos_audio_processing_store.swift:79-84 | scripts/validate_macos_history_row_refresh.swift:13-17 | scripts/validate_macos_last_transcription_menu.swift:13-17 | scripts/validate_macos_lifecycle_guards.swift:7-12 | scripts/validate_macos_offline_retranscribe.swift:13-17 | scripts/validate_macos_overlay_resting_state.swift:13-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 all 6 call sites, so a change lands once.
AX2 · Stateful singletons · Process-global static state · ×1
  • Process-global static state: SentryTelemetry AIDictation.Windows/AIDictation/Services/SentryTelemetry.cs:12 — `SentryTelemetry` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_started; e.g. `_started` at line 48). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
AXR1 · Runtime accessibility (rendered) · WCAG 2.5.5 reproducibly failed on a screen of the running app · ×1
  • WCAG 2.5.5 reproducibly failed on a screen of the running app — Accessibility-tree rule(s) android-target-size-enhanced failed on: /FrameLayout[0]/LinearLayout[0]/FrameLayout[0]/ComposeView[0]/View[0]/View[0]/View[0]/ScrollView[0]/View[10]. Read from the Android accessibility tree on an emulator (advisory — not scored); fix and re-scan to verify it clears.
D1 · Cyclomatic Complexity · MobileAudioProcessingStore.validateSnapshotLayoutLocked (cyclomatic 85) · ×1
  • MobileAudioProcessingStore.validateSnapshotLayoutLocked (cyclomatic 85) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2232 — MobileAudioProcessingStore.validateSnapshotLayoutLocked has cyclomatic complexity 85 (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 · HotkeyOption.from (cyclomatic 48) · ×1
  • HotkeyOption.from (cyclomatic 48) Whishpermate/Whispermate/Views/HotkeyRecorderView.swift:164 — HotkeyOption.from has cyclomatic complexity 48 (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 · AudioProcessingCoordinator.StartCaptureAsync (cyclomatic 45) · ×1
  • AudioProcessingCoordinator.StartCaptureAsync (cyclomatic 45) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:204 — AudioProcessingCoordinator.StartCaptureAsync has cyclomatic complexity 45 (threshold 15). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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 · MobileAudioProcessingStore.normalizeInterruptedAttempts (cyclomatic 44) · ×1
  • MobileAudioProcessingStore.normalizeInterruptedAttempts (cyclomatic 44) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1376 — MobileAudioProcessingStore.normalizeInterruptedAttempts has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OnboardingScreenKt.OnboardingScreen (cyclomatic 41) · ×1
  • OnboardingScreenKt.OnboardingScreen (cyclomatic 41) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:216 — OnboardingScreenKt.OnboardingScreen 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 · AppState.handleRecorderFinalizationTerminal (cyclomatic 39) · ×1
  • AppState.handleRecorderFinalizationTerminal (cyclomatic 39) Whishpermate/Whispermate/Services/AppState.swift:827 — AppState.handleRecorderFinalizationTerminal has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MacAudioProcessingStore.validate (cyclomatic 39) · ×1
  • MacAudioProcessingStore.validate (cyclomatic 39) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2447 — MacAudioProcessingStore.validate has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AndroidAudioProcessingCoordinator.cancelCapture (cyclomatic 36) · ×1
  • AndroidAudioProcessingCoordinator.cancelCapture (cyclomatic 36) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:701 — AndroidAudioProcessingCoordinator.cancelCapture has cyclomatic complexity 36 (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 · AudioProcessingCoordinator.RunRecognitionAsync (cyclomatic 35) · ×1
  • AudioProcessingCoordinator.RunRecognitionAsync (cyclomatic 35) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1075 — AudioProcessingCoordinator.RunRecognitionAsync has cyclomatic complexity 35 (threshold 15). Of this number, 28 points are the body's own statements and 7 belong to 3 function literals inside it that branch. 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 · OpenAIClient.transcribeSinglePart (cyclomatic 33) · ×1
  • OpenAIClient.transcribeSinglePart (cyclomatic 33) Whishpermate/Whispermate/Services/OpenAIClient.swift:426 — OpenAIClient.transcribeSinglePart 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 · AudioContainerValidator.ValidateFinalizedWave (cyclomatic 32) · ×1
  • AudioContainerValidator.ValidateFinalizedWave (cyclomatic 32) AIDictation.Windows/AIDictation/Services/AudioContainerValidator.cs:11 — AudioContainerValidator.ValidateFinalizedWave has cyclomatic complexity 32 (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 · AudioProcessingCoordinator.StopAndTranscribeAsync (cyclomatic 31) · ×1
  • AudioProcessingCoordinator.StopAndTranscribeAsync (cyclomatic 31) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:459 — AudioProcessingCoordinator.StopAndTranscribeAsync 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 · MacAudioProcessingStore.beginRecognition (cyclomatic 31) · ×1
  • MacAudioProcessingStore.beginRecognition (cyclomatic 31) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:999 — MacAudioProcessingStore.beginRecognition 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 · android_overlay_model.system_actions (cyclomatic 31) · ×1
  • android_overlay_model.system_actions (cyclomatic 31) formal/android_overlay_model.py:539 — android_overlay_model.system_actions 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 · AudioProcessingCoordinator.RetryAsync (cyclomatic 30) · ×1
  • AudioProcessingCoordinator.RetryAsync (cyclomatic 30) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:618 — AudioProcessingCoordinator.RetryAsync has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AudioProcessingCoordinator.ShutdownCoreAsync (cyclomatic 30) · ×1
  • AudioProcessingCoordinator.ShutdownCoreAsync (cyclomatic 30) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:799 — AudioProcessingCoordinator.ShutdownCoreAsync has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. 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 · AndroidAudioProcessingCoordinator.retry (cyclomatic 30) · ×1
  • AndroidAudioProcessingCoordinator.retry (cyclomatic 30) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1079 — AndroidAudioProcessingCoordinator.retry has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppState.performTranscription (cyclomatic 29) · ×1
  • AppState.performTranscription (cyclomatic 29) Whishpermate/Whispermate/Services/AppState.swift:3274 — AppState.performTranscription 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 · AudioProcessingCoordinator.PersistAbandonedAttemptAsync (cyclomatic 28) · ×1
  • AudioProcessingCoordinator.PersistAbandonedAttemptAsync (cyclomatic 28) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1308 — AudioProcessingCoordinator.PersistAbandonedAttemptAsync has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyboardDictationHandoff.journalIsValid (cyclomatic 28) · ×1
  • KeyboardDictationHandoff.journalIsValid (cyclomatic 28) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:1539 — KeyboardDictationHandoff.journalIsValid has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OnboardingScreenKt.ButtonDemoStep (cyclomatic 28) · ×1
  • OnboardingScreenKt.ButtonDemoStep (cyclomatic 28) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:724 — OnboardingScreenKt.ButtonDemoStep 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 · Contract.VerifyDurableStoreAsync (cyclomatic 27) · ×1
  • Contract.VerifyDurableStoreAsync (cyclomatic 27) AIDictation.Windows/RecoveryContract/Program.cs:705 — Contract.VerifyDurableStoreAsync has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · InlineRecordingCoordinator.transcribeAudio (cyclomatic 27) · ×1
  • InlineRecordingCoordinator.transcribeAudio (cyclomatic 27) Whishpermate/WhisperMateIOS/ContentView.swift:3679 — InlineRecordingCoordinator.transcribeAudio 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 · AudioRecorder.processCaptureBuffer (cyclomatic 27) · ×1
  • AudioRecorder.processCaptureBuffer (cyclomatic 27) Whishpermate/Whispermate/Services/AudioRecorder.swift:556 — AudioRecorder.processCaptureBuffer 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 · OpenAIClient.transcribe (cyclomatic 27) · ×1
  • OpenAIClient.transcribe (cyclomatic 27) Whishpermate/Whispermate/Services/OpenAIClient.swift:294 — OpenAIClient.transcribe 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 · RecordingRow.body (cyclomatic 27) · ×1
  • RecordingRow.body (cyclomatic 27) Whishpermate/Whispermate/Views/HistoryView.swift:160 — RecordingRow.body 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 · AudioRecorder.start (cyclomatic 27) · ×1
  • AudioRecorder.start (cyclomatic 27) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/util/AudioRecorder.kt:139 — AudioRecorder.start 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 · OverlayWindow.ApplyState (cyclomatic 26) · ×1
  • OverlayWindow.ApplyState (cyclomatic 26) AIDictation.Windows/AIDictation/Views/OverlayWindow.xaml.cs:226 — OverlayWindow.ApplyState has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 belong to one function literal inside it that branches. 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 · InlineRecordingCoordinator.beginRecording (cyclomatic 26) · ×1
  • InlineRecordingCoordinator.beginRecording (cyclomatic 26) Whishpermate/WhisperMateIOS/ContentView.swift:3288 — InlineRecordingCoordinator.beginRecording has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InlineRecordingCoordinator.stopRecording (cyclomatic 26) · ×1
  • InlineRecordingCoordinator.stopRecording (cyclomatic 26) Whishpermate/WhisperMateIOS/ContentView.swift:3498 — InlineRecordingCoordinator.stopRecording has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppState.finalizeRecording (cyclomatic 26) · ×1
  • AppState.finalizeRecording (cyclomatic 26) Whishpermate/Whispermate/Services/AppState.swift:660 — AppState.finalizeRecording has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppState.reconcileAudioProcessingStore (cyclomatic 25) · ×1
  • AppState.reconcileAudioProcessingStore (cyclomatic 25) Whishpermate/Whispermate/Services/AppState.swift:1759 — AppState.reconcileAudioProcessingStore 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 · OpenAIClient.transcribe (cyclomatic 24) · ×1
  • OpenAIClient.transcribe (cyclomatic 24) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:111 — OpenAIClient.transcribe 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 · AppState.executeTranscriptionAttempt (cyclomatic 24) · ×1
  • AppState.executeTranscriptionAttempt (cyclomatic 24) Whishpermate/Whispermate/Services/AppState.swift:2241 — AppState.executeTranscriptionAttempt 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 · MacAudioProcessingStore.finishFinalization (cyclomatic 24) · ×1
  • MacAudioProcessingStore.finishFinalization (cyclomatic 24) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:856 — MacAudioProcessingStore.finishFinalization has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MacAudioProcessingStore.reconcileAfterRestart (cyclomatic 24) · ×1
  • MacAudioProcessingStore.reconcileAfterRestart (cyclomatic 24) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2564 — MacAudioProcessingStore.reconcileAfterRestart 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 · AndroidAudioProcessingCoordinator.stopCapture (cyclomatic 24) · ×1
  • AndroidAudioProcessingCoordinator.stopCapture (cyclomatic 24) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:509 — AndroidAudioProcessingCoordinator.stopCapture 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 · mac_audio_store_model.record_actions (cyclomatic 24) · ×1
  • mac_audio_store_model.record_actions (cyclomatic 24) formal/mac_audio_store_model.py:348 — mac_audio_store_model.record_actions has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RecordingSheetView.transcribeAudio (cyclomatic 23) · ×1
  • RecordingSheetView.transcribeAudio (cyclomatic 23) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:904 — RecordingSheetView.transcribeAudio 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 · AppContextHelper.getWindowTitle (cyclomatic 23) · ×1
  • AppContextHelper.getWindowTitle (cyclomatic 23) Whishpermate/Whispermate/Services/AppContextHelper.swift:163 — AppContextHelper.getWindowTitle 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 · AppState.handleRecorderStartTerminal (cyclomatic 23) · ×1
  • AppState.handleRecorderStartTerminal (cyclomatic 23) Whishpermate/Whispermate/Services/AppState.swift:401 — AppState.handleRecorderStartTerminal 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 · MainScreenKt.MainScreen (cyclomatic 23) · ×1
  • MainScreenKt.MainScreen (cyclomatic 23) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt:75 — MainScreenKt.MainScreen 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 · android_overlay_model.check (cyclomatic 23) · ×1
  • android_overlay_model.check (cyclomatic 23) formal/android_overlay_model.py:838 — android_overlay_model.check 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 · mac_audio_store_model.check (cyclomatic 23) · ×1
  • mac_audio_store_model.check (cyclomatic 23) formal/mac_audio_store_model.py:951 — mac_audio_store_model.check 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 · KeyboardDictationHandoff.publishHostPhase (cyclomatic 22) · ×1
  • KeyboardDictationHandoff.publishHostPhase (cyclomatic 22) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:730 — KeyboardDictationHandoff.publishHostPhase has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AppState.finishTerminationOwnership (cyclomatic 22) · ×1
  • AppState.finishTerminationOwnership (cyclomatic 22) Whishpermate/Whispermate/Services/AppState.swift:1954 — AppState.finishTerminationOwnership 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 · MacAudioProcessingStore.validateClosedAudio (cyclomatic 22) · ×1
  • MacAudioProcessingStore.validateClosedAudio (cyclomatic 22) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2781 — MacAudioProcessingStore.validateClosedAudio 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 · SileroVAD.analyzeAudio (cyclomatic 22) · ×1
  • SileroVAD.analyzeAudio (cyclomatic 22) Whishpermate/Whispermate/Services/SileroVAD.swift:80 — SileroVAD.analyzeAudio 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 · AndroidAudioProcessingCoordinator.processRecognition (cyclomatic 22) · ×1
  • AndroidAudioProcessingCoordinator.processRecognition (cyclomatic 22) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:870 — AndroidAudioProcessingCoordinator.processRecognition 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 · ContentView.reviewHostIsAtRest (cyclomatic 21) · ×1
  • ContentView.reviewHostIsAtRest (cyclomatic 21) Whishpermate/WhisperMateIOS/ContentView.swift:902 — ContentView.reviewHostIsAtRest has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AppState.runRetranscription (cyclomatic 21) · ×1
  • AppState.runRetranscription (cyclomatic 21) Whishpermate/Whispermate/Services/AppState.swift:1422 — AppState.runRetranscription 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 · MacAudioProcessingStore.checkpointRecoverablePartial (cyclomatic 21) · ×1
  • MacAudioProcessingStore.checkpointRecoverablePartial (cyclomatic 21) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1349 — MacAudioProcessingStore.checkpointRecoverablePartial has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · OnboardingView.onboardingTelemetryData (cyclomatic 21) · ×1
  • OnboardingView.onboardingTelemetryData (cyclomatic 21) Whishpermate/Whispermate/Views/OnboardingView.swift:1064 — OnboardingView.onboardingTelemetryData has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RecordingOverlayView.contentView (cyclomatic 21) · ×1
  • RecordingOverlayView.contentView (cyclomatic 21) Whishpermate/Whispermate/Views/RecordingOverlayView.swift:354 — RecordingOverlayView.contentView 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 · SettingsView.accountSection (cyclomatic 21) · ×1
  • SettingsView.accountSection (cyclomatic 21) Whishpermate/Whispermate/Views/SettingsView.swift:376 — SettingsView.accountSection 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 · AudioProcessingStore.AdoptFinalizedCaptureAsync (cyclomatic 20) · ×1
  • AudioProcessingStore.AdoptFinalizedCaptureAsync (cyclomatic 20) AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:285 — AudioProcessingStore.AdoptFinalizedCaptureAsync 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 · ContentView.iPhoneLayout (cyclomatic 20) · ×1
  • ContentView.iPhoneLayout (cyclomatic 20) Whishpermate/WhisperMateIOS/ContentView.swift:245 — ContentView.iPhoneLayout 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 · KeyboardViewController.reconcileHandoff (cyclomatic 20) · ×1
  • KeyboardViewController.reconcileHandoff (cyclomatic 20) Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:724 — KeyboardViewController.reconcileHandoff 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 · AppState.beginPreparedCapture (cyclomatic 20) · ×1
  • AppState.beginPreparedCapture (cyclomatic 20) Whishpermate/Whispermate/Services/AppState.swift:268 — AppState.beginPreparedCapture 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 · HotkeyManager.handleCGEvent (cyclomatic 20) · ×1
  • HotkeyManager.handleCGEvent (cyclomatic 20) Whishpermate/Whispermate/Services/HotkeyManager.swift:848 — HotkeyManager.handleCGEvent 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. This is NOT this file's highest cyclomatic complexity: KeyCodeHelper.string (cyclomatic 49) 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 · MacAudioProcessingStore.sameCASState (cyclomatic 20) · ×1
  • MacAudioProcessingStore.sameCASState (cyclomatic 20) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2307 — MacAudioProcessingStore.sameCASState has cyclomatic complexity 20 (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 · CodexRealtimeTranscriptionClient.handle (cyclomatic 20) · ×1
  • CodexRealtimeTranscriptionClient.handle (cyclomatic 20) Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:165 — CodexRealtimeTranscriptionClient.handle 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 · mac_audio_store_model.lease_actions (cyclomatic 20) · ×1
  • mac_audio_store_model.lease_actions (cyclomatic 20) formal/mac_audio_store_model.py:298 — mac_audio_store_model.lease_actions 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 · AudioProcessingStore.RecoverOnLaunchAsync (cyclomatic 19) · ×1
  • AudioProcessingStore.RecoverOnLaunchAsync (cyclomatic 19) AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:724 — AudioProcessingStore.RecoverOnLaunchAsync 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 · RecordingSheetView.retryCurrentRecording (cyclomatic 19) · ×1
  • RecordingSheetView.retryCurrentRecording (cyclomatic 19) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:382 — RecordingSheetView.retryCurrentRecording 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 · RecordingSheetView.modelCueText (cyclomatic 19) · ×1
  • RecordingSheetView.modelCueText (cyclomatic 19) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:547 — RecordingSheetView.modelCueText 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 · MobileAudioProcessingStore.persistTerminalState (cyclomatic 19) · ×1
  • MobileAudioProcessingStore.persistTerminalState (cyclomatic 19) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1690 — MobileAudioProcessingStore.persistTerminalState 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 · MobileAudioProcessingStore.validateReferencedPayloadsLocked (cyclomatic 19) · ×1
  • MobileAudioProcessingStore.validateReferencedPayloadsLocked (cyclomatic 19) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2381 — MobileAudioProcessingStore.validateReferencedPayloadsLocked 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 · AppState.startRealtimeTranscriptionIfAvailable (cyclomatic 19) · ×1
  • AppState.startRealtimeTranscriptionIfAvailable (cyclomatic 19) Whishpermate/Whispermate/Services/AppState.swift:2763 — AppState.startRealtimeTranscriptionIfAvailable 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 · AudioHttpRecoveryPolicy.ExecuteAsync (cyclomatic 18) · ×1
  • AudioHttpRecoveryPolicy.ExecuteAsync (cyclomatic 18) AIDictation.Windows/AIDictation/Services/AudioHttpRecoveryPolicy.cs:63 — AudioHttpRecoveryPolicy.ExecuteAsync has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · TranscriptionService.TranscribeAsync (cyclomatic 18) · ×1
  • TranscriptionService.TranscribeAsync (cyclomatic 18) AIDictation.Windows/AIDictation/Services/TranscriptionService.cs:102 — TranscriptionService.TranscribeAsync 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 · WhisperLocalService.EnsureModelAsync (cyclomatic 18) · ×1
  • WhisperLocalService.EnsureModelAsync (cyclomatic 18) AIDictation.Windows/AIDictation/Services/WhisperLocalService.cs:69 — WhisperLocalService.EnsureModelAsync 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 · InlineRecordingCoordinator.finishTerminalRecording (cyclomatic 18) · ×1
  • InlineRecordingCoordinator.finishTerminalRecording (cyclomatic 18) Whishpermate/WhisperMateIOS/ContentView.swift:3904 — InlineRecordingCoordinator.finishTerminalRecording 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 · WritingmateRealtimeClientSecretProvider.fetchAuthorization (cyclomatic 18) · ×1
  • WritingmateRealtimeClientSecretProvider.fetchAuthorization (cyclomatic 18) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:57 — WritingmateRealtimeClientSecretProvider.fetchAuthorization 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 · OpenAIRealtimeTranscriptionClient.handle (cyclomatic 18) · ×1
  • OpenAIRealtimeTranscriptionClient.handle (cyclomatic 18) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:595 — OpenAIRealtimeTranscriptionClient.handle 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 · AppState.commitTranscriptionSuccess (cyclomatic 18) · ×1
  • AppState.commitTranscriptionSuccess (cyclomatic 18) Whishpermate/Whispermate/Services/AppState.swift:2412 — AppState.commitTranscriptionSuccess 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 · AudioRecorder.prepareCapture (cyclomatic 18) · ×1
  • AudioRecorder.prepareCapture (cyclomatic 18) Whishpermate/Whispermate/Services/AudioRecorder.swift:436 — AudioRecorder.prepareCapture 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 · AudioRecorder.stopRecording (cyclomatic 18) · ×1
  • AudioRecorder.stopRecording (cyclomatic 18) Whishpermate/Whispermate/Services/AudioRecorder.swift:1000 — AudioRecorder.stopRecording 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 · MacAudioProcessingStore.adoptFinalizedSource (cyclomatic 18) · ×1
  • MacAudioProcessingStore.adoptFinalizedSource (cyclomatic 18) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:590 — MacAudioProcessingStore.adoptFinalizedSource 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. This is NOT this file's highest cyclomatic complexity: StoreError.errorDescription (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 · MacAudioProcessingStore.transition (cyclomatic 18) · ×1
  • MacAudioProcessingStore.transition (cyclomatic 18) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1646 — MacAudioProcessingStore.transition 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. This is NOT this file's highest cyclomatic complexity: StoreError.errorDescription (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 · AndroidAudioProcessingCoordinator.startCapture (cyclomatic 18) · ×1
  • AndroidAudioProcessingCoordinator.startCapture (cyclomatic 18) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:342 — AndroidAudioProcessingCoordinator.startCapture 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 · OverlayDictationAccessibilityService.attachDragAndTapHandler (cyclomatic 18) · ×1
  • OverlayDictationAccessibilityService.attachDragAndTapHandler (cyclomatic 18) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1319 — OverlayDictationAccessibilityService.attachDragAndTapHandler 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 · OverlayDictationAccessibilityService.startRecording (cyclomatic 18) · ×1
  • OverlayDictationAccessibilityService.startRecording (cyclomatic 18) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1584 — OverlayDictationAccessibilityService.startRecording 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 · AudioRecorderService.CloseSessionResourcesAsync (cyclomatic 17) · ×1
  • AudioRecorderService.CloseSessionResourcesAsync (cyclomatic 17) AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:594 — AudioRecorderService.CloseSessionResourcesAsync 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 · HotkeyService.MouseHookCallback (cyclomatic 17) · ×1
  • HotkeyService.MouseHookCallback (cyclomatic 17) AIDictation.Windows/AIDictation/Services/HotkeyService.cs:388 — HotkeyService.MouseHookCallback 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 · Contract.VerifyHttpMatrixAsync (cyclomatic 17) · ×1
  • Contract.VerifyHttpMatrixAsync (cyclomatic 17) AIDictation.Windows/RecoveryContract/Program.cs:54 — Contract.VerifyHttpMatrixAsync has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 6 function literals inside it that branch. 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: Contract.VerifyCapturedContextAndGenerationResetAsync (cyclomatic 20) 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 · RecordingSheetView.beginRecording (cyclomatic 17) · ×1
  • RecordingSheetView.beginRecording (cyclomatic 17) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:630 — RecordingSheetView.beginRecording 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 · RecordingSheetView.stopRecording (cyclomatic 17) · ×1
  • RecordingSheetView.stopRecording (cyclomatic 17) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:782 — RecordingSheetView.stopRecording 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 · RecordingSheetView.cancelAndReconcileActiveAttempt (cyclomatic 17) · ×1
  • RecordingSheetView.cancelAndReconcileActiveAttempt (cyclomatic 17) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1340 — RecordingSheetView.cancelAndReconcileActiveAttempt 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 · KeyboardDictationHandoff.normalizeAfterHostLaunch (cyclomatic 17) · ×1
  • KeyboardDictationHandoff.normalizeAfterHostLaunch (cyclomatic 17) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:466 — KeyboardDictationHandoff.normalizeAfterHostLaunch has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KeyboardDictationHandoff.publish (cyclomatic 17) · ×1
  • KeyboardDictationHandoff.publish (cyclomatic 17) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:564 — KeyboardDictationHandoff.publish has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MobileAudioProcessingStore.inspectClosedSourceDetached (cyclomatic 17) · ×1
  • MobileAudioProcessingStore.inspectClosedSourceDetached (cyclomatic 17) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1812 — MobileAudioProcessingStore.inspectClosedSourceDetached has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AppState.deleteRecording (cyclomatic 17) · ×1
  • AppState.deleteRecording (cyclomatic 17) Whishpermate/Whispermate/Services/AppState.swift:1603 — AppState.deleteRecording has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppState.clearHistory (cyclomatic 17) · ×1
  • AppState.clearHistory (cyclomatic 17) Whishpermate/Whispermate/Services/AppState.swift:1675 — AppState.clearHistory 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 · MacAudioProcessingStore.salvageFinalizedPartial (cyclomatic 17) · ×1
  • MacAudioProcessingStore.salvageFinalizedPartial (cyclomatic 17) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1417 — MacAudioProcessingStore.salvageFinalizedPartial has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: StoreError.errorDescription (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 · MacDescriptorTree.removeAllEntries (cyclomatic 17) · ×1
  • MacDescriptorTree.removeAllEntries (cyclomatic 17) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:3285 — MacDescriptorTree.removeAllEntries 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: StoreError.errorDescription (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 · RecordingDetailView.body (cyclomatic 17) · ×1
  • RecordingDetailView.body (cyclomatic 17) Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:425 — RecordingDetailView.body has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OnboardingView.navigationButtons (cyclomatic 17) · ×1
  • OnboardingView.navigationButtons (cyclomatic 17) Whishpermate/Whispermate/Views/OnboardingView.swift:998 — OnboardingView.navigationButtons 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 · OverlayDictationAccessibilityService.normalizeEditableText (cyclomatic 17) · ×1
  • OverlayDictationAccessibilityService.normalizeEditableText (cyclomatic 17) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2312 — OverlayDictationAccessibilityService.normalizeEditableText 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 · android_overlay_model.main (cyclomatic 17) · ×1
  • android_overlay_model.main (cyclomatic 17) formal/android_overlay_model.py:932 — android_overlay_model.main 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 · mac_audio_store_model.worker_actions (cyclomatic 17) · ×1
  • mac_audio_store_model.worker_actions (cyclomatic 17) formal/mac_audio_store_model.py:435 — mac_audio_store_model.worker_actions 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 · App.StopRecordingAsync (cyclomatic 16) · ×1
  • App.StopRecordingAsync (cyclomatic 16) REDACTED:875 — App.StopRecordingAsync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ContentView.inlineModelCueText (cyclomatic 16) · ×1
  • ContentView.inlineModelCueText (cyclomatic 16) Whishpermate/WhisperMateIOS/ContentView.swift:1042 — ContentView.inlineModelCueText has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InlineRecordingCoordinator.stopListening (cyclomatic 16) · ×1
  • InlineRecordingCoordinator.stopListening (cyclomatic 16) Whishpermate/WhisperMateIOS/ContentView.swift:2989 — InlineRecordingCoordinator.stopListening has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyboardDictationHandoff.writeDurably (cyclomatic 16) · ×1
  • KeyboardDictationHandoff.writeDurably (cyclomatic 16) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:1600 — KeyboardDictationHandoff.writeDurably has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 · HistoryManager.removeCanonicalAudioIfPresent (cyclomatic 16) · ×1
  • HistoryManager.removeCanonicalAudioIfPresent (cyclomatic 16) Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:146 — HistoryManager.removeCanonicalAudioIfPresent has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppState.startRecording (cyclomatic 16) · ×1
  • AppState.startRecording (cyclomatic 16) Whishpermate/Whispermate/Services/AppState.swift:129 — AppState.startRecording has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SentryTelemetry.deviceKind (cyclomatic 16) · ×1
  • SentryTelemetry.deviceKind (cyclomatic 16) Whishpermate/Whispermate/Services/SentryTelemetry.swift:208 — SentryTelemetry.deviceKind has cyclomatic complexity 16 (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 · mac_audio_store_model.valid (cyclomatic 16) · ×1
  • mac_audio_store_model.valid (cyclomatic 16) formal/mac_audio_store_model.py:219 — mac_audio_store_model.valid has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · MobileAudioProcessingStore.normalizeInterruptedAttempts (cognitive 91) · ×1
  • MobileAudioProcessingStore.normalizeInterruptedAttempts (cognitive 91) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1376 — MobileAudioProcessingStore.normalizeInterruptedAttempts has cognitive complexity 91 (threshold 15). Drivers by points: if/else 27 (68 pts), ternaries 4 (12 pts), boolean chains 8, match/switch 1 (2 pts), loops 1 (nesting depth added 50). 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 · MobileAudioProcessingStore.validateSnapshotLayoutLocked (cognitive 85) · ×1
  • MobileAudioProcessingStore.validateSnapshotLayoutLocked (cognitive 85) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2232 — MobileAudioProcessingStore.validateSnapshotLayoutLocked has cognitive complexity 85 (threshold 15). Drivers by points: boolean chains 57, if/else 14 (24 pts), match/switch 4 (nesting depth added 10). 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 · AppState.handleRecorderFinalizationTerminal (cognitive 85) · ×1
  • AppState.handleRecorderFinalizationTerminal (cognitive 85) Whishpermate/Whispermate/Services/AppState.swift:827 — AppState.handleRecorderFinalizationTerminal has cognitive complexity 85 (threshold 15). Drivers by points: if/else 26 (70 pts), ternaries 3 (8 pts), boolean chains 4, error handling 1 (2 pts), match/switch 1 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioRecorder.start (cognitive 59) · ×1
  • AudioRecorder.start (cognitive 59) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/util/AudioRecorder.kt:139 — AudioRecorder.start has cognitive complexity 59 (threshold 15). Drivers by points: if/else 30 (51 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MacAudioProcessingStore.validate (cognitive 57) · ×1
  • MacAudioProcessingStore.validate (cognitive 57) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2447 — MacAudioProcessingStore.validate has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 20, match/switch 1 (2 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OnboardingScreenKt.OnboardingScreen (cognitive 55) · ×1
  • OnboardingScreenKt.OnboardingScreen (cognitive 55) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:216 — OnboardingScreenKt.OnboardingScreen has cognitive complexity 55 (threshold 15). Drivers by points: if/else 36 (47 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AndroidAudioProcessingCoordinator.retry (cognitive 54) · ×1
  • AndroidAudioProcessingCoordinator.retry (cognitive 54) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:1079 — AndroidAudioProcessingCoordinator.retry has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27 (42 pts), boolean chains 7, match/switch 1 (3 pts), error handling 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HotkeyOption.from (cognitive 53) · ×1
  • HotkeyOption.from (cognitive 53) Whishpermate/Whispermate/Views/HotkeyRecorderView.swift:164 — HotkeyOption.from has cognitive complexity 53 (threshold 15). Drivers by points: if/else 27 (33 pts), boolean chains 18, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AudioProcessingCoordinator.StartCaptureAsync (cognitive 52) · ×1
  • AudioProcessingCoordinator.StartCaptureAsync (cognitive 52) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:204 — AudioProcessingCoordinator.StartCaptureAsync has cognitive complexity 52 (threshold 15). Of this number, 51 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppState.executeTranscriptionAttempt (cognitive 51) · ×1
  • AppState.executeTranscriptionAttempt (cognitive 51) Whishpermate/Whispermate/Services/AppState.swift:2241 — AppState.executeTranscriptionAttempt has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (26 pts), error handling 6 (16 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIClient.transcribeSinglePart (cognitive 51) · ×1
  • OpenAIClient.transcribeSinglePart (cognitive 51) Whishpermate/Whispermate/Services/OpenAIClient.swift:426 — OpenAIClient.transcribeSinglePart has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 15, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · android_overlay_model.check (cognitive 51) · ×1
  • android_overlay_model.check (cognitive 51) formal/android_overlay_model.py:838 — android_overlay_model.check has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (36 pts), loops 7 (12 pts), boolean chains 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mac_audio_store_model.check (cognitive 51) · ×1
  • mac_audio_store_model.check (cognitive 51) formal/mac_audio_store_model.py:951 — mac_audio_store_model.check has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 9 (20 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InlineRecordingCoordinator.transcribeAudio (cognitive 49) · ×1
  • InlineRecordingCoordinator.transcribeAudio (cognitive 49) Whishpermate/WhisperMateIOS/ContentView.swift:3679 — InlineRecordingCoordinator.transcribeAudio has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 7, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppState.reconcileAudioProcessingStore (cognitive 46) · ×1
  • AppState.reconcileAudioProcessingStore (cognitive 46) Whishpermate/Whispermate/Services/AppState.swift:1759 — AppState.reconcileAudioProcessingStore has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (25 pts), ternaries 4 (8 pts), boolean chains 4, loops 3 (4 pts), error handling 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · android_overlay_model.system_actions (cognitive 46) · ×1
  • android_overlay_model.system_actions (cognitive 46) formal/android_overlay_model.py:539 — android_overlay_model.system_actions has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (35 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InlineRecordingCoordinator.beginRecording (cognitive 44) · ×1
  • InlineRecordingCoordinator.beginRecording (cognitive 44) Whishpermate/WhisperMateIOS/ContentView.swift:3288 — InlineRecordingCoordinator.beginRecording has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 8, ternaries 2 (5 pts), error handling 2 (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 · InlineRecordingCoordinator.stopRecording (cognitive 44) · ×1
  • InlineRecordingCoordinator.stopRecording (cognitive 44) Whishpermate/WhisperMateIOS/ContentView.swift:3498 — InlineRecordingCoordinator.stopRecording has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 7, ternaries 2 (4 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIClient.transcribe (cognitive 43) · ×1
  • OpenAIClient.transcribe (cognitive 43) Whishpermate/Whispermate/Services/OpenAIClient.swift:294 — OpenAIClient.transcribe has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 9 (19 pts), if/else 6 (10 pts), error handling 6 (8 pts), boolean chains 6 (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 · AppState.runRetranscription (cognitive 42) · ×1
  • AppState.runRetranscription (cognitive 42) Whishpermate/Whispermate/Services/AppState.swift:1422 — AppState.runRetranscription has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (35 pts), match/switch 1 (4 pts), boolean chains 2, error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioRecorder.processCaptureBuffer (cognitive 42) · ×1
  • AudioRecorder.processCaptureBuffer (cognitive 42) Whishpermate/Whispermate/Services/AudioRecorder.swift:556 — AudioRecorder.processCaptureBuffer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 6, match/switch 2 (4 pts), error handling 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 · SileroVAD.analyzeAudio (cognitive 42) · ×1
  • SileroVAD.analyzeAudio (cognitive 42) Whishpermate/Whispermate/Services/SileroVAD.swift:80 — SileroVAD.analyzeAudio has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (37 pts), loops 4 (5 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppState.performTranscription (cognitive 41) · ×1
  • AppState.performTranscription (cognitive 41) Whishpermate/Whispermate/Services/AppState.swift:3274 — AppState.performTranscription has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7, ternaries 4 (7 pts), error handling 2 (6 pts), match/switch 2 (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 · SettingsView.accountSection (cognitive 41) · ×1
  • SettingsView.accountSection (cognitive 41) Whishpermate/Whispermate/Views/SettingsView.swift:376 — SettingsView.accountSection has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (28 pts), ternaries 4 (10 pts), boolean chains 3 (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 · AudioProcessingCoordinator.RunRecognitionAsync (cognitive 39) · ×1
  • AudioProcessingCoordinator.RunRecognitionAsync (cognitive 39) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1075 — AudioProcessingCoordinator.RunRecognitionAsync has cognitive complexity 39 (threshold 15). Of this number, 30 points are the body's own statements and 9 belong to 3 function literals inside it that branch. 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 · RecordingSheetView.transcribeAudio (cognitive 38) · ×1
  • RecordingSheetView.transcribeAudio (cognitive 38) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:904 — RecordingSheetView.transcribeAudio has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 7, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIClient.transcribe (cognitive 37) · ×1
  • OpenAIClient.transcribe (cognitive 37) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:111 — OpenAIClient.transcribe has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 6 (10 pts), error handling 6 (8 pts), boolean chains 6 (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 · AppState.handleRecorderStartTerminal (cognitive 37) · ×1
  • AppState.handleRecorderStartTerminal (cognitive 37) Whishpermate/Whispermate/Services/AppState.swift:401 — AppState.handleRecorderStartTerminal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 4, error handling 1 (2 pts), match/switch 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 · AppState.finalizeRecording (cognitive 37) · ×1
  • AppState.finalizeRecording (cognitive 37) Whishpermate/Whispermate/Services/AppState.swift:660 — AppState.finalizeRecording has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 9, ternaries 2, 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 · AndroidAudioProcessingCoordinator.stopCapture (cognitive 37) · ×1
  • AndroidAudioProcessingCoordinator.stopCapture (cognitive 37) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:509 — AndroidAudioProcessingCoordinator.stopCapture has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 6, match/switch 1 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioProcessingCoordinator.StopAndTranscribeAsync (cognitive 36) · ×1
  • AudioProcessingCoordinator.StopAndTranscribeAsync (cognitive 36) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:459 — AudioProcessingCoordinator.StopAndTranscribeAsync has cognitive complexity 36 (threshold 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 · HotkeyManager.handleCGEvent (cognitive 36) · ×1
  • HotkeyManager.handleCGEvent (cognitive 36) Whishpermate/Whispermate/Services/HotkeyManager.swift:848 — HotkeyManager.handleCGEvent has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MacAudioProcessingStore.reconcileAfterRestart (cognitive 36) · ×1
  • MacAudioProcessingStore.reconcileAfterRestart (cognitive 36) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2564 — MacAudioProcessingStore.reconcileAfterRestart has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 3, match/switch 1 (2 pts), ternaries 1 (2 pts), 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 · RecordingRow.body (cognitive 36) · ×1
  • RecordingRow.body (cognitive 36) Whishpermate/Whispermate/Views/HistoryView.swift:160 — RecordingRow.body has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (20 pts), ternaries 7 (12 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · android_overlay_model.main (cognitive 35) · ×1
  • android_overlay_model.main (cognitive 35) formal/android_overlay_model.py:932 — android_overlay_model.main has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 9 (14 pts), loops 3 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioProcessingCoordinator.RetryAsync (cognitive 33) · ×1
  • AudioProcessingCoordinator.RetryAsync (cognitive 33) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:618 — AudioProcessingCoordinator.RetryAsync has cognitive complexity 33 (threshold 15). 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 · AudioProcessingCoordinator.PersistAbandonedAttemptAsync (cognitive 33) · ×1
  • AudioProcessingCoordinator.PersistAbandonedAttemptAsync (cognitive 33) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1308 — AudioProcessingCoordinator.PersistAbandonedAttemptAsync has cognitive complexity 33 (threshold 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 · AudioProcessingStore.RecoverOnLaunchAsync (cognitive 33) · ×1
  • AudioProcessingStore.RecoverOnLaunchAsync (cognitive 33) AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:724 — AudioProcessingStore.RecoverOnLaunchAsync has cognitive complexity 33 (threshold 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 · AppContextHelper.getWindowTitle (cognitive 33) · ×1
  • AppContextHelper.getWindowTitle (cognitive 33) Whishpermate/Whispermate/Services/AppContextHelper.swift:163 — AppContextHelper.getWindowTitle has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 11, loops 2 (4 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 · AppState.finishTerminationOwnership (cognitive 33) · ×1
  • AppState.finishTerminationOwnership (cognitive 33) Whishpermate/Whispermate/Services/AppState.swift:1954 — AppState.finishTerminationOwnership has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 4 (8 pts), error handling 2 (6 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidAudioProcessingCoordinator.processRecognition (cognitive 33) · ×1
  • AndroidAudioProcessingCoordinator.processRecognition (cognitive 33) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:870 — AndroidAudioProcessingCoordinator.processRecognition has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 5, 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 · AudioHttpRecoveryPolicy.ExecuteAsync (cognitive 32) · ×1
  • AudioHttpRecoveryPolicy.ExecuteAsync (cognitive 32) AIDictation.Windows/AIDictation/Services/AudioHttpRecoveryPolicy.cs:63 — AudioHttpRecoveryPolicy.ExecuteAsync has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AudioProcessingCoordinator.ShutdownCoreAsync (cognitive 32) · ×1
  • AudioProcessingCoordinator.ShutdownCoreAsync (cognitive 32) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:799 — AudioProcessingCoordinator.ShutdownCoreAsync has cognitive complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to one function literal inside it that branches. 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 · AndroidAudioProcessingCoordinator.startCapture (cognitive 32) · ×1
  • AndroidAudioProcessingCoordinator.startCapture (cognitive 32) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:342 — AndroidAudioProcessingCoordinator.startCapture has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 5, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContentView.iPhoneLayout (cognitive 31) · ×1
  • ContentView.iPhoneLayout (cognitive 31) Whishpermate/WhisperMateIOS/ContentView.swift:245 — ContentView.iPhoneLayout has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 5 (8 pts), boolean chains 5 (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 · KeyboardDictationHandoff.journalIsValid (cognitive 31) · ×1
  • KeyboardDictationHandoff.journalIsValid (cognitive 31) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:1539 — KeyboardDictationHandoff.journalIsValid has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 12, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MacAudioProcessingStore.validateClosedAudio (cognitive 31) · ×1
  • MacAudioProcessingStore.validateClosedAudio (cognitive 31) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2781 — MacAudioProcessingStore.validateClosedAudio has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 10, loops 2 (4 pts), error handling 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 · AndroidAudioProcessingCoordinator.cancelCapture (cognitive 31) · ×1
  • AndroidAudioProcessingCoordinator.cancelCapture (cognitive 31) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/AndroidAudioProcessingCoordinator.kt:701 — AndroidAudioProcessingCoordinator.cancelCapture has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 22, if/else 7 (8 pts), match/switch 1 (nesting depth added 1). 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 · WhisperLocalService.EnsureModelAsync (cognitive 30) · ×1
  • WhisperLocalService.EnsureModelAsync (cognitive 30) AIDictation.Windows/AIDictation/Services/WhisperLocalService.cs:69 — WhisperLocalService.EnsureModelAsync has cognitive complexity 30 (threshold 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 · MacAudioProcessingStore.beginRecognition (cognitive 30) · ×1
  • MacAudioProcessingStore.beginRecognition (cognitive 30) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:999 — MacAudioProcessingStore.beginRecognition has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 11, 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 · MacDescriptorTree.removeAllEntries (cognitive 30) · ×1
  • MacDescriptorTree.removeAllEntries (cognitive 30) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:3285 — MacDescriptorTree.removeAllEntries has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mac_audio_store_model.record_actions (cognitive 29) · ×1
  • mac_audio_store_model.record_actions (cognitive 29) formal/mac_audio_store_model.py:348 — mac_audio_store_model.record_actions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 10 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AudioContainerValidator.ValidateFinalizedWave (cognitive 28) · ×1
  • AudioContainerValidator.ValidateFinalizedWave (cognitive 28) AIDictation.Windows/AIDictation/Services/AudioContainerValidator.cs:11 — AudioContainerValidator.ValidateFinalizedWave has cognitive complexity 28 (threshold 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 · Contract.VerifyDurableStoreAsync (cognitive 28) · ×1
  • Contract.VerifyDurableStoreAsync (cognitive 28) AIDictation.Windows/RecoveryContract/Program.cs:705 — Contract.VerifyDurableStoreAsync has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MobileAudioProcessingStore.persistTerminalState (cognitive 28) · ×1
  • MobileAudioProcessingStore.persistTerminalState (cognitive 28) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1690 — MobileAudioProcessingStore.persistTerminalState has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OnboardingScreenKt.ButtonDemoStep (cognitive 28) · ×1
  • OnboardingScreenKt.ButtonDemoStep (cognitive 28) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:724 — OnboardingScreenKt.ButtonDemoStep has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 5, match/switch 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · mac_audio_store_model.lease_actions (cognitive 28) · ×1
  • mac_audio_store_model.lease_actions (cognitive 28) formal/mac_audio_store_model.py:298 — mac_audio_store_model.lease_actions has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5, 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 · InlineRecordingCoordinator.finishTerminalRecording (cognitive 27) · ×1
  • InlineRecordingCoordinator.finishTerminalRecording (cognitive 27) Whishpermate/WhisperMateIOS/ContentView.swift:3904 — InlineRecordingCoordinator.finishTerminalRecording has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppState.beginPreparedCapture (cognitive 27) · ×1
  • AppState.beginPreparedCapture (cognitive 27) Whishpermate/Whispermate/Services/AppState.swift:268 — AppState.beginPreparedCapture has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 11, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppState.commitTranscriptionSuccess (cognitive 27) · ×1
  • AppState.commitTranscriptionSuccess (cognitive 27) Whishpermate/Whispermate/Services/AppState.swift:2412 — AppState.commitTranscriptionSuccess has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidAudioDecoder.decodeToMono (cognitive 27) · ×1
  • AndroidAudioDecoder.decodeToMono (cognitive 27) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/AndroidAudioDecoder.kt:27 — AndroidAudioDecoder.decodeToMono has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 1 (2 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingSheetView.stopRecording (cognitive 26) · ×1
  • RecordingSheetView.stopRecording (cognitive 26) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:782 — RecordingSheetView.stopRecording has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (7 pts), boolean chains 5, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContextRulesManager.matchingRules (cognitive 26) · ×1
  • ContextRulesManager.matchingRules (cognitive 26) Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:218 — ContextRulesManager.matchingRules has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, loops 1 (3 pts), ternaries 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 · HotkeyService.MouseHookCallback (cognitive 25) · ×1
  • HotkeyService.MouseHookCallback (cognitive 25) AIDictation.Windows/AIDictation/Services/HotkeyService.cs:388 — HotkeyService.MouseHookCallback has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · RecordingSheetView.retryCurrentRecording (cognitive 25) · ×1
  • RecordingSheetView.retryCurrentRecording (cognitive 25) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:382 — RecordingSheetView.retryCurrentRecording has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, error handling 2, ternaries 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 · MacInstallationAnalytics.flush (cognitive 25) · ×1
  • MacInstallationAnalytics.flush (cognitive 25) Whishpermate/Whispermate/WhispermateApp.swift:114 — MacInstallationAnalytics.flush has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 5, error handling 1 (2 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 · OpenAIClient.exportChunks (cognitive 25) · ×1
  • OpenAIClient.exportChunks (cognitive 25) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:400 — OpenAIClient.exportChunks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobileInstallationAnalytics.flush (cognitive 25) · ×1
  • MobileInstallationAnalytics.flush (cognitive 25) Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:128 — MobileInstallationAnalytics.flush has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 5, error handling 1 (2 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 · AppState.startRealtimeTranscriptionIfAvailable (cognitive 25) · ×1
  • AppState.startRealtimeTranscriptionIfAvailable (cognitive 25) Whishpermate/Whispermate/Services/AppState.swift:2763 — AppState.startRealtimeTranscriptionIfAvailable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, match/switch 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 · MacAudioProcessingStore.persist (cognitive 25) · ×1
  • MacAudioProcessingStore.persist (cognitive 25) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2102 — MacAudioProcessingStore.persist has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 3 (4 pts), loops 1 (2 pts) (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 · mac_audio_store_model.caller_actions (cognitive 25) · ×1
  • mac_audio_store_model.caller_actions (cognitive 25) formal/mac_audio_store_model.py:480 — mac_audio_store_model.caller_actions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AudioProcessingCoordinator.RecoverOnLaunchAsync (cognitive 24) · ×1
  • AudioProcessingCoordinator.RecoverOnLaunchAsync (cognitive 24) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:107 — AudioProcessingCoordinator.RecoverOnLaunchAsync has cognitive complexity 24 (threshold 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 · RecordingSheetView.beginRecording (cognitive 24) · ×1
  • RecordingSheetView.beginRecording (cognitive 24) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:630 — RecordingSheetView.beginRecording has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, error handling 2, ternaries 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 · AppleAudioHTTPRecovery.transcribe (cognitive 24) · ×1
  • AppleAudioHTTPRecovery.transcribe (cognitive 24) Whishpermate/WhisperMateShared/Networking/AppleAudioHTTPRecovery.swift:151 — AppleAudioHTTPRecovery.transcribe has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 3 (6 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobileAudioProcessingStore.validateReferencedPayloadsLocked (cognitive 24) · ×1
  • MobileAudioProcessingStore.validateReferencedPayloadsLocked (cognitive 24) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2381 — MobileAudioProcessingStore.validateReferencedPayloadsLocked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, ternaries 2 (4 pts), loops 1, 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 · RecordingOverlayView.contentView (cognitive 24) · ×1
  • RecordingOverlayView.contentView (cognitive 24) Whishpermate/Whispermate/Views/RecordingOverlayView.swift:354 — RecordingOverlayView.contentView has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 5, if/else 5 (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.
D2 · Cognitive Complexity · OverlayDictationAccessibilityService.attachDragAndTapHandler (cognitive 24) · ×1
  • OverlayDictationAccessibilityService.attachDragAndTapHandler (cognitive 24) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1319 — OverlayDictationAccessibilityService.attachDragAndTapHandler has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (7 pts), boolean chains 2 (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 · mac_audio_store_model.worker_actions (cognitive 24) · ×1
  • mac_audio_store_model.worker_actions (cognitive 24) formal/mac_audio_store_model.py:435 — mac_audio_store_model.worker_actions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioRecorderService.CloseSessionResourcesAsync (cognitive 23) · ×1
  • AudioRecorderService.CloseSessionResourcesAsync (cognitive 23) AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:594 — AudioRecorderService.CloseSessionResourcesAsync has cognitive complexity 23 (threshold 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 · AppState.prepareForTermination (cognitive 23) · ×1
  • AppState.prepareForTermination (cognitive 23) Whishpermate/Whispermate/Services/AppState.swift:1868 — AppState.prepareForTermination has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioRecorder.prepareCapture (cognitive 23) · ×1
  • AudioRecorder.prepareCapture (cognitive 23) Whishpermate/Whispermate/Services/AudioRecorder.swift:436 — AudioRecorder.prepareCapture has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, error handling 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 · OverlayDictationAccessibilityService.normalizeEditableText (cognitive 23) · ×1
  • OverlayDictationAccessibilityService.normalizeEditableText (cognitive 23) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:2312 — OverlayDictationAccessibilityService.normalizeEditableText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 2 (5 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 · RecordingDetailScreenKt.RecordingDetailScreen (cognitive 23) · ×1
  • RecordingDetailScreenKt.RecordingDetailScreen (cognitive 23) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailScreen.kt:67 — RecordingDetailScreenKt.RecordingDetailScreen has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioRecorderService.ShutdownAsync (cognitive 22) · ×1
  • AudioRecorderService.ShutdownAsync (cognitive 22) AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:280 — AudioRecorderService.ShutdownAsync has cognitive complexity 22 (threshold 15). 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 · TranscriptionService.TranscribeAsync (cognitive 22) · ×1
  • TranscriptionService.TranscribeAsync (cognitive 22) AIDictation.Windows/AIDictation/Services/TranscriptionService.cs:102 — TranscriptionService.TranscribeAsync has cognitive complexity 22 (threshold 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 · OverlayWindow.ApplyState (cognitive 22) · ×1
  • OverlayWindow.ApplyState (cognitive 22) AIDictation.Windows/AIDictation/Views/OverlayWindow.xaml.cs:226 — OverlayWindow.ApplyState has cognitive complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 272). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · InlineRecordingCoordinator.stopListening (cognitive 22) · ×1
  • InlineRecordingCoordinator.stopListening (cognitive 22) Whishpermate/WhisperMateIOS/ContentView.swift:2989 — InlineRecordingCoordinator.stopListening has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 1 (2 pts), boolean chains 1, match/switch 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 · AudioRecorder.resumeRecording (cognitive 22) · ×1
  • AudioRecorder.resumeRecording (cognitive 22) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:853 — AudioRecorder.resumeRecording has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (5 pts), boolean chains 4 (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 · CodexRealtimeTranscriptionClient.handle (cognitive 22) · ×1
  • CodexRealtimeTranscriptionClient.handle (cognitive 22) Whishpermate/Whispermate/Services/OpenAIRealtimeTranscriptionClient.swift:165 — CodexRealtimeTranscriptionClient.handle has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, match/switch 2, ternaries 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 · mac_audio_store_model.valid (cognitive 22) · ×1
  • mac_audio_store_model.valid (cognitive 22) formal/mac_audio_store_model.py:219 — mac_audio_store_model.valid has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 7, 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 · ContentView.performMobileAudioRecovery (cognitive 21) · ×1
  • ContentView.performMobileAudioRecovery (cognitive 21) Whishpermate/WhisperMateIOS/ContentView.swift:1840 — ContentView.performMobileAudioRecovery has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 2, ternaries 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 · KeyboardViewController.reconcileHandoff (cognitive 21) · ×1
  • KeyboardViewController.reconcileHandoff (cognitive 21) Whishpermate/WhisperMateKeyboard/KeyboardViewController.swift:724 — KeyboardViewController.reconcileHandoff has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, error handling 2 (3 pts), 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 · KeyboardDictationHandoff.publishHostPhase (cognitive 21) · ×1
  • KeyboardDictationHandoff.publishHostPhase (cognitive 21) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:730 — KeyboardDictationHandoff.publishHostPhase has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MacAudioProcessingStore.finishFinalization (cognitive 21) · ×1
  • MacAudioProcessingStore.finishFinalization (cognitive 21) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:856 — MacAudioProcessingStore.finishFinalization has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, match/switch 1, ternaries 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 · RecordingDetailView.body (cognitive 21) · ×1
  • RecordingDetailView.body (cognitive 21) Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:425 — RecordingDetailView.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 5 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MainScreenKt.MainScreen (cognitive 21) · ×1
  • MainScreenKt.MainScreen (cognitive 21) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt:75 — MainScreenKt.MainScreen has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, match/switch 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · android_overlay_model.user_actions (cognitive 21) · ×1
  • android_overlay_model.user_actions (cognitive 21) formal/android_overlay_model.py:503 — android_overlay_model.user_actions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 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 · AudioRecorderService.StartWasapiSession (cognitive 20) · ×1
  • AudioRecorderService.StartWasapiSession (cognitive 20) AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:388 — AudioRecorderService.StartWasapiSession has cognitive complexity 20 (threshold 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 · Contract.VerifyHttpMatrixAsync (cognitive 20) · ×1
  • Contract.VerifyHttpMatrixAsync (cognitive 20) AIDictation.Windows/RecoveryContract/Program.cs:54 — Contract.VerifyHttpMatrixAsync has cognitive complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContentView.reviewHostIsAtRest (cognitive 20) · ×1
  • ContentView.reviewHostIsAtRest (cognitive 20) Whishpermate/WhisperMateIOS/ContentView.swift:902 — ContentView.reviewHostIsAtRest has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, 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 · ContentView.inlineModelCueText (cognitive 20) · ×1
  • ContentView.inlineModelCueText (cognitive 20) Whishpermate/WhisperMateIOS/ContentView.swift:1042 — ContentView.inlineModelCueText has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 3, match/switch 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 · RecordingSheetView.cancelAndReconcileActiveAttempt (cognitive 20) · ×1
  • RecordingSheetView.cancelAndReconcileActiveAttempt (cognitive 20) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:1340 — RecordingSheetView.cancelAndReconcileActiveAttempt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, ternaries 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 · AppState.deleteRecording (cognitive 20) · ×1
  • AppState.deleteRecording (cognitive 20) Whishpermate/Whispermate/Services/AppState.swift:1603 — AppState.deleteRecording has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (2 pts), ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · AudioRecorder.stopRecording (cognitive 20) · ×1
  • AudioRecorder.stopRecording (cognitive 20) Whishpermate/Whispermate/Services/AudioRecorder.swift:1000 — AudioRecorder.stopRecording has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4, 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 · MacAudioProcessingStore.checkpointRecoverablePartial (cognitive 20) · ×1
  • MacAudioProcessingStore.checkpointRecoverablePartial (cognitive 20) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1349 — MacAudioProcessingStore.checkpointRecoverablePartial has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, 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 · RecordingOverlayView.overlayContent (cognitive 20) · ×1
  • RecordingOverlayView.overlayContent (cognitive 20) Whishpermate/Whispermate/Views/RecordingOverlayView.swift:197 — RecordingOverlayView.overlayContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · OverlayDictationAccessibilityService.startRecording (cognitive 20) · ×1
  • OverlayDictationAccessibilityService.startRecording (cognitive 20) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/service/OverlayDictationAccessibilityService.kt:1584 — OverlayDictationAccessibilityService.startRecording has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, error handling 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ContentView.startKeyboardCommandPolling (cognitive 19) · ×1
  • ContentView.startKeyboardCommandPolling (cognitive 19) Whishpermate/WhisperMateIOS/ContentView.swift:1517 — ContentView.startKeyboardCommandPolling has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 8, 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 · RecordingSheetView.modelCueText (cognitive 19) · ×1
  • RecordingSheetView.modelCueText (cognitive 19) Whishpermate/WhisperMateIOS/RecordingSheetView.swift:547 — RecordingSheetView.modelCueText has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5 (7 pts), match/switch 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 · KeyboardDictationHandoff.writeDurably (cognitive 19) · ×1
  • KeyboardDictationHandoff.writeDurably (cognitive 19) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:1600 — KeyboardDictationHandoff.writeDurably has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 2, loops 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobileAudioProcessingStore.inspectClosedSourceDetached (cognitive 19) · ×1
  • MobileAudioProcessingStore.inspectClosedSourceDetached (cognitive 19) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1812 — MobileAudioProcessingStore.inspectClosedSourceDetached has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 3, loops 1 (2 pts) (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 · WritingmateRealtimeClientSecretProvider.fetchAuthorization (cognitive 19) · ×1
  • WritingmateRealtimeClientSecretProvider.fetchAuthorization (cognitive 19) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:57 — WritingmateRealtimeClientSecretProvider.fetchAuthorization has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 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 · OpenAIRealtimeTranscriptionClient.handle (cognitive 19) · ×1
  • OpenAIRealtimeTranscriptionClient.handle (cognitive 19) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:595 — OpenAIRealtimeTranscriptionClient.handle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, match/switch 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppState.startRecording (cognitive 19) · ×1
  • AppState.startRecording (cognitive 19) Whishpermate/Whispermate/Services/AppState.swift:129 — AppState.startRecording has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 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 · AppState.clearHistory (cognitive 19) · ×1
  • AppState.clearHistory (cognitive 19) Whishpermate/Whispermate/Services/AppState.swift:1675 — AppState.clearHistory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3, ternaries 2 (3 pts), boolean chains 2, match/switch 1 (2 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 · MacAudioProcessingStore.commit (cognitive 19) · ×1
  • MacAudioProcessingStore.commit (cognitive 19) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1782 — MacAudioProcessingStore.commit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 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 · MacAudioProcessingStore.sameCASState (cognitive 19) · ×1
  • MacAudioProcessingStore.sameCASState (cognitive 19) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:2307 — MacAudioProcessingStore.sameCASState has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, if/else 1. 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 · MacHistoryAudioDeletion.remove (cognitive 19) · ×1
  • MacHistoryAudioDeletion.remove (cognitive 19) Whishpermate/Whispermate/Services/MacHistoryAudioDeletion.swift:15 — MacHistoryAudioDeletion.remove has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 9 (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 · InstallationAnalytics.flush (cognitive 19) · ×1
  • InstallationAnalytics.flush (cognitive 19) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/telemetry/InstallationAnalytics.kt:200 — InstallationAnalytics.flush has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SharedTranscriptionService.transcribe (cognitive 18) · ×1
  • SharedTranscriptionService.transcribe (cognitive 18) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:192 — SharedTranscriptionService.transcribe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 4 (8 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MacAudioProcessingStore.adoptFinalizedSource (cognitive 18) · ×1
  • MacAudioProcessingStore.adoptFinalizedSource (cognitive 18) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:590 — MacAudioProcessingStore.adoptFinalizedSource has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · run_configured_gradle.resolved_configuration (cognitive 18) · ×1
  • run_configured_gradle.resolved_configuration (cognitive 18) AIDictationAndroid/scripts/run_configured_gradle.py:137 — run_configured_gradle.resolved_configuration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClipboardService.PasteTextWithResultAsync (cognitive 17) · ×1
  • ClipboardService.PasteTextWithResultAsync (cognitive 17) AIDictation.Windows/AIDictation/Services/ClipboardService.cs:125 — ClipboardService.PasteTextWithResultAsync has cognitive complexity 17 (threshold 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 · HotkeyService.KeyboardHookCallback (cognitive 17) · ×1
  • HotkeyService.KeyboardHookCallback (cognitive 17) AIDictation.Windows/AIDictation/Services/HotkeyService.cs:351 — HotkeyService.KeyboardHookCallback has cognitive complexity 17 (threshold 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 · AppState.beginLiveTranscription (cognitive 17) · ×1
  • AppState.beginLiveTranscription (cognitive 17) Whishpermate/Whispermate/Services/AppState.swift:2125 — AppState.beginLiveTranscription has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 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 · MacAudioProcessingStore.transition (cognitive 17) · ×1
  • MacAudioProcessingStore.transition (cognitive 17) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1646 — MacAudioProcessingStore.transition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · OverlayWindowManager.screenForFrontmostApplication (cognitive 17) · ×1
  • OverlayWindowManager.screenForFrontmostApplication (cognitive 17) Whishpermate/Whispermate/Services/OverlayWindowManager.swift:1027 — OverlayWindowManager.screenForFrontmostApplication has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, 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 · HistorySidebarRow.body (cognitive 17) · ×1
  • HistorySidebarRow.body (cognitive 17) Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:350 — HistorySidebarRow.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TranscriptionClient.writeAudioChunk (cognitive 17) · ×1
  • TranscriptionClient.writeAudioChunk (cognitive 17) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/TranscriptionClient.kt:484 — TranscriptionClient.writeAudioChunk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · android_overlay_model.env_actions (cognitive 17) · ×1
  • android_overlay_model.env_actions (cognitive 17) formal/android_overlay_model.py:464 — android_overlay_model.env_actions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AudioProcessingStore.AdoptFinalizedCaptureAsync (cognitive 16) · ×1
  • AudioProcessingStore.AdoptFinalizedCaptureAsync (cognitive 16) AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:285 — AudioProcessingStore.AdoptFinalizedCaptureAsync has cognitive complexity 16 (threshold 15). 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 · AudioProcessingStore.ScheduleDeletedCleanup (cognitive 16) · ×1
  • AudioProcessingStore.ScheduleDeletedCleanup (cognitive 16) AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:1141 — AudioProcessingStore.ScheduleDeletedCleanup has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 1145). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · KeyboardDictationLiveActivityView.body (cognitive 16) · ×1
  • KeyboardDictationLiveActivityView.body (cognitive 16) Whishpermate/WhisperMateLiveActivity/KeyboardDictationLiveActivity.swift:51 — KeyboardDictationLiveActivityView.body has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 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 · KeyboardDictationHandoff.publish (cognitive 16) · ×1
  • KeyboardDictationHandoff.publish (cognitive 16) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:564 — KeyboardDictationHandoff.publish has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 7. 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 · KeyboardDictationHandoff.consumePendingCommandEnvelopePersisted (cognitive 16) · ×1
  • KeyboardDictationHandoff.consumePendingCommandEnvelopePersisted (cognitive 16) Whishpermate/WhisperMateShared/Services/KeyboardDictationHandoff.swift:657 — KeyboardDictationHandoff.consumePendingCommandEnvelopePersisted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TranscriptionProviderManager.init (cognitive 16) · ×1
  • TranscriptionProviderManager.init (cognitive 16) Whishpermate/Whispermate/Models/APIProvider.swift:218 — TranscriptionProviderManager.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, ternaries 3 (4 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 · AudioRecorder.calculateRMS (cognitive 16) · ×1
  • AudioRecorder.calculateRMS (cognitive 16) Whishpermate/Whispermate/Services/AudioRecorder.swift:957 — AudioRecorder.calculateRMS has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (6 pts), 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 · MacAudioProcessingStore.salvageFinalizedPartial (cognitive 16) · ×1
  • MacAudioProcessingStore.salvageFinalizedPartial (cognitive 16) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:1417 — MacAudioProcessingStore.salvageFinalizedPartial has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · OverlayWindowManager.transition (cognitive 16) · ×1
  • OverlayWindowManager.transition (cognitive 16) Whishpermate/Whispermate/Services/OverlayWindowManager.swift:311 — OverlayWindowManager.transition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, match/switch 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SonioxRealtimeTranscriptionClient.handle (cognitive 16) · ×1
  • SonioxRealtimeTranscriptionClient.handle (cognitive 16) Whishpermate/Whispermate/Services/SonioxRealtimeTranscriptionClient.swift:222 — SonioxRealtimeTranscriptionClient.handle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (3 pts), ternaries 1 (3 pts), error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingOverlayView.body (cognitive 16) · ×1
  • RecordingOverlayView.body (cognitive 16) Whishpermate/Whispermate/Views/RecordingOverlayView.swift:108 — RecordingOverlayView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, ternaries 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 · DictionaryEntryRow.body (cognitive 16) · ×1
  • DictionaryEntryRow.body (cognitive 16) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:120 — DictionaryEntryRow.body has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 4 (5 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 · MainScreenKt.HistoryTab (cognitive 16) · ×1
  • MainScreenKt.HistoryTab (cognitive 16) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt:267 — MainScreenKt.HistoryTab has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 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 · RecordingSheetKt.RecordingSheet (cognitive 16) · ×1
  • RecordingSheetKt.RecordingSheet (cognitive 16) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/recording/RecordingSheet.kt:79 — RecordingSheetKt.RecordingSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: SettingsScreen.kt → TranscriptionRepository.kt, CircularMicButton.kt, TranscriptionSettingsScreen.kt, CircularMicButtonView.kt AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt — `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt` changes together with 4 other files — `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/repository/TranscriptionRepository.kt`, `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/components/CircularMicButton.kt`, `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt`, `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (91 shared lines) · ×1
  • Near-duplicate member pair (91 shared lines) Whishpermate/WhisperMateIOS/ContentView.swift:3679 — Whishpermate/WhisperMateIOS/ContentView.swift:3679-3902 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:904-1104 — These two members are variants of one another: 91 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (85 shared lines) · ×1
  • Near-duplicate member pair (85 shared lines) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:111 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:111-225 | Whishpermate/Whispermate/Services/OpenAIClient.swift:294-424 — These two members are variants of one another: 85 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (55 shared lines) · ×1
  • Near-duplicate member pair (55 shared lines) Whishpermate/WhisperMateIOS/ContentView.swift:3498 — Whishpermate/WhisperMateIOS/ContentView.swift:3498-3677 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:782-902 — These two members are variants of one another: 55 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (45 shared lines) · ×1
  • Near-duplicate member pair (45 shared lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:46 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:46-124 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/CommandClient.kt:141-223 — These two members are variants of one another: 45 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) Whishpermate/Whispermate/Views/SettingsView.swift:376 — Whishpermate/Whispermate/Views/SettingsView.swift:376-584 | Whishpermate/Whispermate/Views/SettingsView.swift:806-1010 | Whishpermate/Whispermate/Views/SettingsView.swift:1014-1094 | Whishpermate/Whispermate/Views/SettingsView.swift:1211-1349 | Whishpermate/Whispermate/Views/SettingsView.swift:1387-1474 | Whishpermate/Whispermate/Views/SettingsView.swift:1623-1730 | Whishpermate/Whispermate/Views/SettingsView.swift:1732-1742 — These 7 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 7 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 7 times.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1053 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1053-1104 | Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift:27-96 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (81 corresponding lines) · ×1
  • Edited copy of a member (81 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:205 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:205-297 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:566-646 — These two members are one piece of code written twice and then edited apart: 81 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:43 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:43-106 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:888-949 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (53 corresponding lines) · ×1
  • Edited copy of a member (53 corresponding lines) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:468 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:468-520 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:453-505 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:389 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:389-438 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:374-423 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (59 corresponding lines) · ×1
  • Edited copy of a member (59 corresponding lines) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:632 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:632-690 | Whishpermate/Whispermate/Services/OpenAIClient.swift:874-939 — 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 (63 corresponding lines) · ×1
  • Edited copy of a member (63 corresponding lines) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:731 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:731-793 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:811-873 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2693 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2693-2735 | Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:461-523 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:283 — Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:283-318 | Whishpermate/Whispermate/Services/MacTranscriptionAttemptSnapshot.swift:64-91 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (70 corresponding lines) · ×1
  • Edited copy of a member (70 corresponding lines) Whishpermate/Whispermate/Services/AppState.swift:1603 — Whishpermate/Whispermate/Services/AppState.swift:1603-1673 | Whishpermate/Whispermate/Services/AppState.swift:1675-1744 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 55+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 55+ corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1261 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1261-1315 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1401-1469 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt:645-713 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 55 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 (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:103 — Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:103-140 | Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:151-196 — 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 (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:26 — Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:26-76 | Whishpermate/Whispermate/Services/AudioRecorder.swift:1375-1435 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) Whishpermate/Whispermate/Services/HotkeyManager.swift:491 — Whishpermate/Whispermate/Services/HotkeyManager.swift:491-525 | Whishpermate/Whispermate/Services/HotkeyManager.swift:527-556 — 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, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/components/CircularMicButton.kt:188 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/components/CircularMicButton.kt:188-206 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/CircularMicButtonView.kt:211-230 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/views/OverlayMicButtonView.kt:274-289 — 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 copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:27 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:27-59 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt:370-402 — 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 (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:478 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:478-508 | Whishpermate/Whispermate/Services/OpenAIClient.swift:693-728 — 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 copies of one member (3 members, 42+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 42+ corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:305 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:305-346 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:504-554 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:749-790 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 42 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, 37+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 37+ corresponding lines) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:629 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:629-665 | Whishpermate/Whispermate/Services/AppState.swift:3823-3870 | Whishpermate/Whispermate/Services/VoiceActivityDetector.swift:209-249 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) Whishpermate/Whispermate/Views/RecordingOverlayView.swift:512 — Whishpermate/Whispermate/Views/RecordingOverlayView.swift:512-533 | Whishpermate/Whispermate/Views/RecordingOverlayView.swift:535-556 | Whishpermate/Whispermate/Views/RecordingOverlayView.swift:670-689 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) Whishpermate/Whispermate/Services/AudioRecorder.swift:122 — Whishpermate/Whispermate/Services/AudioRecorder.swift:122-158 | Whishpermate/Whispermate/Services/AudioRecorder.swift:160-201 — 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 copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:33 — Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:33-59 | Whishpermate/WhisperMateShared/Storage/KeychainHelper.swift:89-107 | Whishpermate/Whispermate/Services/KeychainHelper.swift:30-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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 (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) Whishpermate/Whispermate/Services/AudioVolumeManager.swift:121 — Whishpermate/Whispermate/Services/AudioVolumeManager.swift:121-150 | Whishpermate/Whispermate/Services/AudioVolumeManager.swift:152-178 — 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 copies of one member (3 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 22+ corresponding lines) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:218 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:218-239 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:114-136 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:153-176 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:555 — Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:555-567 | Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:569-580 | Whishpermate/WhisperMateShared/Storage/HistoryManager.swift:582-593 — 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 (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsViewModel.kt:40 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsViewModel.kt:40-49 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsViewModel.kt:93-102 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsViewModel.kt:146-155 — 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 (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:707 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:707-721 | Whishpermate/Whispermate/Services/AppState.swift:4058-4072 | Whishpermate/Whispermate/Services/VoiceActivityDetector.swift:175-189 — 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 (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:65 — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:65-81 | Whishpermate/Whispermate/Services/AppState.swift:3006-3022 | scripts/validate_ios_realtime_transcription.swift:235-242 — 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 (5 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 7+ corresponding lines) Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:127 — Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:127-133 | Whishpermate/WhisperMateShared/Models/PromptRule.swift:64-70 | Whishpermate/WhisperMateShared/Models/PromptRule.swift:72-78 | Whishpermate/Whispermate/Models/PromptRule.swift:65-71 | Whishpermate/Whispermate/Models/PromptRule.swift:73-79 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:104 — Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:104-109 | Whishpermate/WhisperMateShared/Models/PromptRule.swift:44-49 | Whishpermate/Whispermate/Models/PromptRule.swift:45-50 — 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 (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1992 — AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1992-1998 | AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:973-979 | AIDictation.Windows/AIDictation/Services/BoundedHttpContentReader.cs:187-193 | AIDictation.Windows/AIDictation/Services/HistoryService.cs:331-337 — 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 · Duplicated block (37–65 lines × 2) · ×1
  • Duplicated block (37–65 lines × 2) Whishpermate/Whispermate/Services/StatusBarManager.swift:154 — Whishpermate/Whispermate/Services/StatusBarManager.swift:154-218 | Whishpermate/Whispermate/Services/StatusBarManager.swift:258-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/StatusBarManager.swift:258` 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 (58–61 lines × 2) · ×1
  • Duplicated block (58–61 lines × 2) Whishpermate/WhisperMateIOS/ContentView.swift:3714 — Whishpermate/WhisperMateIOS/ContentView.swift:3714-3771 | Whishpermate/WhisperMateIOS/RecordingSheetView.swift:938-998 — before extracting anything, compare `Whishpermate/WhisperMateIOS/ContentView.swift` and `Whishpermate/WhisperMateIOS/RecordingSheetView.swift` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 322 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 `Whishpermate/WhisperMateIOS/ContentView.swift:3714` 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×1
  • Duplicated block (51 lines × 2) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:731 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:731-781 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:811-861 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:731` 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 (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:578 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:578-627 | Whishpermate/Whispermate/Services/OpenAIClient.swift:820-869 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:578` 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 (46–47 lines × 2) · ×1
  • Duplicated block (46–47 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:180 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:180-225 | Whishpermate/Whispermate/Services/OpenAIClient.swift:378-424 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:180` 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 (48 lines × 2) · ×1
  • Duplicated block (48 lines × 2) Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:128 — Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:128-175 | Whishpermate/Whispermate/WhispermateApp.swift:114-161 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) Whishpermate/WhisperMateShared/Services/DebugLog.swift:89 — Whishpermate/WhisperMateShared/Services/DebugLog.swift:89-131 | Whishpermate/Whispermate/Services/DebugLog.swift:98-140 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/DebugLog.swift` and `Whishpermate/Whispermate/Services/DebugLog.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 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 (29–30 lines × 2) · ×1
  • Duplicated block (29–30 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:546 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:546-574 | Whishpermate/Whispermate/Services/OpenAIClient.swift:786-815 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:546` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:389 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:389-418 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:374-403 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:389` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:121 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:121-147 | Whishpermate/Whispermate/Services/OpenAIClient.swift:306-333 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:121` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (24–28 lines × 2) · ×1
  • Duplicated block (24–28 lines × 2) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1064 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1064-1087 | Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift:40-67 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/AudioRecorder.swift` and `Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 (26–28 lines × 2) · ×1
  • Duplicated block (26–28 lines × 2) Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:45 — Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:45-70 | Whishpermate/Whispermate/Services/AudioRecorder.swift:1397-1424 — 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 `Whishpermate/WhisperMateShared/Services/RealtimePCMConverter.swift:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) Whishpermate/Whispermate/Services/AudioDeviceManager.swift:789 — Whishpermate/Whispermate/Services/AudioDeviceManager.swift:789-816 | Whishpermate/Whispermate/Services/AudioDeviceManager.swift:821-848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/AudioDeviceManager.swift:789` 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.
D4 · Code Duplication · Duplicated block (22–26 lines × 2) · ×1
  • Duplicated block (22–26 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:136 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:136-157 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:122-147 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (21–26 lines × 2) · ×1
  • Duplicated block (21–26 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:184 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:184-204 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:174-199 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:184` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) Whishpermate/Whispermate/Services/AppContextHelper.swift:180 — Whishpermate/Whispermate/Services/AppContextHelper.swift:180-204 | Whishpermate/Whispermate/Services/AppContextHelper.swift:206-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Services/AppContextHelper.swift:180` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (22–25 lines × 2) · ×1
  • Duplicated block (22–25 lines × 2) Whishpermate/Whispermate/Services/AppState.swift:3846 — Whishpermate/Whispermate/Services/AppState.swift:3846-3870 | Whishpermate/Whispermate/Services/VoiceActivityDetector.swift:228-249 — 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 `Whishpermate/Whispermate/Services/AppState.swift:3846` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–24 lines × 4) · ×1
  • Duplicated block (22–24 lines × 4) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:122 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:122-144 | Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:170-191 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:108-131 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:160-183 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:122` 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (20–23 lines × 4) · ×1
  • Duplicated block (20–23 lines × 4) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:146 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:146-165 | Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:193-212 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:133-155 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:185-207 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:146` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:105 — Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:105-127 | Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:153-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/ParakeetRuntime/ParakeetRuntimeBridge.swift:105` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (19–23 lines × 2) · ×1
  • Duplicated block (19–23 lines × 2) Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:32 — Whishpermate/WhisperMateShared/Services/OpenAIRealtimeTranscriptionClient.swift:32-54 | scripts/validate_ios_realtime_transcription.swift:213-231 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:634 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:634-652 | Whishpermate/Whispermate/Services/AppState.swift:3828-3849 — 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 `Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:634` 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) Whishpermate/Whispermate/Views/SettingsView.swift:881 — Whishpermate/Whispermate/Views/SettingsView.swift:881-901 | Whishpermate/Whispermate/Views/SettingsView.swift:1434-1452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/SettingsView.swift:881` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–19 lines × 5) · ×1
  • Duplicated block (16–19 lines × 5) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:90 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:90-105 | Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:152-167 | Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:199-214 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:139-157 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:191-209 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.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.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:214 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:214-232 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:668-686 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:1049-1067 — 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 `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:214` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) AIDictation.Windows/RecoveryContract/Program.cs:405 — AIDictation.Windows/RecoveryContract/Program.cs:405-421 | AIDictation.Windows/RecoveryContract/Program.cs:468-486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictation.Windows/RecoveryContract/Program.cs:405` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×1
  • Duplicated block (16–19 lines × 2) Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:262 — Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:262-277 | Whishpermate/WhisperMateShared/Services/SharedTranscriptionService.swift:308-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–19 lines × 2) · ×1
  • Duplicated block (15–19 lines × 2) Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:751 — Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:751-769 | Whishpermate/Whispermate/Services/MacAudioProcessingStore.swift:819-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:72 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:72-87 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:60-77 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:72` 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:194 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:194-210 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:649-664 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:1029-1045 — 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 `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:194` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) AIDictation.Windows/RecoveryContract/Program.cs:732 — AIDictation.Windows/RecoveryContract/Program.cs:732-746 | AIDictation.Windows/RecoveryContract/Program.cs:762-778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictation.Windows/RecoveryContract/Program.cs:732` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:218 — Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:218-234 | Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:281-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/WhisperMateIOS/TranscriptionSettingsView.swift:218` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) Whishpermate/Whispermate/Views/SettingsView.swift:918 — Whishpermate/Whispermate/Views/SettingsView.swift:918-932 | Whishpermate/Whispermate/Views/SettingsView.swift:947-961 | Whishpermate/Whispermate/Views/SettingsView.swift:1038-1052 | Whishpermate/Whispermate/Views/SettingsView.swift:1065-1079 | Whishpermate/Whispermate/Views/SettingsView.swift:1414-1428 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/SettingsView.swift:918` 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, `Whishpermate/Whispermate/Views/SettingsView.swift:916` calls `disabled` and `Whishpermate/Whispermate/Views/SettingsView.swift:945` 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 (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:225 — Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:225-239 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:122-136 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:162-176 — 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 `Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:225` 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, `Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:161` calls `failure` and `Whishpermate/WhisperMateShared/Services/IOSAudioProcessingDeadline.swift:224` 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 (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) AIDictation.Windows/AIDictation/Services/AppState.cs:97 — AIDictation.Windows/AIDictation/Services/AppState.cs:97-109 | AIDictation.Windows/AIDictation/Services/AppState.cs:131-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictation.Windows/AIDictation/Services/AppState.cs:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–14 lines × 6) · ×1
  • Duplicated block (13–14 lines × 6) Whishpermate/Whispermate/Views/SettingsView.swift:918 — Whishpermate/Whispermate/Views/SettingsView.swift:918-931 | Whishpermate/Whispermate/Views/SettingsView.swift:947-960 | Whishpermate/Whispermate/Views/SettingsView.swift:1038-1051 | Whishpermate/Whispermate/Views/SettingsView.swift:1065-1078 | Whishpermate/Whispermate/Views/SettingsView.swift:1414-1427 | Whishpermate/Whispermate/Views/SettingsView.swift:1703-1715 — 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 `Whishpermate/Whispermate/Views/SettingsView.swift:918` 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, `Whishpermate/Whispermate/Views/SettingsView.swift:916` calls `disabled` and `Whishpermate/Whispermate/Views/SettingsView.swift:945` 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–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1094 — Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1094-1104 | Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift:84-96 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/AudioRecorder.swift` and `Whishpermate/Whispermate/Services/FrequencyAnalyzer.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 `Whishpermate/WhisperMateShared/Services/AudioRecorder.swift:1094` 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 (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) Whishpermate/Whispermate/Views/SettingsView.swift:815 — Whishpermate/Whispermate/Views/SettingsView.swift:815-826 | Whishpermate/Whispermate/Views/SettingsView.swift:893-904 | Whishpermate/Whispermate/Views/SettingsView.swift:1017-1028 | Whishpermate/Whispermate/Views/SettingsView.swift:1392-1403 | Whishpermate/Whispermate/Views/SettingsView.swift:1444-1455 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/SettingsView.swift:815` 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 `spacing` to `12` in one and `2` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Whishpermate/Whispermate/Views/SettingsView.swift:808` calls `groupHeader` and `Whishpermate/Whispermate/Views/SettingsView.swift:1015` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:382 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:382-392 | Whishpermate/Whispermate/Services/OpenAIClient.swift:620-631 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:382` 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 (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:695 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:695-716 | Whishpermate/Whispermate/Services/OpenAIClient.swift:944-966 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:203 — Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:203-212 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:657-666 | Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:1038-1047 | Whishpermate/Whispermate/Views/SettingsView.swift:1868-1878 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Whishpermate/Whispermate/Views/Components/TranscriptionSettingsView.swift:203` 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 × 4) · ×1
  • Duplicated block (11 lines × 4) Whishpermate/Whispermate/Views/SettingsView.swift:418 — Whishpermate/Whispermate/Views/SettingsView.swift:418-428 | Whishpermate/Whispermate/Views/SettingsView.swift:1256-1266 | Whishpermate/Whispermate/Views/SettingsView.swift:1688-1698 | Whishpermate/Whispermate/Views/SettingsView.swift:1708-1718 — 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 `Whishpermate/Whispermate/Views/SettingsView.swift:418` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 10) · ×1
  • Duplicated block (10 lines × 10) Whishpermate/Whispermate/Views/SettingsView.swift:818 — Whishpermate/Whispermate/Views/SettingsView.swift:818-827 | Whishpermate/Whispermate/Views/SettingsView.swift:896-905 | Whishpermate/Whispermate/Views/SettingsView.swift:924-933 | Whishpermate/Whispermate/Views/SettingsView.swift:953-962 | Whishpermate/Whispermate/Views/SettingsView.swift:1020-1029 | Whishpermate/Whispermate/Views/SettingsView.swift:1044-1053 | Whishpermate/Whispermate/Views/SettingsView.swift:1071-1080 | Whishpermate/Whispermate/Views/SettingsView.swift:1395-1404 | Whishpermate/Whispermate/Views/SettingsView.swift:1420-1429 | Whishpermate/Whispermate/Views/SettingsView.swift:1447-1456 — 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 `Whishpermate/Whispermate/Views/SettingsView.swift:818` 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, `Whishpermate/Whispermate/Views/SettingsView.swift:1389` calls `groupHeader` and `Whishpermate/Whispermate/Views/SettingsView.swift:1015` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–10 lines × 6) · ×1
  • Duplicated block (8–10 lines × 6) Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:73 — Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:73-81 | Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:129-136 | Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift:177-184 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:61-70 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:115-122 | Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift:167-174 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.swift` and `Whishpermate/Whispermate/Services/ParakeetTranscriptionService.swift` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 362 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 `Whishpermate/WhisperMateShared/Services/SharedParakeetTranscriptionService.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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:722 — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:722-731 | Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:748-757 | Whishpermate/Whispermate/Services/OpenAIClient.swift:975-984 | Whishpermate/Whispermate/Services/OpenAIClient.swift:1004-1013 — before extracting anything, compare `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift` and `Whishpermate/Whispermate/Services/OpenAIClient.swift` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 405 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 `Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:722` 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) Whishpermate/WhisperMateShared/Services/DebugLog.swift:22 — Whishpermate/WhisperMateShared/Services/DebugLog.swift:22-30 | Whishpermate/WhisperMateShared/Services/DebugLog.swift:34-42 | Whishpermate/WhisperMateShared/Services/DebugLog.swift:70-78 | Whishpermate/Whispermate/Services/DebugLog.swift:28-36 | Whishpermate/Whispermate/Services/DebugLog.swift:40-48 | Whishpermate/Whispermate/Services/DebugLog.swift:79-87 — before extracting anything, compare `Whishpermate/WhisperMateShared/Services/DebugLog.swift` and `Whishpermate/Whispermate/Services/DebugLog.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) Whishpermate/Whispermate/Views/SettingsView.swift:419 — Whishpermate/Whispermate/Views/SettingsView.swift:419-427 | Whishpermate/Whispermate/Views/SettingsView.swift:1257-1265 | Whishpermate/Whispermate/Views/SettingsView.swift:1689-1697 | Whishpermate/Whispermate/Views/SettingsView.swift:1709-1717 | Whishpermate/Whispermate/Views/SettingsView.swift:1733-1741 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `4` in one and `2` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) Whishpermate/WhisperMateIOS/OnboardingView.swift:149 — Whishpermate/WhisperMateIOS/OnboardingView.swift:149-157 | Whishpermate/WhisperMateIOS/OnboardingView.swift:173-181 | Whishpermate/WhisperMateIOS/OnboardingView.swift:225-233 | Whishpermate/WhisperMateIOS/OnboardingView.swift:272-280 — 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 `Whishpermate/WhisperMateIOS/OnboardingView.swift:149` 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 `spacing` to `0` in one and `12` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:588 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:588-595 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:621-628 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:652-660 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1872 — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1872-1878 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:1881-1887 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2752-2758 | Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2761-2767 — 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 `Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2752` 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1993 — AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1993-1998 | AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:974-979 | AIDictation.Windows/AIDictation/Services/BoundedHttpContentReader.cs:188-193 | AIDictation.Windows/AIDictation/Services/HistoryService.cs:332-337 — 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. 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 (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1270 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1270-1298 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1416-1444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1270` 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–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailScreen.kt:123 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailScreen.kt:123-143 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailSheet.kt:97-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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailScreen.kt:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:306 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:306-323 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:505-522 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:750-767 — 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/transcription/TranscriptionSettingsScreen.kt:306` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1408 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1408-1424 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/settings/SettingsScreen.kt:653-670 — 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 `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingScreen.kt:1408` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:354 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:354-367 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:437-449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:354` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:368` calls `e` and `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:450` 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 (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt:427 — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainScreen.kt:427-431 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailScreen.kt:325-329 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailSheet.kt:178-182 | AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/recording/RecordingSheet.kt:453-457 — 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 · Near-duplicate member pair (30 shared lines) · ×1
  • Near-duplicate member pair (30 shared lines) scripts/validate_ios_audio_processing_recovery.swift:366 — scripts/validate_ios_audio_processing_recovery.swift:366-432 | scripts/validate_ios_audio_processing_recovery.swift:434-535 — These two members are variants of one another: 30 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (14 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (14 members, 50+ identical tokens) scripts/validate_macos_audio_processing_store.swift:202 — scripts/validate_macos_audio_processing_store.swift:202-227 | scripts/validate_macos_audio_processing_store.swift:400-462 | scripts/validate_macos_audio_processing_store.swift:464-533 | scripts/validate_macos_audio_processing_store.swift:535-571 | scripts/validate_macos_audio_processing_store.swift:637-740 | scripts/validate_macos_audio_processing_store.swift:742-803 | scripts/validate_macos_audio_processing_store.swift:805-878 | scripts/validate_macos_audio_processing_store.swift:880-948 | scripts/validate_macos_audio_processing_store.swift:1150-1201 | scripts/validate_macos_audio_processing_store.swift:1203-1235 | scripts/validate_macos_audio_processing_store.swift:1309-1391 | scripts/validate_macos_audio_processing_store.swift:1393-1428 | scripts/validate_macos_audio_processing_store.swift:1487-1542 | scripts/validate_macos_audio_processing_store.swift:1605-1635 — These 14 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 14 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 14 times.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) scripts/validate_apple_http_audio_recovery.swift:338 — scripts/validate_apple_http_audio_recovery.swift:338-348 | scripts/validate_ios_audio_processing_recovery.swift:162-172 | scripts/validate_macos_audio_processing_store.swift:93-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 3+ corresponding lines) scripts/validate_auth_session_restore.swift:13 — scripts/validate_auth_session_restore.swift:13-15 | scripts/validate_ios_audio_processing_recovery.swift:147-149 | scripts/validate_macos_capture_route_recovery.swift:13-15 | scripts/validate_macos_preparation_format_retry.swift:13-15 | scripts/validate_macos_recording_recovery.swift:13-15 — 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 copy of a member (3 corresponding lines) · ×1
  • Edited copy of a member (3 corresponding lines) scripts/validate_ios_quick_dictation.swift:7 — scripts/validate_ios_quick_dictation.swift:7-10 | scripts/validate_keyboard_audio_recovery.swift:15-17 — 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 (10–19 lines × 3) · ×1
  • Duplicated block (10–19 lines × 3) scripts/validate_macos_hotkey_options.swift:20 — scripts/validate_macos_hotkey_options.swift:20-38 | scripts/validate_macos_lifecycle_guards.swift:248-257 | scripts/validate_parakeet_runtime_recovery.swift:294-306 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. 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–16 lines × 2) · ×1
  • Duplicated block (11–16 lines × 2) scripts/validate_parakeet_runtime_recovery.swift:148 — scripts/validate_parakeet_runtime_recovery.swift:148-163 | scripts/validate_parakeet_runtime_recovery.swift:203-213 — both copies are in the same file, so extract the 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 (7–15 lines × 2) · ×1
  • Duplicated block (7–15 lines × 2) scripts/validate_keyboard_audio_recovery.swift:383 — scripts/validate_keyboard_audio_recovery.swift:383-389 | scripts/validate_keyboard_audio_recovery.swift:561-575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_keyboard_audio_recovery.swift:561` 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–14 lines × 4) · ×1
  • Duplicated block (6–14 lines × 4) scripts/validate_ios_audio_processing_recovery.swift:591 — scripts/validate_ios_audio_processing_recovery.swift:591-604 | scripts/validate_ios_audio_processing_recovery.swift:1292-1297 | scripts/validate_ios_audio_processing_recovery.swift:1310-1315 | scripts/validate_ios_audio_processing_recovery.swift:1368-1381 — 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 `scripts/validate_ios_audio_processing_recovery.swift:591` 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 (11–14 lines × 3) · ×1
  • Duplicated block (11–14 lines × 3) scripts/validate_ios_audio_processing_recovery.swift:1701 — scripts/validate_ios_audio_processing_recovery.swift:1701-1714 | scripts/validate_ios_audio_processing_recovery.swift:1773-1783 | scripts/validate_ios_audio_processing_recovery.swift:1801-1811 — 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 `scripts/validate_ios_audio_processing_recovery.swift:1701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) scripts/validate_keyboard_audio_recovery.swift:119 — scripts/validate_keyboard_audio_recovery.swift:119-131 | scripts/validate_keyboard_audio_recovery.swift:173-187 | scripts/validate_keyboard_audio_recovery.swift:296-308 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_keyboard_audio_recovery.swift:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:403 — scripts/validate_ios_audio_processing_recovery.swift:403-412 | scripts/validate_ios_audio_processing_recovery.swift:465-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:465` 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–13 lines × 2) · ×1
  • Duplicated block (6–13 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:426 — scripts/validate_ios_audio_processing_recovery.swift:426-431 | scripts/validate_ios_audio_processing_recovery.swift:632-644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:632` 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–12 lines × 13) · ×1
  • Duplicated block (6–12 lines × 13) scripts/validate_macos_audio_processing_store.swift:208 — scripts/validate_macos_audio_processing_store.swift:208-219 | scripts/validate_macos_audio_processing_store.swift:435-440 | scripts/validate_macos_audio_processing_store.swift:471-482 | scripts/validate_macos_audio_processing_store.swift:504-509 | scripts/validate_macos_audio_processing_store.swift:543-548 | scripts/validate_macos_audio_processing_store.swift:709-714 | scripts/validate_macos_audio_processing_store.swift:753-758 | scripts/validate_macos_audio_processing_store.swift:1168-1179 | scripts/validate_macos_audio_processing_store.swift:1210-1215 | scripts/validate_macos_audio_processing_store.swift:1316-1321 | scripts/validate_macos_audio_processing_store.swift:1400-1405 | scripts/validate_macos_audio_processing_store.swift:1506-1517 | scripts/validate_macos_audio_processing_store.swift:1612-1623 — 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 `scripts/validate_macos_audio_processing_store.swift:208` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) scripts/validate_ios_audio_processing_recovery.swift:1165 — scripts/validate_ios_audio_processing_recovery.swift:1165-1173 | scripts/validate_ios_audio_processing_recovery.swift:1269-1280 — both copies are in the same file, so extract the 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 (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) scripts/validate_keyboard_audio_recovery.swift:242 — scripts/validate_keyboard_audio_recovery.swift:242-248 | scripts/validate_keyboard_audio_recovery.swift:300-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_keyboard_audio_recovery.swift:300` 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, `scripts/validate_keyboard_audio_recovery.swift:249` calls `addingTimeInterval` and `scripts/validate_keyboard_audio_recovery.swift:311` 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 (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) scripts/validate_macos_audio_processing_store.swift:287 — scripts/validate_macos_audio_processing_store.swift:287-296 | scripts/validate_macos_audio_processing_store.swift:373-382 | scripts/validate_macos_audio_processing_store.swift:405-413 | scripts/validate_macos_audio_processing_store.swift:575-584 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) scripts/validate_ios_audio_processing_recovery.swift:368 — scripts/validate_ios_audio_processing_recovery.swift:368-377 | scripts/validate_ios_audio_processing_recovery.swift:436-444 | scripts/validate_ios_audio_processing_recovery.swift:539-548 — 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 `scripts/validate_ios_audio_processing_recovery.swift:368` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–9 lines × 5) · ×1
  • Duplicated block (7–9 lines × 5) scripts/validate_ios_audio_processing_recovery.swift:568 — scripts/validate_ios_audio_processing_recovery.swift:568-574 | scripts/validate_ios_audio_processing_recovery.swift:600-608 | scripts/validate_ios_audio_processing_recovery.swift:1746-1752 | scripts/validate_ios_audio_processing_recovery.swift:1782-1788 | scripts/validate_ios_audio_processing_recovery.swift:1810-1816 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:600` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–9 lines × 2) · ×1
  • Duplicated block (6–9 lines × 2) scripts/validate_macos_realtime_finalization.swift:406 — scripts/validate_macos_realtime_finalization.swift:406-411 | scripts/validate_macos_realtime_finalization.swift:424-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/validate_macos_realtime_finalization.swift:405` calls `precondition`, `waitForSignal` and `scripts/validate_macos_realtime_finalization.swift:423` 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 (4–7 lines × 5) · ×1
  • Duplicated block (4–7 lines × 5) scripts/validate_ios_audio_processing_recovery.swift:344 — scripts/validate_ios_audio_processing_recovery.swift:344-353 | scripts/validate_ios_audio_processing_recovery.swift:1420-1426 | scripts/validate_ios_audio_processing_recovery.swift:1613-1616 | scripts/validate_ios_audio_processing_recovery.swift:1674-1680 | scripts/validate_ios_audio_processing_recovery.swift:1710-1716 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/validate_ios_audio_processing_recovery.swift:344` 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 (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) scripts/validate_ios_audio_processing_recovery.swift:250 — scripts/validate_ios_audio_processing_recovery.swift:250-254 | scripts/validate_ios_audio_processing_recovery.swift:971-975 | scripts/validate_ios_audio_processing_recovery.swift:1586-1590 — 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 `scripts/validate_ios_audio_processing_recovery.swift:250` 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, `scripts/validate_ios_audio_processing_recovery.swift:247` calls `UUID` and `scripts/validate_ios_audio_processing_recovery.swift:970` 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.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (21 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (21 clone groups) marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:13 — 21 duplicated blocks under marketing/videos/ have copies in at least two of the sibling directories 2026-07-30-how-to-use-dictation-on-mac, 2026-08-01-voice-typing-android, 2026-08-02-open-source-speech-to-text — 14 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 21 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block (98 lines × 2 locations) · ×1
  • Duplicated block (98 lines × 2 locations) marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:13 — marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:13 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:13 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (59 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (59 matched lines × 2 locations) marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:39 — marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:39 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:41 — the two spans are one implementation copied and then locally edited — 502 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (58 lines × 2 locations) · ×1
  • Duplicated block (58 lines × 2 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/components.tsx:154 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/components.tsx:154 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:212 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (56 lines × 3 locations) · ×1
  • Duplicated block (56 lines × 3 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/components.tsx:11 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/components.tsx:11 · marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:13 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:13 — the 3 copies are spread across 3 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (43 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (43 matched lines × 2 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:245 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:245 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:110 — the two spans are one implementation copied and then locally edited — 359 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (32 matched lines × 2 locations) marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:74 — marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:74 · marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:181 — the two spans are one implementation copied and then locally edited — 290 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×1
  • Duplicated block (31 lines × 2 locations) marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:188 — marketing/videos/2026-08-01-voice-typing-android/src/components.tsx:188 · marketing/videos/2026-08-02-open-source-speech-to-text/src/components.tsx:185 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/theme.ts:5 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/theme.ts:5 · marketing/videos/2026-08-01-voice-typing-android/src/theme.ts:4 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:254 — marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:254 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:213 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (18 lines × 3 locations) · ×1
  • Duplicated block (18 lines × 3 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/Root.tsx:21 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/Root.tsx:21 · marketing/videos/2026-08-01-voice-typing-android/src/Root.tsx:21 · marketing/videos/2026-08-02-open-source-speech-to-text/src/Root.tsx:21 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×1
  • Duplicated block (16 lines × 2 locations) marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:232 — marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:232 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:196 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (11 lines × 3 locations) · ×1
  • Duplicated block (11 lines × 3 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:300 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:300 · marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:263 · marketing/videos/2026-08-02-open-source-speech-to-text/src/scenes.tsx:222 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) supabase/functions/appsumo-webhook/index.ts:122 — supabase/functions/appsumo-webhook/index.ts:122 · supabase/functions/appsumo-webhook/index.ts:172 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×1
  • Duplicated block (6 lines × 2 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:22 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/scenes.tsx:22 · marketing/videos/2026-08-01-voice-typing-android/src/scenes.tsx:23 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (5 lines × 3 locations) · ×1
  • Duplicated block (5 lines × 3 locations) marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/Root.tsx:15 — marketing/videos/2026-07-30-how-to-use-dictation-on-mac/src/Root.tsx:15 · marketing/videos/2026-08-01-voice-typing-android/src/Root.tsx:15 · marketing/videos/2026-08-02-open-source-speech-to-text/src/Root.tsx:15 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 38, cognitive 51) · ×1
  • Complex function (anonymous) (cyclomatic 38, cognitive 51) supabase/functions/appsumo-webhook/index.ts:49 — (anonymous) has cyclomatic complexity 38 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function declareNoSocialMedia (cyclomatic 20, cognitive 28) · ×1
  • Complex function declareNoSocialMedia (cyclomatic 20, cognitive 28) scripts/submit_ios_for_review.mjs:99 — declareNoSocialMedia has cyclomatic complexity 20 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R6 · Tooling · No lint script · ×1
  • No lint script — test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~302 LoC) · ×1
  • Dead file (~302 LoC) supabase/functions/appsumo-webhook/index.ts — no import path from any entry point (4 application, 3 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~3 LoC) · ×1
  • Dead file (~3 LoC) supabase/functions/_shared/appsumo-tiers.ts — no import path from any entry point (4 application, 3 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (supabase/functions/appsumo-webhook/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked AIDictation.Windows/AIDictation/AIDictation.csproj:21 — AIDictation.Windows/AIDictation/AIDictation.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Minor — 66 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×24
  • Duplicated predicate REDACTED:890 — `!result.IsSuccess || string.IsNullOrWhiteSpace(result.Text)` appears character-identically in 2 files — REDACTED, AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs. 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 AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:141 — `imported.Applied && imported.Entry != null` appears character-identically in 2 files — AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs, AIDictation.Windows/RecoveryContract/Program.cs. 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 AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:173 — `!isInstalled && appPreferences.onDeviceTranscriptionEnabled.first()` appears character-identically in 2 files — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt, AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingViewModel.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:329 — `finalized.durationMs < 300 || !finalized.speechDetected` appears character-identically in 3 files — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt, AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingViewModel.kt, AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/recording/RecordingViewModel.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt:176 — `isInstalled && appPreferences.onDeviceTranscriptionEnabled.first()` appears character-identically in 2 files — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/MainViewModel.kt, AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/onboarding/OnboardingViewModel.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailScreen.kt:123 — `recording.audioFilePath != null && File(recording.audioFilePath).exists()` appears character-identically in 2 files — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailScreen.kt, AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/ui/screens/main/RecordingDetailSheet.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt:51 — `token == blankIndex || emittedTokens == MAX_TOKENS_PER_STEP` appears character-identically in 2 files — AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetLiteRtModel.kt, AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/ParakeetTranscriber.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:177 — `l.Language != Language.Auto && l.IsSelected` appears character-identically in 2 files — AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs, AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs. 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 Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift:185 — `!$0.isNotesModeRule && !$0.isMeetingsModeRule` appears character-identically in 2 files — Whishpermate/WhisperMateShared/Managers/ContextRulesManager.swift, Whishpermate/Whispermate/Services/MacTranscriptionAttemptSnapshot.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 Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift:137 — `$0.user_id == nil || $0.user_id == AuthManager.shared.currentUser?.userId.uuidString.lowercased()` appears character-identically in 2 files — Whishpermate/WhisperMateShared/Services/MobileInstallationAnalytics.swift, Whishpermate/Whispermate/WhispermateApp.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 Whishpermate/WhisperMateIOS/ContentView.swift:3460 — `activeAttempt?.attemptID == attemptID || activeAttempt == nil` appears character-identically in 2 files — Whishpermate/WhisperMateIOS/ContentView.swift, Whishpermate/WhisperMateIOS/RecordingSheetView.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 Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift:2537 — `character.isLetter || character.isNumber` appears character-identically in 2 files — Whishpermate/WhisperMateShared/Services/MobileAudioProcessingStore.swift, Whishpermate/WhisperMateShared/Services/SubscriptionManager.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 Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift:15 — `endpoint.scheme?.lowercased() == "https" && (host == "writingmate.ai" || host == "www.writingmate.ai") && endpoint.path == "/api/openai/v1/r…` appears character-identically in 2 files — Whishpermate/WhisperMateShared/Services/WritingmateRealtimeSessionSupport.swift, Whishpermate/Whispermate/Services/AppState.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 Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:512 — `host == "writingmate.ai" || host.hasSuffix(".writingmate.ai")` appears character-identically in 2 files — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift, Whishpermate/Whispermate/Services/OpenAIClient.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 Whishpermate/WhisperMateShared/Services/SecretsLoader.swift:90 — `host.contains("writingmate") || host.contains("aidictation")` appears character-identically in 2 files — Whishpermate/WhisperMateShared/Services/SecretsLoader.swift, Whishpermate/Whispermate/Services/SecretsLoader.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 Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:109 — `lowered.contains("auth") || lowered.contains("supabase") || lowered.contains("sign")` appears character-identically in 2 files — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift, Whishpermate/Whispermate/Services/SentryTelemetry.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 Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift:112 — `lowered.contains("transcri") || lowered.contains("openai") || lowered.contains("realtime")` appears character-identically in 2 files — Whishpermate/WhisperMateIOS/Services/SentryTelemetry.swift, Whishpermate/Whispermate/Services/SentryTelemetry.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 Whishpermate/Whispermate/Services/AudioDeviceManager.swift:608 — `name.contains("built-in") || name.contains("macbook") || name.contains("internal microphone")` appears character-identically in 2 files — Whishpermate/Whispermate/Services/AudioDeviceManager.swift, Whishpermate/Whispermate/Services/SentryTelemetry.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 Whishpermate/WhisperMateIOS/ContentView.swift:3449 — `pendingAttemptID == attemptID || activeAttempt?.attemptID == attemptID` appears character-identically in 2 files — Whishpermate/WhisperMateIOS/ContentView.swift, Whishpermate/WhisperMateIOS/RecordingSheetView.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 Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:172 — `postProcessingEnabled && !(chunk.usesChunkFields && endpointHasServerCleanup)` appears character-identically in 2 files — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift, Whishpermate/Whispermate/Services/OpenAIClient.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 Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift:317 — `proxyRequestId != nil || proxyTotalMs != nil` appears character-identically in 2 files — Whishpermate/WhisperMateShared/Networking/OpenAIClient.swift, Whishpermate/Whispermate/Services/OpenAIClient.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 Whishpermate/Whispermate/Services/AppState.swift:1784 — `record.stage == .rawResultReady || record.stage == .cleaning` appears character-identically in 2 files — Whishpermate/Whispermate/Services/AppState.swift, Whishpermate/Whispermate/Services/MacAudioProcessingStore.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 Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift:353 — `recording.status == .processing || recording.status == .retrying` appears character-identically in 2 files — Whishpermate/Whispermate/Views/HistoryMasterDetailView.swift, Whishpermate/Whispermate/Views/HistoryView.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 Whishpermate/Whispermate/Services/FnKeyMonitor.swift:225 — `type == .tapDisabledByTimeout || type == .tapDisabledByUserInput` appears character-identically in 2 files — Whishpermate/Whispermate/Services/FnKeyMonitor.swift, Whishpermate/Whispermate/Services/HotkeyManager.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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×22
  • Silent fallback default in catch REDACTED:316 — `UsesLightWindowsTheme` swallows every exception into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Helpers/CredentialHelper.cs:179 — `LoadFallbackFile` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Helpers/ForegroundWindowHelper.cs:29 — `GetForegroundWindowHandle` swallows every exception into `return IntPtr.Zero;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Helpers/ForegroundWindowHelper.cs:60 — `GetForegroundApp` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1221 — `RunRecognitionAsync` swallows every exception and sets `historyUpdated = false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1343 — `PersistAbandonedAttemptAsync` swallows every exception and sets `proofFaulted = true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioProcessingCoordinator.cs:1598 — `TryClaimUsageWithDeadlineAsync` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:1127 — `TryRecoverFinalizedSource` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:1242 — `TryDeleteTrackedLegacySource` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioProcessingStore.cs:1319 — `ManagedSourceIsRegular` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:87 — `GetDefaultDeviceAsync` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:867 — `GetSelectedOrDefaultDevice` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:883 — `GetDefaultCaptureDevice` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:893 — `IsDefaultDevice` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AuthService.cs:392 — `GetJwtExpiry` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/AuthService.cs:494 — `FetchProfileAsync` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/ClipboardService.cs:312 — `IsCurrentProcessElevated` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/ClipboardService.cs:479 — `GetCharacterBeforeCaret` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/HotkeyService.cs:261 — `IsHotkeyAvailable` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/ManagedAudioFileSystem.cs:110 — `EntryExistsNoFollow` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Services/SettingsService.cs:248 — `GetLaunchAtStartup` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch AIDictation.Windows/AIDictation/Views/OverlayWindow.xaml.cs:482 — `GetActiveMonitorWorkArea` swallows every exception into `return SystemParameters.WorkArea;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
D24 · Comment Value · redundant comment · ×5
  • redundant comment REDACTED:107 — "Register URL scheme" repeats the code it sits on: 3 of its 3 words (register, url, scheme) are already in `RegisterUrlScheme();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:117 — "Setup system tray" repeats the code it sits on: 3 of its 3 words (setup, system, tray) are already in `SetupSystemTray();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment AIDictation.Windows/AIDictation/Services/HotkeyService.cs:419 — "Check dictation hotkey (mouse)" repeats the code it sits on: 4 of its 4 words (check, dictation, hotkey, mouse) are already in `if (_dictationHotkey?.MouseButton == mouseButton)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment AIDictation.Windows/AIDictation/Services/HotkeyService.cs:436 — "Check command hotkey (mouse)" repeats the code it sits on: 4 of its 4 words (check, command, hotkey, mouse) are already in `if (_commandHotkey?.MouseButton == mouseButton)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment AIDictation.Windows/AIDictation/Views/MainWindow.xaml.cs:214 — "Start waveform timer" repeats the code it sits on: 3 of its 3 words (start, waveform, timer) are already in `_waveformTimer.Start();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
AX6 · Interface segregation · Fat interface · ×2
  • Fat interface: IAudioProcessingStore (20 members) AIDictation.Windows/AIDictation/Services/AudioProcessingContracts.cs:63 — `IAudioProcessingStore` declares 20 members: `PersistenceHealthy`, `BeginCaptureAsync`, `CaptureBecameReadyAsync`, `BeginFinalizationAsync`, `AdoptFinalizedCaptureAsync`, `RecordCaptureKnownIncompleteAsync`, `BeginRecognitionAsync`, `SaveCheckpointAsync`, `SaveRawResultAsync`, `CompleteAsync`, `ClaimUsageAsync`, `FailAsync`, `CancelAsync`, `AbandonAttemptAsync`, `TombstoneAsync`, `ClearAsync`, `RecoverOnLaunchAsync`, `ImportLegacyFinalizedSourceAsync`, `AcceptLegacySourceOwnershipAsync`, `GetAsync`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: RecordingDao (28 abstract methods) AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/local/dao/RecordingDao.kt:18 — `RecordingDao` declares 28 abstract methods: `getAllRecordings`, `getRecordingById`, `getActiveRecordings`, `getFinalizationRecoveryCandidates`, `getInactiveRecordings`, `getDeletedRecordingsWithSources`, `insertRecording`, `claimRetry`, `advanceCapture`, `promoteRecoveredFinalizedSource`, `checkpoint`, `markRecognitionComplete`, `finishAttemptRow`, `finishRecognitionPreservingProgressRow`, `normalizeAbandonedAttemptRows`, `tombstone`, `tombstoneExact`, `tombstoneAllInactive`, `clearDeletedSourcePath`, `insertUsageClaim`, `insertInstallationAnalyticsEvent`, `getUsageClaimById`, `getNextPendingUsageClaimId`, `observePendingUsageClaimCount`, `markUsageClaimed`, `getUsageClaimCount`, `activeCount`, `getRecordingCount`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
DM9 · Scattered domain decisions · Rule about [AttemptId, ClearGeneration, DeletionGeneration, RecordingId] decided in 2 places · ×2
  • Rule about [AttemptId, ClearGeneration, DeletionGeneration, RecordingId] decided in 2 places — AIDictation.Services.AudioAttemptLease's [AttemptId, ClearGeneration, DeletionGeneration, RecordingId] are judged in AIDictation.Services.AudioProcessingCoordinator, AIDictation.Services.AudioRecorderService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • Rule about [AttemptId, ClearGeneration, DeletionGeneration, RecordingId] decided in 2 places — AIDictation.Services.AudioAttemptLease's [AttemptId, ClearGeneration, DeletionGeneration, RecordingId] are judged in AIDictation.Services.AudioProcessingCoordinator, Contract.FakeCoordinatorStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found AIDictation.Windows/AIDictation/AIDictation.csproj:4 — 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 `AIDictation.Windows/AIDictation/AIDictation.csproj` makes this repository a deployable product (line 4).
D21 · Naming Consistency · `StartTrackedClose` returns an awaitable but lacks the `Async` suffix its 110 peers carry · ×1
  • `StartTrackedClose` returns an awaitable but lacks the `Async` suffix its 110 peers carry AIDictation.Windows/AIDictation/Services/AudioRecorderService.cs:566 — 110 of the 111 awaitable methods of project AIDictation are named with an affix the repository binds to awaitables (110 of 111; unit: awaitable methods of project AIDictation). Peers: App.WriteReleaseAuthReportAsync (REDACTED:161); App.RunOverlayValidationAsync (REDACTED:343); App.InitializeServicesAsync (REDACTED:605); App.StartRecordingCoreAsync (REDACTED:793); App.StopRecordingAsync (REDACTED:875). Rename to `StartTrackedCloseAsync`. [rule N4b]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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 1/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 REDACTED:8 — 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 15 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation AIDictation.Windows/AIDictation/AIDictation.csproj:21 — `AIDictation.Windows/AIDictation/AIDictation.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
X5 · Nullable reference types · Null-forgiving operator (`!`) suppressions override nullable warnings · ×1
  • Null-forgiving operator (`!`) suppressions override nullable warnings — ~1.7 `!` suppressions per 1k syntax nodes — 150 suppression(s) across the 89045 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Minor — 1 finding(s)
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names AIDictation.Windows/AIDictation/Services/AppState.cs:272 — 0 of 5 documented parameters and 3 of 138 summaries in `AIDictation` only repeat the member or parameter name (e.g. "Updates the recording duration" for `UpdateRecordingDuration`). Delete the restating tags, or add what the name does not say.

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-0afbf71d93f548c888b37c80ec94eaa2/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-0afbf71d93f548c888b37c80ec94eaa2/history-1.json --exit-code 0 --source .1artifacts/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=129" --report-format json --report-path /tmp/watchdog-gitleaks-0afbf71d93f548c888b37c80ec94eaa2/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.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-0afbf71d93f548c888b37c80ec94eaa2/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 .71artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesdotnet—dotnet list AIDictation.Windows/AIDictation.sln package --vulnerable --include-transitive --format json19artifacts/raw/dotnet-vulnerable.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 17 file(s) — `AIDictation.Windows/AIDictation/Services/SentryTelemetry.cs`, `AIDictationAndroid/app/src/main/java/com/whispermate/aidictation/data/remote/AudioRequestPolicy.kt`, `Whishpermate/WhisperMateIOS/ContentView.swift`, `Whishpermate/WhisperMateShared/AudioVisualizationView.swift`, `Whishpermate/WhisperMateShared/Networking/TranscriptionCleanupGuard.swift`, … (+12 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 Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e6c4-2fdf-729e-aaf7-fd304aaac65a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Appendix C — Personal-data map

Every field, property and record parameter whose name is conventional personal data — 3 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.

Email — 3 field(s)
  • User.Email AIDictation.Windows/AIDictation/Models/User.cs:18
  • OnboardingViewModel._accountEmail AIDictation.Windows/AIDictation/ViewModels/OnboardingViewModel.cs:87
  • SettingsViewModel._accountEmail AIDictation.Windows/AIDictation/ViewModels/SettingsViewModel.cs:53

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