Public report of LayerTwo-Labs/drivechain-frontends, published 17 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 17 November 2026, 16:36 UTC · Survey ID cd_a9bb11ce97f7490a82a32930417ad845

LayerTwo-Labs/drivechain-frontends

Measured 17 November 2026, 16:32 UTC, at code version f703a6f

First survey, so nothing to compare with yet Test reliability: not measured

Test reliability is not measured: No runner for the .dart half of a polyglot repository.

CAI score 57.0out of 100 At risk

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: 264,394 lines of product code in 40 projects, tests not counted · Estimated rebuild effort: about 3.0 person-years · Weakest lens: Production Readiness, 47.9

Findings by how serious they are

172 critical 2117 serious 162 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 16:32 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.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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 ▸

80of 80 dimensions measured by tools.
2398of 2451 findings point to an exact file and line, so you can open each one in the code. The other 53 concern the repository as a whole, such as missing documentation.
80dimensions across 7 lenses, read from 264,394 lines of product code in 40 projects.
Chapters

Executive summary

LayerTwo-Labs/drivechain-frontends is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 57.0 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.

Production Readiness, at 47.9, is the weakest lens and counts most in the score. The best first step is tidying the declared packages, worth about 5.3 points. Protecting outgoing calls with timeouts comes next, worth about 3.6 points. Raising Production Readiness to 62 would lift the score to about 63.0.

Eighty-two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Thirty-six known security holes in the packages the code depends on can be used by attackers, and twenty-three pipeline steps run downloads nobody checks. Pinning each tool to an exact version, updating the vulnerable packages and checking each download against a checksum would close these risks. Limiting each secret to its own step would fix the eight secrets exposed to more of the pipeline than needed, and the four unsafe settings in infrastructure or container files need changing to safe values. The four sets of files in separate parts that keep changing together need that dependency made explicit.

The product code is 264,394 lines, about €430,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 47.9 · counts for 46%Performance 60.0 · counts for 25%Accessibility 63.4 · counts for 14%Security and Compliance 69.4 · counts for 8%Code Health 73.8 · counts for 4%Maturity 74.2 · counts for 2%Architecture 94.1 · counts for 1%

If Production Readiness rose from 47.9 to 62, the lowest score rated Strong, the score would rise from 57.0 to about 63.0.

Code composition: what the lines of code are
Product code 63%Tests 37%
Rebuild cost: about €430,000 · Estimate
Cost to rebuild€140,000 to €720,000, for 2,390 to 7,583 hours of work, about 3.0 person-years for 1 to 6 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 57. 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: 264,394 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Raises the score by about 5.3 points · Medium effort · Dependency Hygiene
2
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Raises the score by about 3.6 points · Medium effort · Outbound HTTP resilience
3
Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.
Raises the score by about 2.6 points · Medium effort · Async & latency hygiene

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 €430,000 to build again, about 3.0 person-years of work. Its weakest lens is Production Readiness, at 47.9 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies. Of all the actions in this report, it raises the score most for the work it takes: about 5.3 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 327,252 lines over the last 90 days, which is about 1,327,189 lines a year. At that pace, the extra work comes to an estimated 125.7 to 754 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch app_links (pub) app_links (pub) bbc bbc logger logger bbc->logger sail_ui sail_ui bbc->sail_ui sidechain_core sidechain_core bbc->sidechain_core bitassets bitassets bitassets->logger bitassets->sail_ui bitassets->sidechain_core thirds thirds bitassets->thirds bitnames bitnames bitnames->logger bitnames->sail_ui bitnames->sidechain_core bitnames->thirds bitwindow bitwindow bitwindow->bitassets bitwindow->bitnames coinshift coinshift bitwindow->coinshift flutter_markdown flutter_markdown bitwindow->flutter_markdown bitwindow->logger photon photon bitwindow->photon bitwindow->sail_ui bitwindow->sidechain_core bitwindow->thirds thunder thunder bitwindow->thunder truthcoin truthcoin bitwindow->truthcoin zside zside bitwindow->zside coinshift->logger coinshift->sail_ui coinshift->sidechain_core github.com/LayerTwo-Labs/sidesail/bitwindow/server server github.com/LayerTwo-Labs/sidesail/coinnews/codec codec github.com/LayerTwo-Labs/sidesail/bitwindow/server->github.com/LayerTwo-Labs/sidesail/coinnews/codec github.com/LayerTwo-Labs/sidesail/coinnews/server server github.com/LayerTwo-Labs/sidesail/bitwindow/server->github.com/LayerTwo-Labs/sidesail/coinnews/server github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator sidechain-orchestrator github.com/LayerTwo-Labs/sidesail/bitwindow/server->github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator github.com/LayerTwo-Labs/sidesail/sqlitemigrate sqlitemigrate github.com/LayerTwo-Labs/sidesail/bitwindow/server->github.com/LayerTwo-Labs/sidesail/sqlitemigrate github.com/LayerTwo-Labs/sidesail/coinnews/server->github.com/LayerTwo-Labs/sidesail/coinnews/codec github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator->github.com/LayerTwo-Labs/sidesail/sqlitemigrate photon->logger photon->sail_ui photon->sidechain_core sail_ui->flutter_markdown sail_ui->logger sail_ui->sidechain_core sidechain_core->logger sidechain_core->thirds thunder->logger thunder->sail_ui thunder->sidechain_core truthcoin->app_links (pub) truthcoin->logger truthcoin->sail_ui truthcoin->sidechain_core zside->logger zside->sail_ui zside->sidechain_core __more__ +12 more projects

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.

155 modules, with 231 dependencies between them. 4 loops run through 16 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 115 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 github.com/LayerTwo-Labs/sidesail/bitwindow/server/config2 github.com/LayerTwo-Labs/sidesail/bitwindow/server/service3 github.com/LayerTwo-Labs/sidesail/coinnews/codec4 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/config/netcatalog5 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain6 repository.models7 repository.src8 github.com/LayerTwo-Labs/sidesail/bitwindow/server/miningpools9 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/config10 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/bitassets11 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/bitnames12 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/photon13 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/thunder14 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/wallet15 repository.config16 repository.settings17 repository.utils18 repository.viewmodels19 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/engines20 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/coinshift21 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/truthcoin22 repository.classes23 repository.theme24 github.com/LayerTwo-Labs/sidesail/bitwindow/server/dial25 github.com/LayerTwo-Labs/sidesail/bitwindow/server/engines26 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/api27 repository.rpcs28 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/bitwindowd29 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/misc30 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/wallet31 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator32 repository.services33 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api34 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/commands35 repository.shell36 repository.sidechains37 repository.pages38 repository.widgets39 repository.providers40 repository
1 github.com/LayerTwo-Labs/sidesail/bitwindow/server/config
2 github.com/LayerTwo-Labs/sidesail/bitwindow/server/service
3 github.com/LayerTwo-Labs/sidesail/coinnews/codec
4 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/config/netcatalog
5 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain
6 repository.models
7 repository.src
8 github.com/LayerTwo-Labs/sidesail/bitwindow/server/miningpools1
9 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/config1
10 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/bitassets2
11 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/bitnames2
12 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/photon2
13 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/thunder5
14 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/wallet3
15 repository.config1
16 repository.settings211
17 repository.utils1
18 repository.viewmodels222
19 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/engines216
20 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/coinshift21
21 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/truthcoin21
22 repository.classes12
23 repository.theme4
24 github.com/LayerTwo-Labs/sidesail/bitwindow/server/dial111111
25 github.com/LayerTwo-Labs/sidesail/bitwindow/server/engines361222222
26 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/api18741231
27 repository.rpcs210124
28 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/bitwindowd3234
29 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/misc226
30 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/wallet29
31 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator92111122
32 repository.services2211
33 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api341222222151
34 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/commands3121
35 repository.shell322224114
36 repository.sidechains2146
37 repository.pages2613957832479172281695
38 repository.widgets388678785256891115
39 repository.providers2146721346932
40 repository98418162
Uses a module listed above itPart of a loopThe module itself
1 github.com/LayerTwo-Labs/sidesail/bitwindow/server/config2 github.com/LayerTwo-Labs/sidesail/bitwindow/server/service3 github.com/LayerTwo-Labs/sidesail/coinnews/codec4 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/config/netcatalog5 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain6 repository.models7 repository.src8 github.com/LayerTwo-Labs/sidesail/bitwindow/server/miningpools9 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/config10 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/bitassets11 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/bitnames12 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/photon13 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/thunder14 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/wallet15 repository.config16 repository.settings17 repository.utils18 repository.viewmodels19 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/engines20 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/coinshift21 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/truthcoin22 repository.classes23 repository.theme24 github.com/LayerTwo-Labs/sidesail/bitwindow/server/dial25 github.com/LayerTwo-Labs/sidesail/bitwindow/server/engines26 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/api27 repository.rpcs28 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/bitwindowd29 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/misc30 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/wallet31 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator32 repository.services33 github.com/LayerTwo-Labs/sidesail/bitwindow/server/api34 github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/commands35 repository.shell36 repository.sidechains37 repository.pages38 repository.widgets39 repository.providers40 repositorygithub.com/LayerTwo-Labs/sidesail/bitwindow/server/config1github.com/LayerTwo-Labs/sidesail/bitwindow/server/service2github.com/LayerTwo-Labs/sidesail/coinnews/codec3github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/config/netcatalog4github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain5repository.models6repository.src7github.com/LayerTwo-Labs/sidesail/bitwindow/server/miningpools8github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/config9github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/bitassets10github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/bitnames11github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/photon12github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/thunder13github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/wallet14repository.config15repository.settings16repository.utils17repository.viewmodels18github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/engines19github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/coinshift20github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/sidechain/truthcoin21repository.classes22repository.theme23github.com/LayerTwo-Labs/sidesail/bitwindow/server/dial24github.com/LayerTwo-Labs/sidesail/bitwindow/server/engines25github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/api26repository.rpcs27github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/bitwindowd28github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/misc29github.com/LayerTwo-Labs/sidesail/bitwindow/server/api/wallet30github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator31repository.services32github.com/LayerTwo-Labs/sidesail/bitwindow/server/api33github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/commands34repository.shell35repository.sidechains36repository.pages37repository.widgets38repository.providers39repository40112225312111222216212112411111136122222218741231210124323422629921111222211341222222151312132222411421462613957832479172281695388678785256891115214672134693298418162+115 more modules (most-connected shown)

At a glance — Code Health · 73.8 · Strong ·

At a glance — Architecture · 94.1 · Exemplary ·

At a glance — Maturity · 74.2 · Strong ·

At a glance — Readiness · 47.9 · Adequate · gated by R8, P7 ·

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

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

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 — Injection140High / Critical
A03:2025 — Software Supply Chain Failures77High / Critical
A02:2025 — Security Misconfiguration13High / Critical
A07:2025 — Authentication Failures3High / Critical

Roadmap

Top priorities: Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies; Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail; Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.

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

Do thisHelpsEffortDimension
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+5.3 ptsMediumDependency Hygiene
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.+3.6 ptsMediumOutbound HTTP resilience
Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.+2.6 ptsMediumAsync & latency hygiene
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+1.8 ptsMediumRelease Hygiene
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+1.3 ptsMediumVisual & motion safety
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.+0.5 ptsLowADR Quality
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+0.9 ptsMediumForms & labels
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+0.8 ptsMediumPage structure

File quality

Per-file score 0–10 — a quality signature. Of 510 files carrying findings, judged against the Preview bar: 2% slop · 14% mixed · 84% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.0SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED3.1MixedDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED3.4MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedSecrets (history): REDACTED: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
sail_ui/lib/widgets/nav/bottom_nav.dart4.4MixedCyclomatic Complexity: BottomNav.displayConnectionStatusDialog (cyclomatic 28)
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 — 172

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

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

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

Could not be resolved — 11

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 80 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 — 80 dimensions across the health lenses
D1D2D3D4D5D6D12D13D15D17D19D20D21D22D24D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC5AC6AX1AX10AX2AX3AX4AX6AX9GD1IC1M1M2M3M4P1P10P2P3P4P5P6P7P8PF3R1R10R2R3R6R7R8R9S1X1X12X13X14X16X17X18X2X21X23X25X27X28X29X3X4X5

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, 2398 of 2451 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 · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1ea5a-4936-7600-aa3c-9c577720aa37.

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: this repository's production source spans .go, .dart, and our analyzer cannot run the .dart test suite(s) — so no coverage was collected for the repository as a whole. The Go half did build and run, and its own line coverage came back at 43.3% — 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 — coverage is excluded from the score rather than counted as a near-zero.
  • 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 .dart, and the built-in reliability runner cannot re-run the .dart test suite(s) — so reliability was not measured for the repository as a whole. The Go (10 modules): measured (5 flaky) suite(s) did re-run, and came back with 5 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.
  • D14 License Compliance — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
  • 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 (17 contributor(s) across 5670 commit(s) sampled, automation and bot accounts excluded). One of them holds 87% of the history; the other 16 hold 0.8% 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.
  • 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 — 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. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • 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 — 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D31 IaC & Container Security — 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. Coinnews/server/Dockerfile.dockerignore carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 4 of 5 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit -1 — compose exited without a cause this engine recognises) — Tool stalled (no output) after 00:02:15.0326664.; runtime evidence skipped.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • 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 — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X10 Duplicated predicate — 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. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • X12 Unreachable branch — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X13 Undrained process stream — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X16 Unfloored truncation loop — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X17 Uncapped recursion over a caller-supplied document — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X18 Disposal-pattern correctness — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X21 Side-effecting pattern guard — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X23 Unguarded diagnostic materialisation — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • 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 — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • 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.
  • X29 Per-element action decided by a fixed element — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 221 further occurrence(s) are not listed individually; the score already reflects all 261.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 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").
  • 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.
  • D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages 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.
  • 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.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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 REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • 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.
  • 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".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.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

224 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was main.run at 87. A further 3 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 _HashCalculatorState._hexToBin at 18 — they are counted neither in the figure above nor in this dimension's score. 2 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: sidechain-orchestrator/api/orchestrator_handler.go (api.binaryTypeFromName at 16), bitassets/lib/providers/asset_analytics_provider.dart (AssetAnalyticsProvider.getFilteredAuctions at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

main.run (cyclomatic 87)sidechain-orchestrator/cmd/drivechaind/main.go:154
commands.runWalletBurnECX (cyclomatic 60)sidechain-orchestrator/commands/wallet_burn_ecx.go:137
Orchestrator.SetNodeMode (cyclomatic 48)sidechain-orchestrator/node_mode.go:98
ElectrumBackend.buildSendPSBT (cyclomatic 47)sidechain-orchestrator/wallet/electrum_backend.go:1061
commands.runWalletSignPSBT (cyclomatic 44)sidechain-orchestrator/commands/wallet_sign_psbt.go:32

+ 219 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 main.run (cyclomatic 87). — 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.1 / 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.1 / 10 · rule-coverage 100% · ceiling Prevented

408 method(s) exceeded the cognitive complexity threshold of 15; the worst was main.run at 110.

main.run (cognitive 110)sidechain-orchestrator/cmd/drivechaind/main.go:154
_DeniabilityTableState.sortEntries (cognitive 78)bitwindow/lib/pages/wallet/denability_page.dart:375
commands.runWalletBurnECX (cognitive 78)sidechain-orchestrator/commands/wallet_burn_ecx.go:137
Orchestrator.SetNodeMode (cognitive 77)sidechain-orchestrator/node_mode.go:98
multisig.importGroupsJSON (cognitive 72)bitwindow/server/models/multisig/multisig.go:654

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

What to do

  1. Bring the 10 bodies over 60 down to 60 or less in Cognitive Complexity — start with main.run (cognitive 110), _DeniabilityTableState.sortEntries (cognitive 78), commands.runWalletBurnECX (cognitive 78). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 10 together lifts Cognitive Complexity from 5.1 to about 6.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

238 god class(es) detected.

FileTooLong: core/sail_svg.dart · ×78sail_ui/lib/widgets/core/sail_svg.dart
MethodTooLong: _RootPageState.build · ×63bitwindow/lib/pages/root_page.dart:444
TooManyMethods: Orchestrator · ×52REDACTED:138
ClassTooLong: Orchestrator · ×36REDACTED:138
FunctionTooLong: main.run · ×7sidechain-orchestrator/cmd/drivechaind/main.go:154

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

What to do

  1. Resolve the 78 FileTooLong finding(s) in God Classes — start with wallet.go (2), reserve_register_page.dart (2), homepage_widget_catalog.dart (2). — One of this dimension's main actionable groups (78 warning-level).
  2. Resolve the 63 MethodTooLong finding(s) in God Classes — start with wallet_multisig_lounge.dart (3), REDACTED (3), root_page.dart (2). — One of this dimension's main actionable groups (63 warning-level).
  3. Resolve the 52 TooManyMethods finding(s) in God Classes — start with handler.go (5), truthcoin_rpc.dart (2), bitassets_rpc.dart (2). — One of this dimension's main actionable groups (52 warning-level).

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

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

533 duplicated block group(s) detected. 10.6 % of the production lines (27,948 of 264,394) are in a reported copy. A further 417 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (7 lines × 2) · ×44bitassets/lib/pages/tabs/messaging_page.dart:19
Duplicated block (10 lines × 2) · ×31bitassets/lib/pages/tabs/reserve_register_page.dart:648
Duplicated block (9 lines × 2) · ×27bitassets/lib/pages/tabs/reserve_register_page.dart:624
Duplicated block (5 lines × 2) · ×26sidechain_core/lib/rpcs/bitassets_rpc.dart:404
Duplicated block (12 lines × 2) · ×25bitassets/lib/pages/tabs/reserve_register_page.dart:634

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

What to do

  1. Resolve the 44 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with enforcer.go (12), handler.go (6), configurator_panel.dart (2). — One of this dimension's main actionable groups (44 warning-level).
  2. Resolve the 31 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with reserve_register_page.dart (3), merkle_tree_dialog.dart, root_page.dart. — One of this dimension's main actionable groups (31 warning-level).
  3. Resolve the 27 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with reserve_register_page.dart, block_explorer_dialog.dart, load_transaction_dialog.dart. — One of this dimension's main actionable groups (27 warning-level).

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

D5 · Coupling9.3 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

32 production modules (npm+Go+SwiftPM+pub), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence, with abstractness counted on 23 of the 32 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: github.com/LayerTwo-Labs/sidesail/sqlitemigrate · ×3

What to do

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

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

D6 · Cohesion (LCOM4)8.9 / 10Strong✓ Tool-verified

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

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

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

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

54 of 588 classes have LCOM4 above 3.

Low cohesion: MockTruthcoinRPC (LCOM4 69) · ×54sidechain_core/lib/mocks/mocks.dart:510

What to do

  1. Resolve the 54 Low cohesion finding(s) in Cohesion (LCOM4) — start with mocks.dart (10), bottom_nav.dart (3), zside_melt_cast_page.dart. — One of this dimension's main actionable groups (54 warning-level).

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

D12 · Dependency Hygiene8.3 7.7 / 10Strong✓ Tool-verified

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

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

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

34 outdated, 0 author-deprecated direct Go module(s), 0 pinning or checksum defect(s). 81 of 81 direct requirement(s) were graded against proxy.golang.org (0 not served there, 6 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.

Outdated: connectrpc.com/connect · ×34

Detailed fixes: d12_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.

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

Top hotspots: sidechain-orchestrator/cmd/drivechaind/main.go (51×87=4437); REDACTED (93×36=3348); sidechain-orchestrator/wallet/electrum_backend.go (53×47=2491)

Hotspot: sidechain-orchestrator/cmd/drivechaind/main.go · ×77sidechain-orchestrator/cmd/drivechaind/main.go:154

What to do

  1. Resolve the 77 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), REDACTED, electrum_backend.go. — One of this dimension's main actionable groups (77 warning-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

TodoCommentbitwindow/server/models/m4/parser.go:90

What to do

  1. Resolve the 1 TodoComment finding(s) in Explicit Debt — start with parser.go. — One of this dimension's main actionable groups (1 warning-level).

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

D19 · Documentation Quality8.8 / 10Strong✓ Tool-verified

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

0 of 1 documentation facets pass in full; short on: F2 example. 22 document(s) read across 69 unit(s).

Documentation: no build, run or usage example · ×2dc-hub/README.md:1

What to do

  1. Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2). — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.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 foundzside/macos/Runner.xcodeproj/project.pbxproj:1

What to do

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

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

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

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

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

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

12 naming inconsistencies among 479 declarations measured against a convention their peers follow.

`prepareBMM` spells `BMM` where 20 names in the project spell it `Bmm` · ×2sidechain_core/lib/gen/bmm/v1/bmm.connect.client.dart:186
`getCoinbasePSBT` spells `PSBT` where 30 names in the project spell it `Psbt` · ×2sidechain_core/lib/gen/cusf/mainchain/v1/validator.connect.client.dart:103
`sequenceID` spells `ID` where 136 names in the project spell it `Id` · ×2sidechain_core/lib/rpcs/bitassets_rpc.dart:983
`_NodeRpcSyncWarning` spells `Rpc` where 15 names in the project spell it `RPC`sail_ui/lib/pages/enforcer_conf_editor_page.dart:197
`getByID` spells `ID` where 111 names in the project spell it `Id`sidechain_core/lib/providers/window_provider.dart:358

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

What to do

  1. Resolve the 2 `prepareBMM` spells `BMM` where 20 names in the project spell it `Bmm` finding(s) in Naming Consistency — start with bmm.connect.client.dart, bmm.connect.spec.dart. — One of this dimension's main actionable groups (2 recommendation-level).
  2. Resolve the 2 `getCoinbasePSBT` spells `PSBT` where 30 names in the project spell it… finding(s) in Naming Consistency — start with validator.connect.client.dart, validator.connect.spec.dart. — One of this dimension's main actionable groups (2 recommendation-level).
  3. Resolve the 2 `sequenceID` spells `ID` where 136 names in the project spell it `Id` finding(s) in Naming Consistency — start with bitassets_rpc.dart (2). — One of this dimension's main actionable groups (2 recommendation-level).

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

D22 · Internal API Consistency9.7 / 10Stronggated by 8 serious findings✓ Tool-verified

What it measures: Whether the internal API surface is consistent and coherent.

Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.

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

8 API inconsistencies among 2678 exposed members measured against a convention their peers follow.

`database.CheckOne` takes no context.Context; its 3 sibling operations take onebitwindow/server/database/db.go:166
`addressbook.DirectionFromProto` takes no context.Context; its 6 sibling operations take onebitwindow/server/models/addressbook/addressbook.go:91
`coinnews.CommentSigHash` returns an array (`[N]T`) where its 7 siblings return a slice (`[]T`)coinnews/codec/sign.go:32
`blockfile.ParseMagic` takes no context.Context; its 4 sibling operations take onesidechain-orchestrator/blockfile/convert.go:24
`cgminer.ReplyError` takes no context.Context; its 3 sibling operations take onesidechain-orchestrator/cgminer/cgminer.go:66

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

What to do

  1. Resolve the 1 `database.CheckOne` takes no context.Context; its 3 sibling operations… finding(s) in Internal API Consistency — start with db.go. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 `addressbook.DirectionFromProto` takes no context.Context; its 6 sibling… finding(s) in Internal API Consistency — start with addressbook.go. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 `coinnews.CommentSigHash` returns an array (`[N]T`) where its 7 siblings… finding(s) in Internal API Consistency — start with sign.go. — One of this dimension's main actionable groups (1 warning-level).

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

D24 · Comment Value10.0 9.7 / 10Exemplary○ Nothing flagged

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

0 of 41 judged comments only repeat the code they sit on (0.0 %). 2 comment(s) in another language or script were not judged.

✓ On the Gold path — maintain.

Detailed fixes: d24_recommendation.md.

D26 · Project Cohesion7.5 / 10Strong✓ 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 7.5 / 10 · rule-coverage 100% · ceiling Documented

5 of 40 build units (Go, SwiftPM, Xcode, npm, pub) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×5REDACTED:1

What to do

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

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

D28 · Secrets (history)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

140 finding(s): 0 critical, 117 high, 16 medium, 7 low. 82 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 1 file(s) — `sidechain-orchestrator/hwi-daemon/build.sh` (line 7) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

62 finding(s): 3 critical, 33 high, 24 medium, 2 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 33 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (33). — One of this dimension's main actionable groups (33 issue-level).
  2. Resolve the 2 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D31 · IaC & Container Security7.9 6.3 / 10Adequate✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 6.3 / 10 · rule-coverage 80% · ceiling Documented

13 finding(s): 0 critical, 4 high, 7 medium, 2 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 7 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 2 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d31_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

1 of 724 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is sail_ui/lib/widgets/inputs/text_form_field.dart. Counted over 724 of the 1081 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned files with no living knowledge
Orphaned filesail_ui/lib/widgets/inputs/text_form_field.dart:1

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.7 / 10Adequategated by 4 critical findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: fund_group_modal.dart↔psbt_coordinator_modal.dart 81%; combine_broadcast_modal.dart↔psbt_coordinator_modal.dart 75%; create_multisig_modal.dart↔psbt_coordinator_modal.dart 75%

Boundary-crossing change coupling: utxo.dart ↔ core_transaction.dart · ×4sail_ui/lib/widgets/components/utxo.dart:1
Change coupling: bitnames_rpc.dart ↔ thunder_rpc.dart · ×4sidechain_core/lib/rpcs/bitnames_rpc.dart:1
Change coupling clique: combine_broadcast_modal.dart, create_multisig_modal.dart, fund_group_modal.dart, import_psbt_modal.dart, import_txid_modal.dart, multisig_key_modal.dart, psbt_coordinator_modal.dartbitwindow/lib/widgets/combine_broadcast_modal.dart

What to do

  1. Resolve the 4 Boundary-crossing change coupling finding(s) in Change Coupling — start with utxo.dart, orchestrator_handler.go, reserve_register_page.dart. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 4 Change coupling finding(s) in Change Coupling — start with bitnames_rpc.dart, router.dart, check_detail_page.dart. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with combine_broadcast_modal.dart. — 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

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

What to do

  1. Resolve the 8 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (8 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 10 platform declaration(s) and 0 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.

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 · Forms & labels6.2 / 10Adequate✓ Tool-verified

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

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

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

  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — coinnews/components/topic-filter.tsx:36
  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. — dc-hub/app/sidechains/explorer-client.tsx:321

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure6.7 / 10Strong✓ Tool-verified

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

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

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

  • A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component. — coinnews/app/layout.tsx:34

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

  • This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade. (×4) — dc-hub/app/page.tsx:191, dc-hub/app/page.tsx:198, dc-hub/app/page.tsx:205, …
  • <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — dc-hub/components/ui/button.tsx:44
  • `.head .ico` sets color: #fff on background-color: #3773f5 — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — difficulty/index.html:102

What to do

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

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

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

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

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

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

AX2 · Stateful singletons10.0 / 10Exemplary✓ 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.

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

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

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

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

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

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

AX6 · Interface segregation9.7 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `Backend` declares 23 methods: `Ensure`, `EnsureAll`, `Forget`, `Balance`, `ListUnspent`, `ListTransactions`, `ListTransactionsRange`, `ListReceivedByAddress`, `GetWalletTransaction`, `AddressHDPath`, `OwnedAddresses`, `NextReceiveAddress`, `NextChangeAddress`, `WatchKeys`, `Send`, `PreviewSend`, `SignTransaction`, `BumpFee`, `PreviewBumpFee`, `CreateCpfp`, `PreviewCancel`, `CancelTransaction`, `Chain`. Counted over the exported method specs the interface itself declares, once per name; an embedded interface is a role it composes, judged on its own declaration, and is not counted here. 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. — sidechain-orchestrator/wallet/backend.go:20
  • `BitAssetsRPC` declares 48 abstract methods: `getBalance`, `getBitAssetData`, `listBitAssets`, `connectPeer`, `forgetPeer`, `listPeers`, `registerBitAsset`, `reserveBitAsset`, `getDepositAddress`, `getSideAddress`, `listTransactions`, `sideEstimateFee`, `sideSend`, `getNewAddress`, `getBlockCount`, `getWalletAddresses`, `getWalletUTXOs`, `listUTXOs`, `myUnconfirmedUtxos`, `removeFromMempool`, `openapiSchema`, `stop`, `transfer`, `transferBitAsset`, `getNewVerifyingKey`, `signArbitraryMsg`, `signArbitraryMsgAsAddr`, `ammBurn`, `ammMint`, `ammSwap`, `getAmmPoolState`, `getAmmPrice`, `dutchAuctionBid`, `dutchAuctionCollect`, `dutchAuctionCreate`, `dutchAuctions`, `decryptMsg`, `encryptMsg`, `generateMnemonic`, `getBlock`, and 8 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it 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. — sidechain_core/lib/rpcs/bitassets_rpc.dart:12
  • `BitnamesRPC` declares 34 abstract methods: `getBalance`, `getBitNameData`, `listBitNames`, `connectPeer`, `listPeers`, `registerBitName`, `reserveBitName`, `getBlock`, `getBMMInclusions`, `getBestMainchainBlockHash`, `getBestSidechainBlockHash`, `generateMnemonic`, `setSeedFromMnemonic`, `getSidechainWealth`, `getNewEncryptionKey`, `getNewVerifyingKey`, `createDeposit`, `decryptMsg`, `encryptMsg`, `getNewAddress`, `getBlockCount`, `getPaymail`, `getPendingPaymail`, `getBitNameOwner`, `getWalletAddresses`, `getWalletUTXOs`, `listUTXOs`, `myUTXOs`, `openapiSchema`, `resolveCommit`, `readCommitment`, `signArbitraryMsg`, `signArbitraryMsgAsAddr`, `transfer`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it 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. — sidechain_core/lib/rpcs/bitnames_rpc.dart:22
  • `BitwindowAPI` declares 24 abstract methods: `stop`, `createDenial`, `cancelDenial`, `pauseDenial`, `resumeDenial`, `getSyncInfo`, `listAddressBook`, `createAddressBookEntry`, `updateAddressBookEntry`, `deleteAddressBookEntry`, `setTransactionNote`, `exportLabels`, `importLabels`, `getFireplaceStats`, `listRecentTransactions`, `listBlocks`, `getNetworkStats`, `setMempoolWatch`, `resetMempoolWatch`, `getMempoolWatchStatus`, `listMempoolTransactions`, `listBlockStats`, `listMiningPools`, `updateNetwork`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it 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. — sidechain_core/lib/rpcs/bitwindow_api.dart:370
  • `WalletAPI` declares 32 abstract methods: `sendTransaction`, `getBalance`, `getNewAddress`, `listTransactions`, `listUnspent`, `listReceiveAddresses`, `listSidechainDeposits`, `createSidechainDeposit`, `signMessage`, `verifyMessage`, `getStats`, `unlockWallet`, `lockWallet`, `isWalletUnlocked`, `createCheque`, `getCheque`, `listCheques`, `checkChequeFunding`, `previewSweep`, `sweepCheque`, `deleteCheque`, `setUTXOMetadata`, `getUTXOMetadata`, `setCoinSelectionStrategy`, `getCoinSelectionStrategy`, `getTransactionDetails`, `getUTXODistribution`, `bumpFee`, `selectCoins`, `createBackup`, `restoreBackup`, `validateBackup`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it 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. — sidechain_core/lib/rpcs/bitwindow_api.dart:625
  • `CoinShiftRPC` declares 22 abstract methods: `getSidechainWealth`, `createDeposit`, `connectPeer`, `forgetPeer`, `listPeers`, `getBlock`, `getBestMainchainBlockHash`, `getBestSidechainBlockHash`, `getBMMInclusions`, `removeFromMempool`, `generateMnemonic`, `setSeedFromMnemonic`, `getWalletAddresses`, `formatDepositAddress`, `getOpenAPISchema`, `createSwap`, `claimSwap`, `getSwapStatus`, `listSwaps`, `listSwapsByRecipient`, `updateSwapL1Txid`, `reconstructSwaps`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it 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. — sidechain_core/lib/rpcs/coinshift_rpc.dart:21
  • `TruthcoinRPC` declares 47 abstract methods: `getSidechainWealth`, `createDeposit`, `connectPeer`, `listPeers`, `getBlock`, `getBestMainchainBlockHash`, `getBestSidechainBlockHash`, `getBMMInclusions`, `removeFromMempool`, `generateMnemonic`, `setSeedFromMnemonic`, `refreshWallet`, `getTransaction`, `getTransactionInfo`, `getWalletAddresses`, `myUtxos`, `myUnconfirmedUtxos`, `calculateInitialLiquidity`, `marketCreate`, `marketList`, `marketGet`, `marketPriceHistory`, `marketBuy`, `marketSell`, `marketPositions`, `marketAmplifyBeta`, `slotStatus`, `slotList`, `slotGet`, `slotClaim`, `slotClaimCategory`, `getVoterAddress`, `voteVoter`, `voteVoters`, `voteSubmit`, `voteList`, `votePeriod`, `votecoinTransfer`, `votecoinBalance`, `transferVotecoin`, and 7 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it 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. — sidechain_core/lib/rpcs/truthcoin_rpc.dart:21
  • `ZSideRPC` declares 24 abstract methods: `getSidechainWealth`, `createDeposit`, `connectPeer`, `listPeers`, `getBlock`, `getBestMainchainBlockHash`, `getBestSidechainBlockHash`, `getBMMInclusions`, `removeFromMempool`, `generateMnemonic`, `setSeedFromMnemonic`, `getNewShieldedAddress`, `getNewTransparentAddress`, `getShieldedWalletAddresses`, `getTransparentWalletAddresses`, `shield`, `sendShielded`, `sendTransparent`, `deshield`, `listPrivateTransactions`, `listTransparentTransactions`, `listShieldedUTXOs`, `listUnshieldedUTXOs`, `getBalanceBreakdown`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it 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. — sidechain_core/lib/rpcs/zside_rpc.dart:57

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.

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

Other · Code Health — Unreviewed-generation residue in this repository's Dart: methods whose whole body still throws UnimplementedError or a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of 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.

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Dart: methods that only throw UnimplementedError or a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `listTransactions`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. (×2) — sidechain_core/lib/rpcs/bitassets_rpc.dart:314, sidechain_core/lib/rpcs/bitnames_rpc.dart:241

What to do

  • Clear the softer debt: re-enable or delete tests marked `skip:`, decide whether each empty method or UnsupportedError is deliberate (and say so in a comment), and replace `// ignore_for_file: type=lint` with targeted, justified ignores.
M1 · Documentation (README)6.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.

  • The root README is 26 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers. — README.md:1

What to do

  • Expand the README with getting-started, architecture overview and a project map.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

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

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

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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability6.6 / 10Strong✓ 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 16/30 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `bbc`, `bbc/macos`, `bitassets/macos`, `bitnames/macos`, `bitwindow/macos` and 9 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling7.0 / 10Strong✓ 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.

  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `github-actions`, `bun`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:4

What to do

  • Dependabot is configured but does not watch `github-actions`, `bun`, `gitsubmodule` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.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.

  • Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it. — REDACTED:57

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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

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

  • `http.DefaultClient` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — bitwindow/server/dial/dial.go:56, bitwindow/server/dial/dial.go:67, bitwindow/server/dial/dial.go:78
  • `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — bitwindow/server/dial/dial.go:235, dc-hub/server/dial/dial.go:49

What to do

  • Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
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.

  • `_readLastNLines` is async and calls openSync, readSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — sail_ui/lib/pages/log_page.dart:177
  • `_readLastNLines` is async and calls readSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — sail_ui/lib/pages/log_page.dart:691
  • `init` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — third_party/logger/lib/src/outputs/advanced_file_output.dart:154
  • `_deleteRotatedFiles` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — third_party/logger/lib/src/outputs/advanced_file_output.dart:239

What to do

  • Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.
R1 · Type Safety10.0 / 10Exemplary✓ 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 Duplication7.5 / 10Strong✓ 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.

  • 5 duplicated blocks under coinnews/app/ have copies in at least two of the sibling directories item, jobs, new, t, u — 3 of them are reported below, and 2 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 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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. — coinnews/app/jobs/page.tsx:8
  • coinnews/app/layout.tsx:15 · dc-hub/app/layout.tsx:27 — the two spans are one implementation copied and then locally edited — 82 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. — coinnews/app/layout.tsx:15
  • coinnews/app/item/[id]/page.tsx:31 · coinnews/components/item-row.tsx:22 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — coinnews/app/item/[id]/page.tsx:31
  • coinnews/app/jobs/page.tsx:8 · coinnews/app/new/page.tsx:7 · coinnews/app/page.tsx:7 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — coinnews/app/jobs/page.tsx:8
  • dc-hub/app/sidechains/explorer-client.tsx:334 · dc-hub/app/sidechains/explorer-client.tsx:370 — 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. — dc-hub/app/sidechains/explorer-client.tsx:334
  • coinnews/app/item/[id]/page.tsx:7 · coinnews/app/u/[xpk]/page.tsx:3 — 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. — coinnews/app/item/[id]/page.tsx:7
  • coinnews/app/jobs/page.tsx:6 · coinnews/app/new/page.tsx:5 · coinnews/app/page.tsx:5 · coinnews/app/t/[topic]/page.tsx:5 — the 4 copies are spread across 4 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. — coinnews/app/jobs/page.tsx:6
  • dc-hub/app/info/page.tsx:79 · dc-hub/app/info/page.tsx:100 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — dc-hub/app/info/page.tsx:79

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 Complexity6.7 / 10Strong✓ 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.

  • InfoPage has cyclomatic complexity 23 and cognitive complexity 20; 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. 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. — dc-hub/app/info/page.tsx:23
  • Home has cyclomatic complexity 23 and cognitive complexity 16; 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. 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. — dc-hub/app/page.tsx:24
  • BlockCard has cyclomatic complexity 21 and cognitive complexity 20; 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. 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. — dc-hub/app/sidechains/explorer-client.tsx:292
  • fieldDefault has cyclomatic complexity 11 and cognitive complexity 15; 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. — REDACTED:84
R3 · Large Files9.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.

  • dc-hub/app/sidechains/explorer-client.tsx has 436 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — dc-hub/app/sidechains/explorer-client.tsx:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED 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: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • The package in `coinnews` declares the lint script `lint` (`biome lint`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `coinnews` (or the workspace's task runner). — REDACTED:39
R7 · Dead Code10.0 / 10Exemplary✓ 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.

  • Nothing imports this binding — it is safe to review for removal. — coinnews/lib/utils.ts:4
R8 · Dependency Hygiene1.5 / 10Critical✓ 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.

  • Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED. — coinnews/lib/api.ts:1
  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. — dc-hub/app/sidechains/explorer-client.tsx:3
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×6) — REDACTED:3, REDACTED:8, REDACTED:9, …
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3) — REDACTED:3, REDACTED:8, REDACTED:10

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.

S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `Caddyfile` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — scripts/remote-enforcer/Caddyfile:9

What to do

  • Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

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

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

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `track` is public, takes a document from its caller (line 34) and hands it to `_deepEquals`, which calls itself at line 92 (`_deepEquals`) with a piece of `a` (and at line 104) — and nowhere in `_deepEquals` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `_deepEquals` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — sidechain_core/lib/utils/change_tracker.dart:92

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

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

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

X2 · Cancellation propagation9.4 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context or an AbortSignal (adoption curve).

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

  • Only 44/49 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `dialCoreRPC` calls `net.DialTimeout(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — sidechain-orchestrator/network_catalog.go:588
  • `StatusWithOptions` calls `net.DialTimeout(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:758
  • `GetBTCPrice` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:3354
  • `func` calls `http.NewRequestWithContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — dc-hub/server/jsonrpc/jsonrpc.go:77
  • `getDrivechainConfig` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — dc-hub/lib/config.ts:25

What to do

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

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

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

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

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

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

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

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

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

X27 · Collection changed while being enumerated8.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for … in` loop leaves the `List`, `Map` or `Set` it is walking alone — Dart's collection iterators check that the collection has not changed since the loop began, so a body that adds to or removes from the very collection the loop is walking (or the map whose `keys`, `values` or `entries` it walks) makes the next step throw `ConcurrentModificationError` and the remaining elements are never seen. Whether a `for … range` leaves the slice or map it is walking alone — Go raises nothing, but the walk and the collection part: a range evaluates its slice once, so an element appended in the body is never visited and a removal by reslicing (`s = append(s[:i], s[i+1:]...)`, `slices.Delete`) shifts the next element under the index, which is then skipped while the last is read twice; a reslice, a reassignment or a sort leaves every later `s[i]` naming another element; and a map's order is unspecified, so deleting another key (or clearing the map) changes from run to run which entries the loop still sees.

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

  • `s.wallets` is walked by the `for … range` at line 2009, and line 2024 appends to `s.wallets`. A range evaluates its slice once and walks the length it had when the loop began, so the elements appended here are never visited by this loop — work queued for it is silently dropped. — sidechain-orchestrator/wallet/service.go:2009

What to do

  • Each finding names the two lines that cannot both stand — the `for` over the collection (or its `keys()`/`values()`/`items()` view), and the call inside the body that changes its size. Confirm from those two, then pick one: walk a snapshot (`for k in list(d):`, `for x in s.copy():`); build the result instead of editing in place (`d = {k: v for k, v in d.items() if keep(v)}`); collect what needs removing and remove it after the loop; or — where only the first match was ever meant — `break` straight after the change, which is the one shape that is already safe. In Dart: Each finding names the two lines that cannot both stand — the `for … in` over the collection (or its `keys`/`values`/`entries` view), and the call inside the body that changes it. Confirm from those two, then pick one: replace the loop with `removeWhere`/`retainWhere`; walk a copy (`for (final x in items.toList())`, `for (final k in map.keys.toList())`); collect what needs changing and apply it after the loop; or — where only the first match was ever meant — `break` straight after the change, which is the one shape that is already safe. In Go: Each finding names the two lines that cannot both stand — the `for … range` over the collection, and the change to it in the body. Confirm from those two, then pick one: build the result instead of editing the walked collection (`var kept []T` … `kept = append(kept, v)`, or `kept := s[:0]` and assign `s = kept` after the loop; `slices.DeleteFunc(s, drop)` in one call); for a worklist that must visit what it adds, loop `for len(queue) > 0` or by index (`for i := 0; i < len(s); i++`); walk a copy (`range slices.Clone(s)`, `range slices.Collect(maps.Keys(m))`) and change the original; delete only the CURRENT key (`delete(m, k)`), which the specification allows; or — where only the first match was ever meant — `break` straight after the change.
X28 · Index access outside its own emptiness guard6.9 / 10Strong✓ Tool-verified

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

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

  • `m[:strings.LastIndex(m, suffix)]` uses a search that answers -1 when nothing is found directly as a bound. When the search misses, the bound is -1 and the access panics with `slice bounds out of range`. Assign the result, test it for -1, then slice (or use `strings.Cut`). — REDACTED:3087
  • This slices the parameter `uri` with a constant bound, `uri[8:]`, and nothing in the function checks `len(uri)` first. The value is input the caller hands in: a shorter one panics with `slice bounds out of range`. Test `len(uri)` against the bound and return an error, or document and enforce the minimum length at the boundary. — bitwindow/server/engines/utils_engine.go:38
  • `spec.Procedure[:strings.LastIndex(spec.Procedure, " ")]` uses a search that answers -1 when nothing is found directly as a bound. When the search misses, the bound is -1 and the access panics with `slice bounds out of range`. Assign the result, test it for -1, then slice (or use `strings.Cut`). — bitwindow/server/api/runtime.go:329

What to do

  • Each finding names the index access that escapes the guard and the line of the correctly bracketed access beside it. Compare the two: they differ only in where one parenthesis sits. Move it so the emptiness test brackets every access to that symbol — and if the value provably cannot be empty at this point, delete the test rather than leave a condition that guards one access and not its neighbour.
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.9 / 10Strong✓ Tool-verified

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

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

  • `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×10) — truthcoin/lib/pages/voting_dashboard_page.dart:811, sidechain_core/lib/settings/hash_plaintext_settings.dart:57, sidechain_core/lib/settings/homepage_configuration_setting.dart:17, …
  • `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — sidechain_core/lib/utils/shared_log_tail.dart:109, sidechain_core/lib/config/backend_sidechain_runtime.dart:141, sidechain_core/lib/auth/local_auth.dart:69
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×6) — sidechain_core/lib/rpcs/bitassets_rpc.dart:364, sidechain_core/lib/rpcs/bitnames_rpc.dart:291, sidechain_core/lib/rpcs/enforcer_rpc.dart:121, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. — sidechain_core/lib/providers/generic_sidechain_conf_provider.dart:146
  • `entries, _ := os.ReadDir(dir)` writes the call's error to `_` and then uses `entries` as if the call succeeded. When `os.ReadDir` fails, `entries` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `entries` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — sidechain-orchestrator/config.go:272
  • `if err := json.Unmarshal(raw, &entry); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — sidechain-orchestrator/config_loader.go:347, sidechain-orchestrator/config_loader.go:364, sidechain-orchestrator/config_loader.go:387
  • `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×13) — sidechain-orchestrator/datadir_network.go:217, sidechain-orchestrator/datadir_network.go:221, REDACTED:515, …
  • `if _, err := os.Lstat(binPath); err == nil` reports `err` on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on `err.Error()`) is reported in its place. Test `err != nil` here. — REDACTED:156
  • `if readErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — sidechain-orchestrator/logtail.go:100
  • `if _, err := f.Seek(0, io.SeekStart); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — sidechain-orchestrator/logtail.go:106

What to do

  • Swallowed exception (caught, then discarded)
X4 · Structured logging8.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `Msg` at line 152 is handed a message assembled at the call — `fmt.Sprintf` with values, or a string concatenated with a value — so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values as attributes instead: `slog.Msg("order moved", "order_id", orderID, "status", status)` with log/slog, `logger.Msg("order moved", zap.String("order_id", orderID))` with zap, `log.WithFields(log.Fields{"order_id": orderID}).Msg("order moved")` with logrus, or `log.Info().Str("order_id", orderID).Msg("order moved")` with zerolog. — bitwindow/server/engines/coinnews.go:152

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types9.2 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Dart's sound null safety is on and is not undermined by null assertions — a package whose `environment: sdk:` lower bound is 2.12 or above is null safe, so `String` cannot hold null and `String?` must be checked before use, and each postfix `!` is a run-time `Null check operator used on a null value` the author has told the analyzer cannot happen.

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

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health73.8StrongSolid.
Architecture94.1ExemplaryStrongest area.
Maturity74.2StrongSolid.
Readiness47.9Adequate — gated by R8, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security69.4Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility63.4Adequate — gated by AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 2 check(s) recorded observations but carry no score

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

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

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 45 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.

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit -1 — compose exited without a cause this engine recognises) — Tool stalled (no output) after 00:02:15.0326664.; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~156166 lines of test source are present (.dart, .go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half has no runner
  • D14 License Compliance — Package licences not graded — dependencies declared to CocoaPods
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.dart), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 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.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 29 persistence-mapped domain entity/entities (gorm/bun/db/xorm-tagged); an anemic-CRUD business data model (29 persistence-mapped domain-package entities + a service/handler/HTTP layer); no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
  • 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
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. 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
  • 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 data present for 473 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for classes extending benchmark_harness's `BenchmarkBase`, `AsyncBenchmarkBase` or `PerfBenchmarkBase` (directly or through a base of your own), `benchmark(…)` calls under the pub `benchmark` package, Flutter's `benchmarkWidgets`, `watchPerformance` or `traceAction` in a test importing flutter_test, integration_test or flutter_driver, or benchmark_harness, benchmark or web_benchmarks in a pubspec.yaml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R4 Test Coverage — the JS/TS workspace (42 production file(s)) has no JavaScript/TypeScript test, but it is 1.07% of this repository's production source and the other 98.93% carries 156,166 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
  • R5 Dependency Freshness — uses a bun lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — X24 reached only 1% of this repository's production lines — dart (155,372 lines), go (105,975 lines), cpp (4,911 lines), c (1,323 lines), swift (269 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 39% of this repository's production lines — dart (155,372 lines), cpp (4,911 lines), typescript (2,661 lines), c (1,323 lines), javascript (180 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 — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • 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 — 172 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 57 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×33
  • 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
  • + 8 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
D11 · Test Reliability · Flaky test · ×5
  • Flaky test: sidechain-orchestrator::github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator.TestDownload_StateReflectsByteProgress — Passed 2×, failed 1× across repeated runs.
  • Flaky test: sidechain-orchestrator::github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator.TestECashLightSwitchKeepsSourceForFullMode — Passed 2×, failed 1× across repeated runs.
  • Flaky test: sidechain-orchestrator::github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator.TestNodeModeLightStopsOwnedOrphans — Passed 2×, failed 1× across repeated runs.
  • Flaky test: sidechain-orchestrator::github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator.TestNodeModeLightStopsOwnedOrphans/enforcer — Passed 2×, failed 1× across repeated runs.
  • Flaky test: sidechain-orchestrator::github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/stratum.TestSetSourceMovesMiners — Passed 2×, failed 1× across repeated runs.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×4
  • Boundary-crossing change coupling: utxo.dart ↔ core_transaction.dart sail_ui/lib/widgets/components/utxo.dart:1 — `sail_ui/lib/widgets/components/utxo.dart` (context sail_ui) and `sidechain_core/lib/models/core_transaction.dart` (context sidechain_core) sit in DIFFERENT parts of the tree yet change together 75% of the time (9 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) — 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 9 shared commits counted here, the most recent 3 are `d234e8d1` multi: remove Money-usage (at that commit the files were still `packages/sail_ui/lib/widgets/components/utxo.dart` and `packages/sail_ui/lib/widgets/components/core_transaction.dart`); `653bfe6e` sidesail: use core transaction in tx list (at that commit the files were still `packages/sail_ui/lib/widgets/components/utxo.dart` and `packages/sail_ui/lib/widgets/components/core_transaction.dart`); `85f61a0f` sailui+sidesail: introduce expandable list entry comp (at that commit the files were still `packages/sail_ui/lib/widgets/components/utxo.dart` and `packages/sail_ui/lib/widgets/components/core_transaction.dart`) — run `git show` on any of them.
  • Boundary-crossing change coupling: orchestrator_handler.go ↔ orchestrator_rpc.dart sidechain-orchestrator/api/orchestrator_handler.go:1 — `sidechain-orchestrator/api/orchestrator_handler.go` (context sidechain-orchestrator) and `sidechain_core/lib/rpcs/orchestrator_rpc.dart` (context sidechain_core) sit in DIFFERENT parts of the tree yet change together 60% of the time (18 of the 30 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 18 shared commits counted here, the most recent 3 are `2ba48221` orchestrator: resume logs across restarts; `a0575150` orchestrator: take the best branch after a reject; `8ec18eea` orchestrator: roll back to a block hash or a height — run `git show` on any of them.
  • Boundary-crossing change coupling: reserve_register_page.dart ↔ commitment.go bitnames/lib/pages/tabs/reserve_register_page.dart:1 — `bitnames/lib/pages/tabs/reserve_register_page.dart` (context bitnames) and `sidechain-orchestrator/sidechain/bitnames/commitment.go` (context sidechain-orchestrator) sit in DIFFERENT parts of the tree yet 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) — 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 5 shared commits counted here, the most recent 3 are `92b5e9fb` bitnames: register static IP addresses; `4d886340` fix ci/review; `abe97346` fix ci/review — run `git show` on any of them.
  • Boundary-crossing change coupling: sail_ui.dart ↔ REDACTED sail_ui/lib/sail_ui.dart:1 — `sail_ui/lib/sail_ui.dart` (context sail_ui) and `REDACTED` (context sidechain_core) sit in DIFFERENT parts of the tree yet 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) — 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 5 shared commits counted here, the most recent 3 are `c70f6f55` wip (at that commit the file was still `sail_ui/lib/providers/enforcer_conf_provider.dart`); `349c2f10` bitwindow: add conf migrator, used for signet first (at that commit the file was still `sail_ui/lib/providers/enforcer_conf_provider.dart`); `535a8529` multi: add better sidechain guard (at that commit the file was still `sail_ui/lib/providers/enforcer_conf_provider.dart`) — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×2
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label coinnews/components/topic-filter.tsx:36 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels · Link with no accessible name · ×1
  • Link with no accessible name dc-hub/app/sidechains/explorer-client.tsx:321 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC3 · Page structure · Document without a <title> · ×1
  • Document without a <title> coinnews/app/layout.tsx:34 — A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@bufbuild/protobuf' · ×1
  • Unlisted import '@bufbuild/protobuf' dc-hub/app/sidechains/explorer-client.tsx:3 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Serious — 2117 finding(s)
D3 · God Classes · FileTooLong · ×78
  • FileTooLong: core/sail_svg.dart sail_ui/lib/widgets/core/sail_svg.dart — FileTooLong — 4747 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4247 over it, 9.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: REDACTED REDACTED — FileTooLong — 2389 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: Orchestrator (103 blocks, 138-4272). The bar is 500 significant lines; this is 1889 over it, 4.78× 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: wallet/electrum_backend.go sidechain-orchestrator/wallet/electrum_backend.go — FileTooLong — 2171 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: ElectrumBackend (86 blocks, 87-3410). The bar is 500 significant lines; this is 1671 over it, 4.34× 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: pages/sidechains_page.dart bitwindow/lib/pages/sidechains_page.dart — FileTooLong — 1723 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1223 over it, 3.45× 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: api/wallet_handler.go sidechain-orchestrator/api/wallet_handler.go — FileTooLong — 1635 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: WalletHandler (82 blocks, 71-2533). The bar is 500 significant lines; this is 1135 over it, 3.27× 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: rpcs/bitwindow_api.dart sidechain_core/lib/rpcs/bitwindow_api.dart — FileTooLong — 1506 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1006 over it, 3.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: config/binaries.dart sidechain_core/lib/config/binaries.dart — FileTooLong — 1412 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 912 over it, 2.82× 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: wallet/wallet_send.dart bitwindow/lib/pages/wallet/wallet_send.dart — FileTooLong — 1388 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 888 over it, 2.78× 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: wallet/service.go sidechain-orchestrator/wallet/service.go — FileTooLong — 1316 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: Service (91 blocks, 33-2277). The bar is 500 significant lines; this is 816 over it, 2.63× 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: REDACTED REDACTED — FileTooLong — 1302 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: _MultisigConfigStepState (272-1661). The bar is 500 significant lines; this is 802 over it, 2.60× 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: wallet/wallet_multisig_lounge.dart bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart — FileTooLong — 1291 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 791 over it, 2.58× 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: wallet/core_backend.go sidechain-orchestrator/wallet/core_backend.go — FileTooLong — 1274 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: CoreBackend (57 blocks, 41-2115). The bar is 500 significant lines; this is 774 over it, 2.55× 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: wallet/wallet.go bitwindow/server/api/wallet/wallet.go — FileTooLong — 1213 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: Server (46 blocks, 71-1871). The bar is 500 significant lines; this is 713 over it, 2.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: pages/market_detail_page.dart truthcoin/lib/pages/market_detail_page.dart — FileTooLong — 1178 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 678 over it, 2.36× 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: pages/overview_page.dart bitwindow/lib/pages/overview_page.dart — FileTooLong — 1177 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 677 over it, 2.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: pages/root_page.dart bitwindow/lib/pages/root_page.dart — FileTooLong — 1051 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: _RootPageState (67-1219). The bar is 500 significant lines; this is 551 over it, 2.10× 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: models/bitcoin_config_options.dart sidechain_core/lib/models/bitcoin_config_options.dart — FileTooLong — 1050 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: BitcoinConfigOptions (42-1239). The bar is 500 significant lines; this is 550 over it, 2.10× 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: sidechain-orchestrator/ecash_migration.go sidechain-orchestrator/ecash_migration.go — FileTooLong — 990 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: Orchestrator (35 blocks, 77-1430). The bar is 500 significant lines; this is 490 over it, 1.98× 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: engines/bmm_engine.go sidechain-orchestrator/engines/bmm_engine.go — FileTooLong — 939 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: BmmEngine (48 blocks, 133-1556). The bar is 500 significant lines; this is 439 over it, 1.88× 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: api/orchestrator_handler.go sidechain-orchestrator/api/orchestrator_handler.go — FileTooLong — 925 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: Handler (40 blocks, 29-1341). The bar is 500 significant lines; this is 425 over it, 1.85× 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: REDACTED REDACTED — FileTooLong — 917 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 417 over it, 1.83× 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: bitwindowd/bitwindowd.go bitwindow/server/api/bitwindowd/bitwindowd.go — FileTooLong — 901 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: Server (33 blocks, 80-1396). The bar is 500 significant lines; this is 401 over it, 1.80× 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: widgets/coinnews.dart bitwindow/lib/widgets/coinnews.dart — FileTooLong — 883 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 383 over it, 1.77× 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: tabs/zside_tab_widgets.dart zside/lib/widgets/containers/tabs/zside_tab_widgets.dart — FileTooLong — 868 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 368 over it, 1.74× 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: nav/bottom_nav.dart sail_ui/lib/widgets/nav/bottom_nav.dart — FileTooLong — 864 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 364 over it, 1.73× 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.
  • + 53 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×77
  • Hotspot: sidechain-orchestrator/cmd/drivechaind/main.go sidechain-orchestrator/cmd/drivechaind/main.go:154 — sidechain-orchestrator/cmd/drivechaind/main.go changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in main.run at line 154. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/cmd/drivechaind/main.go`: 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: REDACTED REDACTED:2045 — REDACTED changed 93 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in Orchestrator.startTargetOnly at line 2045. 1 of those changes was a fix/bug commit, and the other 92 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- REDACTED`: 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: sidechain-orchestrator/wallet/electrum_backend.go sidechain-orchestrator/wallet/electrum_backend.go:1061 — sidechain-orchestrator/wallet/electrum_backend.go changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in ElectrumBackend.buildSendPSBT at line 1061. 3 of those changes were fix/bug commits, and the other 50 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/wallet/electrum_backend.go`: 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: bitwindow/lib/pages/sidechains_page.dart bitwindow/lib/pages/sidechains_page.dart:455 — bitwindow/lib/pages/sidechains_page.dart changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in _SidechainsTable.build at line 455. 1 of those changes was a fix/bug commit, and the other 44 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- bitwindow/lib/pages/sidechains_page.dart`: 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: bitwindow/server/engines/bitcoind_engine.go bitwindow/server/engines/bitcoind_engine.go:293 — bitwindow/server/engines/bitcoind_engine.go changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in Parser.handleBlockTick at line 293. 3 of those changes were fix/bug commits, and the other 33 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- bitwindow/server/engines/bitcoind_engine.go`: 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: bitwindow/server/api/wallet/wallet.go bitwindow/server/api/wallet/wallet.go:353 — bitwindow/server/api/wallet/wallet.go changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Server.listTransactions at line 353. 3 of those changes were fix/bug commits, and the other 43 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- bitwindow/server/api/wallet/wallet.go`: 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: sidechain-orchestrator/wallet/core_backend.go sidechain-orchestrator/wallet/core_backend.go:832 — sidechain-orchestrator/wallet/core_backend.go changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in CoreBackend.Send at line 832. 2 of those changes were fix/bug commits, and the other 40 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/wallet/core_backend.go`: 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: sidechain-orchestrator/api/wallet_handler.go sidechain-orchestrator/api/wallet_handler.go:959 — sidechain-orchestrator/api/wallet_handler.go changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in WalletHandler.SendTransaction at line 959. 1 of those changes was a fix/bug commit, and the other 47 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/api/wallet_handler.go`: 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: sail_ui/lib/widgets/nav/bottom_nav.dart sail_ui/lib/widgets/nav/bottom_nav.dart:232 — sail_ui/lib/widgets/nav/bottom_nav.dart changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in BottomNav.displayConnectionStatusDialog at line 232. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sail_ui/lib/widgets/nav/bottom_nav.dart`: 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: bitwindow/server/api/bitwindowd/bitwindowd.go bitwindow/server/api/bitwindowd/bitwindowd.go:669 — bitwindow/server/api/bitwindowd/bitwindowd.go changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Server.ImportLabels at line 669. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- bitwindow/server/api/bitwindowd/bitwindowd.go`: 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: sidechain-orchestrator/engines/bmm_engine.go sidechain-orchestrator/engines/bmm_engine.go:604 — sidechain-orchestrator/engines/bmm_engine.go changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in BmmEngine.tick at line 604. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/engines/bmm_engine.go`: 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: bitwindow/lib/pages/root_page.dart bitwindow/lib/pages/root_page.dart:444 — bitwindow/lib/pages/root_page.dart changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in _RootPageState.build at line 444. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- bitwindow/lib/pages/root_page.dart`: 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: REDACTED REDACTED:196 — REDACTED changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in commands.runStart at line 196. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- REDACTED`: 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: sidechain-orchestrator/api/bmm_handler.go sidechain-orchestrator/api/bmm_handler.go:445 — sidechain-orchestrator/api/bmm_handler.go changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in BMMHandler.CreateBid at line 445. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/api/bmm_handler.go`: 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: sidechain-orchestrator/ecash_migration.go sidechain-orchestrator/ecash_migration.go:976 — sidechain-orchestrator/ecash_migration.go changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in Orchestrator.rewindMigration at line 976. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/ecash_migration.go`: 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: sidechain-orchestrator/wallet/service.go sidechain-orchestrator/wallet/service.go:1880 — sidechain-orchestrator/wallet/service.go changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Service.loadWalletFile at line 1880. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/wallet/service.go`: 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: sidechain-orchestrator/ecash_switch.go sidechain-orchestrator/ecash_switch.go:291 — sidechain-orchestrator/ecash_switch.go changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in Orchestrator.ApplyECashSwitch at line 291. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/ecash_switch.go`: 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: REDACTED REDACTED:114 — REDACTED changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in DeniabilityEngine.CleanupDenials at line 114. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- REDACTED`: 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: sidechain-orchestrator/api/explorer_handler.go sidechain-orchestrator/api/explorer_handler.go:225 — sidechain-orchestrator/api/explorer_handler.go changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in api.nodeOverview at line 225. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/api/explorer_handler.go`: 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: sidechain-orchestrator/process.go sidechain-orchestrator/process.go:325 — sidechain-orchestrator/process.go changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in ProcessManager.StartWithOptions at line 325. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/process.go`: 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: sidechain_core/lib/providers/sync_provider.dart sidechain_core/lib/providers/sync_provider.dart:319 — sidechain_core/lib/providers/sync_provider.dart changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in SyncProvider._fetch at line 319. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain_core/lib/providers/sync_provider.dart`: 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: bitwindow/server/engines/notification_engine.go bitwindow/server/engines/notification_engine.go:285 — bitwindow/server/engines/notification_engine.go changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in NotificationEngine.processWalletTransactions at line 285. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- bitwindow/server/engines/notification_engine.go`: 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: sidechain-orchestrator/commands/wallet_burn_ecx.go sidechain-orchestrator/commands/wallet_burn_ecx.go:137 — sidechain-orchestrator/commands/wallet_burn_ecx.go changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in commands.runWalletBurnECX at line 137. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- sidechain-orchestrator/commands/wallet_burn_ecx.go`: 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: REDACTED REDACTED:72 — REDACTED changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in main.realMain at line 72. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- REDACTED`: 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: bitwindow/lib/pages/wallet/wallet_overview.dart bitwindow/lib/pages/wallet/wallet_overview.dart:243 — bitwindow/lib/pages/wallet/wallet_overview.dart changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in _TransactionTableState.build at line 243. 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-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 12:22:47 +01:00' --until='2026-11-17 12:22:47 +01:00' --full-history --no-merges -- bitwindow/lib/pages/wallet/wallet_overview.dart`: 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.
  • + 52 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×63
  • MethodTooLong: _RootPageState.build bitwindow/lib/pages/root_page.dart:444 — MethodTooLong — build runs 466 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 366 over it, 4.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: BitnamesTabPage.build bitnames/lib/pages/tabs/reserve_register_page.dart:18 — MethodTooLong — build runs 306 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 206 over it, 3.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ChatPage.build bitwindow/lib/pages/chat_page.dart:17 — MethodTooLong — build runs 264 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× 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: CreateMultisigModal.build bitwindow/lib/widgets/create_multisig_modal.dart:113 — MethodTooLong — build 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: _PaperCheckDialogState.build bitwindow/lib/dialogs/paper_check_dialog.dart:171 — MethodTooLong — build runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× 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: MultisigLoungeViewModel.openTransactionModal bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1255 — MethodTooLong — openTransactionModal 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: _TransactionTableState.build bitwindow/lib/pages/wallet/wallet_overview.dart:243 — MethodTooLong — build runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× 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: CheckDetailPage.build bitwindow/lib/pages/wallet/check_detail_page.dart:260 — MethodTooLong — build runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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: _SettingsNetworkState.build bitwindow/lib/pages/settings/settings_network.dart:343 — MethodTooLong — build runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProcessManager.StartWithOptions sidechain-orchestrator/process.go:325 — MethodTooLong — StartWithOptions runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× 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: _VerifyReportTabState.build bitwindow/lib/widgets/proof_of_funds_modal.dart:409 — MethodTooLong — build runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AmmAnalyticsWidget.build bitassets/lib/widgets/amm_analytics_widget.dart:16 — MethodTooLong — build runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× 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: AmmTabPage.build bitassets/lib/pages/tabs/amm_page.dart:12 — MethodTooLong — build runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _M4ExplorerPageState.build bitwindow/lib/pages/explorer/m4_explorer_page.dart:25 — MethodTooLong — build runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _MultisigTransactionsTableState.build bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:651 — MethodTooLong — build runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× 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: _SailConfigureHomePageState.build sail_ui/lib/pages/configure_homepage_page.dart:23 — MethodTooLong — build runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× 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: _TreeTab.build bitwindow/lib/dialogs/merkle_tree_dialog.dart:248 — MethodTooLong — build 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: _ImportPSBTModalState.build bitwindow/lib/widgets/import_psbt_modal.dart:363 — MethodTooLong — build 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: _RootPageState._getMenuCommands bitwindow/lib/pages/root_page.dart:184 — MethodTooLong — _getMenuCommands 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: DutchAuctionTabPage.build bitassets/lib/pages/tabs/dutch_auction_page.dart:12 — MethodTooLong — build runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _DeniabilityTableState.build bitwindow/lib/pages/wallet/denability_page.dart:163 — MethodTooLong — build runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ElectrumBackend.buildSendPSBT sidechain-orchestrator/wallet/electrum_backend.go:1061 — MethodTooLong — buildSendPSBT runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BottomNav.displayConnectionStatusDialog sail_ui/lib/widgets/nav/bottom_nav.dart:232 — MethodTooLong — displayConnectionStatusDialog 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: SailCard._build sail_ui/lib/widgets/containers/sail_card.dart:79 — MethodTooLong — _build runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _HashCalculatorState._buildHashResults bitwindow/lib/widgets/hash_calculator_modal.dart:385 — MethodTooLong — _buildHashResults runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 38 more in this group — see findings.md.
D6 · Cohesion (LCOM4) · Low cohesion · ×54
  • Low cohesion: MockTruthcoinRPC (LCOM4 69) sidechain_core/lib/mocks/mocks.dart:510 — MockTruthcoinRPC's methods fall into 69 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 69 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: MockBitnamesRPC (LCOM4 54) sidechain_core/lib/mocks/mocks.dart:1169 — MockBitnamesRPC's methods fall into 54 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 54 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: MockCoinShiftRPC (LCOM4 44) sidechain_core/lib/mocks/mocks.dart:1510 — MockCoinShiftRPC's methods fall into 44 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 44 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: MockPhotonRPC (LCOM4 35) sidechain_core/lib/mocks/mocks.dart:969 — MockPhotonRPC's methods fall into 35 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 35 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: MockThunderRPC (LCOM4 33) sidechain_core/lib/mocks/mocks.dart:320 — MockThunderRPC's methods fall into 33 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 33 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MockSyncProvider (LCOM4 24) sidechain_core/lib/mocks/mocks.dart:1770 — MockSyncProvider's methods fall into 24 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 24 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: MockBbcRPC (LCOM4 22) sidechain_core/lib/mocks/mocks.dart:228 — MockBbcRPC's methods fall into 22 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 22 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: MockBitwindowRPC (LCOM4 21) sidechain_core/lib/mocks/mocks.dart:138 — MockBitwindowRPC's methods fall into 21 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 21 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: ZSideMeltCastViewModel (LCOM4 16) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:285 — ZSideMeltCastViewModel's methods fall into 16 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 16 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MockEnforcerRPC (LCOM4 12) sidechain_core/lib/mocks/mocks.dart:59 — MockEnforcerRPC's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: BbcLive (LCOM4 9) sidechain_core/lib/rpcs/bbc_rpc.dart:48 — BbcLive's methods fall into 9 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 9 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: WalletWriterProvider (LCOM4 8) sidechain_core/lib/providers/wallet_writer_provider.dart:9 — WalletWriterProvider's methods fall into 8 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 8 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: MockBitcoindConnection (LCOM4 7) sidechain_core/lib/mocks/mocks.dart:8 — MockBitcoindConnection's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: BackendSidechainConfProvider (LCOM4 7) sidechain_core/lib/providers/backend_sidechain_conf_provider.dart:12 — BackendSidechainConfProvider's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PortfolioDashboardViewModel (LCOM4 7) bitassets/lib/widgets/portfolio_dashboard.dart:481 — PortfolioDashboardViewModel's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MultisigLoungeViewModel (LCOM4 6) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:864 — MultisigLoungeViewModel'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: PortfolioViewModel (LCOM4 6) truthcoin/lib/pages/tabs/portfolio_page.dart:368 — PortfolioViewModel'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: ZSideShieldTabViewModel (LCOM4 6) zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:84 — ZSideShieldTabViewModel'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: BitAssetsLive (LCOM4 6) sidechain_core/lib/rpcs/bitassets_rpc.dart:226 — BitAssetsLive'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: BitnamesLive (LCOM4 6) sidechain_core/lib/rpcs/bitnames_rpc.dart:153 — BitnamesLive'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: CoinShiftLive (LCOM4 6) sidechain_core/lib/rpcs/coinshift_rpc.dart:106 — CoinShiftLive'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: EnforcerLive (LCOM4 6) sidechain_core/lib/rpcs/enforcer_rpc.dart:20 — EnforcerLive'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: PhotonLive (LCOM4 6) sidechain_core/lib/rpcs/photon_rpc.dart:64 — PhotonLive'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: TruthcoinLive (LCOM4 6) sidechain_core/lib/rpcs/truthcoin_rpc.dart:257 — TruthcoinLive'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: ZSideLive (LCOM4 6) sidechain_core/lib/rpcs/zside_rpc.dart:93 — ZSideLive'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.
  • + 29 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×52
  • TooManyMethods: Orchestrator REDACTED:138 — TooManyMethods — 287 methods, declared across 22 files: REDACTED (104), sidechain-orchestrator/ecash_migration.go (35), sidechain-orchestrator/network_catalog.go (27), sidechain-orchestrator/ecash_switch.go (18), +18 more file(s). The bar is 30 methods; this is 257 over it, 9.57× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Service sidechain-orchestrator/wallet/service.go:33 — TooManyMethods — 142 methods, declared across 8 files: wallet/service.go (92), REDACTED (12), wallet/metadata.go (11), wallet/deposits.go (10), +4 more file(s). The bar is 30 methods; this is 112 over it, 4.73× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WalletHandler sidechain-orchestrator/api/wallet_handler.go:71 — TooManyMethods — 114 methods, declared across 8 files: api/wallet_handler.go (81), api/bip47_send.go (9), api/hardware_handler.go (8), api/deposit.go (6), +4 more file(s). The bar is 30 methods; this is 84 over it, 3.80× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ElectrumBackend sidechain-orchestrator/wallet/electrum_backend.go:87 — TooManyMethods — 97 methods, declared across 6 files: wallet/electrum_backend.go (86), wallet/electrum_own_outputs.go (6), wallet/address_reads.go (2), wallet/detect_script_kind.go (1), +2 more file(s). The bar is 30 methods; this is 67 over it, 3.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SendPageViewModel bitwindow/lib/pages/wallet/wallet_send.dart:820 — TooManyMethods — 89 methods. The bar is 30 methods; this is 59 over it, 2.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OrchestratorWalletRPC sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:28 — TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.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: ChatProvider bitwindow/lib/providers/chat_provider.dart:15 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.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: TruthcoinLive sidechain_core/lib/rpcs/truthcoin_rpc.dart:257 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.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: CoreBackend sidechain-orchestrator/wallet/core_backend.go:41 — TooManyMethods — 64 methods, declared across 4 files: wallet/core_backend.go (56), wallet/core_stranded.go (4), wallet/frozen_coins.go (3), wallet/send_preview.go (1). The bar is 30 methods; this is 34 over it, 2.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SidechainsViewModel bitwindow/lib/pages/sidechains_page.dart:1125 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Handler sidechain-orchestrator/sidechain/truthcoin/handler.go:18 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× 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: BitAssetsLive sidechain_core/lib/rpcs/bitassets_rpc.dart:226 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× 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: _MultisigConfigStepState REDACTED:272 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CoreRPCClient sidechain-orchestrator/wallet/core_rpc.go:39 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: BitnamesLive sidechain_core/lib/rpcs/bitnames_rpc.dart:153 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: _DraftPanelState bitwindow/lib/widgets/draft_panel.dart:36 — 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: Handler sidechain-orchestrator/sidechain/bitassets/handler.go:20 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: BitAssetsRPC sidechain_core/lib/rpcs/bitassets_rpc.dart:12 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: TruthcoinRPC sidechain_core/lib/rpcs/truthcoin_rpc.dart:21 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BmmEngine sidechain-orchestrator/engines/bmm_engine.go:133 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: ZSideLive sidechain_core/lib/rpcs/zside_rpc.dart:93 — 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: Server bitwindow/server/api/wallet/wallet.go:71 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.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: RetryFile sidechain_core/lib/utils/file_overrides.dart:26 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.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: BMMHandler sidechain-orchestrator/api/bmm_handler.go:87 — TooManyMethods — 44 methods, declared across 4 files: api/bmm_handler.go (36), api/bmm_frozen.go (5), api/bid_source.go (2), api/bmm_cancel.go (1). The bar is 30 methods; this is 14 over it, 1.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Handler sidechain-orchestrator/api/orchestrator_handler.go:29 — TooManyMethods — 44 methods, declared across 4 files: api/orchestrator_handler.go (39), api/ecash_migration_handler.go (3), api/datadir_network_handler.go (1), api/deposit_balance.go (1). The bar is 30 methods; this is 14 over it, 1.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 27 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×44
  • Duplicated block (7 lines × 2) bitassets/lib/pages/tabs/messaging_page.dart:19 — bitassets/lib/pages/tabs/messaging_page.dart:19-25 | bitnames/lib/pages/tabs/messaging_page.dart:19-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/pages/tabs/messaging_page.dart:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bitassets/lib/pages/tabs/messaging_page.dart:26` calls `unawaited`, `fetch` and `bitnames/lib/pages/tabs/messaging_page.dart:26` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) bitassets/lib/widgets/amm_analytics_widget.dart:230 — bitassets/lib/widgets/amm_analytics_widget.dart:230-236 | bitassets/lib/widgets/asset_issuance_wizard.dart:178-184 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/widgets/amm_analytics_widget.dart:230` it does not close everything it opens, so those 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) bitassets/lib/widgets/asset_issuance_wizard.dart:252 — bitassets/lib/widgets/asset_issuance_wizard.dart:252-258 | bitwindow/lib/pages/chat_page.dart:602-608 — 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 `bitassets/lib/widgets/asset_issuance_wizard.dart:252` it does not close everything it opens, so those 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) bitwindow/lib/pages/settings/settings_network.dart:316 — bitwindow/lib/pages/settings/settings_network.dart:316-322 | bitwindow/lib/pages/settings/settings_node_mode.dart:122-128 — 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 `bitwindow/lib/pages/settings/settings_network.dart:316` 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) bitwindow/lib/pages/wallet/check_detail_page.dart:95 — bitwindow/lib/pages/wallet/check_detail_page.dart:95-101 | bitwindow/lib/widgets/airgap_psbt_dialog.dart:47-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) bitwindow/lib/widgets/fork_countdown_timer.dart:81 — bitwindow/lib/widgets/fork_countdown_timer.dart:81-87 | sail_ui/lib/widgets/containers/notification_banner.dart:189-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/fork_countdown_timer.dart:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) sail_ui/lib/widgets/components/sail_area_chart.dart:78 — sail_ui/lib/widgets/components/sail_area_chart.dart:78-84 | truthcoin/lib/widgets/price_chart.dart:66-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) sail_ui/lib/widgets/config_editor/configurator_panel.dart:75 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:75-81 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:57-63 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:480 — sidechain_core/lib/rpcs/bitassets_rpc.dart:480-486 | sidechain_core/lib/rpcs/bitnames_rpc.dart:599-605 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 `sidechain_core/lib/rpcs/bitassets_rpc.dart: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 (7 lines × 2) bitwindow/lib/pages/settings_page.dart:20 — bitwindow/lib/pages/settings_page.dart:20-26 | sail_ui/lib/shell/sidechain_settings_page.dart:14-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:609 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:609-615 | zside/lib/widgets/homepage_widget_catalog.dart:774-780 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 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) sail_ui/lib/widgets/config_editor/configurator_panel.dart:39 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:39-45 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:34-40 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) sail_ui/lib/widgets/config_editor/working_config_panel.dart:25 — sail_ui/lib/widgets/config_editor/working_config_panel.dart:25-31 | sail_ui/lib/widgets/enforcer_config_editor/working_config_panel.dart:25-31 — `sail_ui/lib/widgets/config_editor/working_config_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/working_config_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 77 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `BitcoinConfigEditorViewModel` in one and `EnforcerConfigEditorViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) sail_ui/lib/widgets/containers/edit_wallet_dialog.dart:71 — sail_ui/lib/widgets/containers/edit_wallet_dialog.dart:71-77 | sail_ui/lib/widgets/containers/rename_wallet_dialog.dart:25-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:818 — sidechain_core/lib/rpcs/bitassets_rpc.dart:818-824 | sidechain_core/lib/rpcs/bitnames_rpc.dart:395-401 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (7 lines × 2) sidechain_core/lib/models/bitcoin_config_options.dart:1232 — sidechain_core/lib/models/bitcoin_config_options.dart:1232-1238 | sidechain_core/lib/models/enforcer_config_options.dart:319-325 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) bitwindow/server/api/bitwindowd/bitwindowd.go:773 — bitwindow/server/api/bitwindowd/bitwindowd.go:773-779 | bitwindow/server/api/bitwindowd/bitwindowd.go:1046-1053 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/api/bitwindowd/bitwindowd.go:773` it does not close everything it opens, so those 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) coinnews/server/api/api.go:32 — coinnews/server/api/api.go:32-38 | coinnews/server/api/api.go:44-50 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) sidechain-orchestrator/api/orchestrator_handler.go:1212 — sidechain-orchestrator/api/orchestrator_handler.go:1212-1218 | sidechain-orchestrator/bitcoind_rpc.go:85-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 `sidechain-orchestrator/api/orchestrator_handler.go:1212` it does not close everything it opens, so those 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) sidechain-orchestrator/engines/bmmstate/store.go:156 — sidechain-orchestrator/engines/bmmstate/store.go:156-163 | sidechain-orchestrator/engines/bmmstate/store.go:173-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/engines/bmmstate/store.go:156` it does not close everything it opens, so those 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.
  • Duplicated block (7 lines × 2) sidechain-orchestrator/sidechain/bitassets/handler.go:88 — sidechain-orchestrator/sidechain/bitassets/handler.go:88-94 | sidechain-orchestrator/sidechain/bitnames/handler.go:83-89 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) sidechain-orchestrator/sidechain/bitassets/handler.go:289 — sidechain-orchestrator/sidechain/bitassets/handler.go:289-295 | sidechain-orchestrator/sidechain/bitnames/handler.go:263-269 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) sidechain-orchestrator/sidechain/bitassets/handler.go:341 — sidechain-orchestrator/sidechain/bitassets/handler.go:341-347 | sidechain-orchestrator/sidechain/truthcoin/handler.go:621-627 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/truthcoin/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 28 separate duplicated blocks between them, totalling at least 208 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) sidechain-orchestrator/sidechain/photon/handler.go:78 — sidechain-orchestrator/sidechain/photon/handler.go:78-84 | sidechain-orchestrator/sidechain/truthcoin/handler.go:84-90 — `sidechain-orchestrator/sidechain/photon/handler.go` and `sidechain-orchestrator/sidechain/truthcoin/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 23 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) sidechain-orchestrator/config/enforcer_conf.go:267 — sidechain-orchestrator/config/enforcer_conf.go:267-273 | sidechain-orchestrator/config/sidechain_conf.go:354-360 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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.
  • + 19 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×36
  • ClassTooLong: Orchestrator REDACTED:138 — ClassTooLong — 1747 significant lines (blank, comment-only and punctuation-only lines excluded), 287 methods, 103 blocks, lines 138-4272. The bar is 400 significant lines; this is 1347 over it, 4.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: ElectrumBackend sidechain-orchestrator/wallet/electrum_backend.go:87 — ClassTooLong — 1591 significant lines (blank, comment-only and punctuation-only lines excluded), 97 methods, 86 blocks, lines 87-3410. The bar is 400 significant lines; this is 1191 over it, 3.98× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SailSVGAsset sail_ui/lib/widgets/core/sail_svg.dart:5 — ClassTooLong — 1564 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 1164 over it, 3.91× 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: WalletHandler sidechain-orchestrator/api/wallet_handler.go:71 — ClassTooLong — 1342 significant lines (blank, comment-only and punctuation-only lines excluded), 114 methods, 82 blocks, lines 71-2533. The bar is 400 significant lines; this is 942 over it, 3.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Service sidechain-orchestrator/wallet/service.go:33 — ClassTooLong — 1183 significant lines (blank, comment-only and punctuation-only lines excluded), 142 methods, 91 blocks, lines 33-2277. The bar is 400 significant lines; this is 783 over it, 2.96× 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: CoreBackend sidechain-orchestrator/wallet/core_backend.go:41 — ClassTooLong — 1022 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods, 57 blocks, lines 41-2115. The bar is 400 significant lines; this is 622 over it, 2.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: BitcoinConfigOptions sidechain_core/lib/models/bitcoin_config_options.dart:42 — ClassTooLong — 1015 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 615 over it, 2.54× 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: Server bitwindow/server/api/wallet/wallet.go:71 — ClassTooLong — 999 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods, 46 blocks, lines 71-1871. The bar is 400 significant lines; this is 599 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _MultisigConfigStepState REDACTED:272 — ClassTooLong — 948 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 548 over it, 2.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: BmmEngine sidechain-orchestrator/engines/bmm_engine.go:133 — ClassTooLong — 835 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods, 48 blocks, lines 133-1556. The bar is 400 significant lines; this is 435 over it, 2.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Server bitwindow/server/api/bitwindowd/bitwindowd.go:80 — ClassTooLong — 786 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods, 33 blocks, lines 80-1396. The bar is 400 significant lines; this is 386 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _RootPageState bitwindow/lib/pages/root_page.dart:67 — ClassTooLong — 752 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 352 over it, 1.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: ChatProvider bitwindow/lib/providers/chat_provider.dart:15 — ClassTooLong — 716 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 400 significant lines; this is 316 over it, 1.79× 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: SendPageViewModel bitwindow/lib/pages/wallet/wallet_send.dart:820 — ClassTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded), 89 methods. The bar is 400 significant lines; this is 284 over it, 1.71× 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: MultisigLoungeViewModel bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:864 — ClassTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 235 over it, 1.59× 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: Parser bitwindow/server/engines/bitcoind_engine.go:62 — ClassTooLong — 613 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods, 22 blocks, lines 62-1278. The bar is 400 significant lines; this is 213 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.
  • ClassTooLong: Handler sidechain-orchestrator/api/orchestrator_handler.go:29 — ClassTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods, 40 blocks, lines 29-1341. The bar is 400 significant lines; this is 205 over it, 1.51× 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: StratumHandler sidechain-orchestrator/api/stratum_handler.go:90 — ClassTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods, 33 blocks, lines 90-1157. The bar is 400 significant lines; this is 196 over it, 1.49× 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: _WalletBackupPageState bitwindow/lib/pages/welcome/wallet_backup_page.dart:43 — ClassTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 194 over it, 1.49× 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: BMMHandler sidechain-orchestrator/api/bmm_handler.go:87 — ClassTooLong — 565 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods, 36 blocks, lines 87-1253. The bar is 400 significant lines; this is 165 over it, 1.41× 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: OrchestratorWalletRPC sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:28 — ClassTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded), 76 methods. The bar is 400 significant lines; this is 164 over it, 1.41× 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: _DraftPanelState bitwindow/lib/widgets/draft_panel.dart:36 — ClassTooLong — 548 significant lines (blank, comment-only and punctuation-only lines excluded), 50 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: Server sidechain-orchestrator/stratum/server.go:43 — ClassTooLong — 547 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods, 25 blocks, lines 43-934. The bar is 400 significant lines; this is 147 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: SidechainsViewModel bitwindow/lib/pages/sidechains_page.dart:1125 — ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 128 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: _SailCreateWalletPageState sail_ui/lib/pages/create_wallet_page.dart:57 — ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 128 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.
  • + 11 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×31
  • Duplicated block (10 lines × 2) bitassets/lib/pages/tabs/reserve_register_page.dart:648 — bitassets/lib/pages/tabs/reserve_register_page.dart:648-657 | bitnames/lib/pages/tabs/reserve_register_page.dart:704-713 — before extracting anything, compare `bitassets/lib/pages/tabs/reserve_register_page.dart` and `bitnames/lib/pages/tabs/reserve_register_page.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/pages/tabs/reserve_register_page.dart:648` 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) bitnames/lib/pages/tabs/reserve_register_page.dart:73 — bitnames/lib/pages/tabs/reserve_register_page.dart:73-82 | bitnames/lib/pages/tabs/reserve_register_page.dart:380-389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitnames/lib/pages/tabs/reserve_register_page.dart: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 (10 lines × 2) bitnames/lib/pages/tabs/reserve_register_page.dart:102 — bitnames/lib/pages/tabs/reserve_register_page.dart:102-111 | bitnames/lib/pages/tabs/reserve_register_page.dart:409-418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitnames/lib/pages/tabs/reserve_register_page.dart:102` 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 (10 lines × 2) bitwindow/lib/dialogs/merkle_tree_dialog.dart:350 — bitwindow/lib/dialogs/merkle_tree_dialog.dart:350-359 | bitwindow/lib/dialogs/paper_check_dialog.dart:288-297 — 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 `bitwindow/lib/dialogs/merkle_tree_dialog.dart:350` it does not close everything it opens, so those 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) bitwindow/lib/pages/root_page.dart:284 — bitwindow/lib/pages/root_page.dart:284-293 | bitwindow/lib/pages/root_page.dart:833-842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/root_page.dart:284` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) bitwindow/lib/pages/wallet/denability_page.dart:83 — bitwindow/lib/pages/wallet/denability_page.dart:83-92 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:689-698 — before extracting anything, compare `bitwindow/lib/pages/wallet/denability_page.dart` and `zside/lib/pages/tabs/zside/zside_melt_cast_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 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 `bitwindow/lib/pages/wallet/denability_page.dart:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) bitwindow/lib/pages/welcome/wallet_backup_page.dart:688 — bitwindow/lib/pages/welcome/wallet_backup_page.dart:688-697 | bitwindow/lib/pages/welcome/wallet_backup_page.dart:750-759 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) bitwindow/lib/widgets/coinnews.dart:901 — bitwindow/lib/widgets/coinnews.dart:901-910 | bitwindow/lib/widgets/fee_coinnews.dart:362-371 — before extracting anything, compare `bitwindow/lib/widgets/coinnews.dart` and `bitwindow/lib/widgets/fee_coinnews.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 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 `bitwindow/lib/widgets/coinnews.dart:901` it does not close everything it opens, so those 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, `bitwindow/lib/widgets/coinnews.dart:911` calls `tryParse` and `bitwindow/lib/widgets/fee_coinnews.dart:372` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) bitwindow/lib/widgets/combine_broadcast_modal.dart:298 — bitwindow/lib/widgets/combine_broadcast_modal.dart:298-307 | bitwindow/lib/widgets/import_psbt_modal.dart:478-487 — 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 `bitwindow/lib/widgets/combine_broadcast_modal.dart:298` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) bitwindow/lib/widgets/create_multisig_modal.dart:337 — bitwindow/lib/widgets/create_multisig_modal.dart:337-346 | bitwindow/lib/widgets/create_multisig_modal.dart:1010-1019 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/create_multisig_modal.dart:337` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) sail_ui/lib/widgets/core/sail_text.dart:146 — sail_ui/lib/widgets/core/sail_text.dart:146-155 | sail_ui/lib/widgets/core/sail_text.dart:229-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/core/sail_text.dart:146` 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) sail_ui/lib/widgets/feedback/sail_toast.dart:249 — sail_ui/lib/widgets/feedback/sail_toast.dart:249-258 | sail_ui/lib/widgets/feedback/sail_toast.dart:264-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/feedback/sail_toast.dart:249` it does not close everything it opens, so those 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) sidechain_core/lib/providers/binaries/managers/process_manager.dart:204 — sidechain_core/lib/providers/binaries/managers/process_manager.dart:204-213 | sidechain_core/lib/providers/binaries/managers/process_manager.dart:241-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain_core/lib/providers/binaries/managers/process_manager.dart:204` 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) zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:24 — zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:24-33 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:193-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:24` it does not close everything it opens, so those 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) photon/lib/pages/tabs/transaction_builder_page.dart:309 — photon/lib/pages/tabs/transaction_builder_page.dart:309-318 | sail_ui/lib/pages/sidechains/parent_chain_page.dart:441-450 — 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) sail_ui/lib/pages/sidechains/parent_chain_page.dart:239 — sail_ui/lib/pages/sidechains/parent_chain_page.dart:239-248 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:332-341 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:598 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:598-607 | zside/lib/widgets/homepage_widget_catalog.dart:763-772 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:328 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:328-337 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:109-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) sail_ui/lib/widgets/containers/notification.dart:92 — sail_ui/lib/widgets/containers/notification.dart:92-101 | sail_ui/lib/widgets/nav/notification_bell.dart:182-191 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) bitwindow/server/models/coinnews/store.go:357 — bitwindow/server/models/coinnews/store.go:357-366 | coinnews/server/store/store.go:306-315 — before extracting anything, compare `bitwindow/server/models/coinnews/store.go` and `coinnews/server/store/store.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 113 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 `bitwindow/server/models/coinnews/store.go:357` 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 lines × 2) sidechain-orchestrator/api/explorer_core.go:164 — sidechain-orchestrator/api/explorer_core.go:164-173 | sidechain-orchestrator/sidechain/mempool.go:170-179 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) sidechain-orchestrator/api/multisiglounge_handler.go:647 — sidechain-orchestrator/api/multisiglounge_handler.go:647-656 | sidechain-orchestrator/api/multisiglounge_handler.go:722-731 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/api/multisiglounge_handler.go:647` it does not close everything it opens, so those 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) sidechain-orchestrator/api/orchestrator_handler.go:1200 — sidechain-orchestrator/api/orchestrator_handler.go:1200-1209 | sidechain-orchestrator/bitcoind_rpc.go:63-72 — 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. 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 (10 lines × 2) sidechain-orchestrator/api/wallet_handler.go:193 — sidechain-orchestrator/api/wallet_handler.go:193-202 | sidechain-orchestrator/api/wallet_handler.go:2105-2114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/api/wallet_handler.go:193` it does not close everything it opens, so those 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) sidechain-orchestrator/reject_block.go:87 — sidechain-orchestrator/reject_block.go:87-96 | sidechain-orchestrator/reject_block.go:123-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/reject_block.go:87` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `sidechain-orchestrator/reject_block.go:81` calls `Int` and `sidechain-orchestrator/reject_block.go:120` 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.
  • + 6 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×31
  • Swallowed exception (caught, then discarded) truthcoin/lib/pages/voting_dashboard_page.dart:811 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/utils/shared_log_tail.dart:109 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/settings/hash_plaintext_settings.dart:57 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/settings/homepage_configuration_setting.dart:17 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/providers/wallet_reader_provider.dart:353 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/providers/window_provider.dart:361 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/providers/binaries/managers/process_manager.dart:495 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/models/bitcoin_config_options.dart:1235 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/models/enforcer_config_options.dart:322 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/config/backend_sidechain_runtime.dart:141 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/config/binaries.dart:1212 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/config/binaries.dart:1225 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain_core/lib/auth/local_auth.dart:69 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/config_loader.go:347 — `if err := json.Unmarshal(raw, &entry); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/config_loader.go:364 — `if err := json.Unmarshal(raw, &entry); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/config_loader.go:387 — `if err := json.Unmarshal(raw, &entry); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/datadir_network.go:217 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/datadir_network.go:221 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:515 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:519 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/ecash_switch.go:548 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/fork.go:36 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/logtail.go:63 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/logtail.go:79 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) sidechain-orchestrator/logtail.go:100 — `if readErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×27
  • Duplicated block (9 lines × 2) bitassets/lib/pages/tabs/reserve_register_page.dart:624 — bitassets/lib/pages/tabs/reserve_register_page.dart:624-632 | bitnames/lib/pages/tabs/reserve_register_page.dart:680-688 — before extracting anything, compare `bitassets/lib/pages/tabs/reserve_register_page.dart` and `bitnames/lib/pages/tabs/reserve_register_page.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/pages/tabs/reserve_register_page.dart:624` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:692 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:692-700 | bitwindow/lib/pages/explorer/load_transaction_dialog.dart:298-306 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/explorer/block_explorer_dialog.dart:692` 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) bitwindow/lib/pages/explorer/load_transaction_dialog.dart:274 — bitwindow/lib/pages/explorer/load_transaction_dialog.dart:274-282 | sail_ui/lib/pages/sidechains/bmm_tab.dart:897-905 — 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 `bitwindow/lib/pages/explorer/load_transaction_dialog.dart:274` it does not close everything it opens, so those 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) bitwindow/lib/pages/wallet/create_timestamp_page.dart:162 — bitwindow/lib/pages/wallet/create_timestamp_page.dart:162-170 | bitwindow/lib/pages/wallet/verify_timestamp_page.dart:130-138 — before extracting anything, compare `bitwindow/lib/pages/wallet/create_timestamp_page.dart` and `bitwindow/lib/pages/wallet/verify_timestamp_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/create_timestamp_page.dart:162` 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) bitwindow/lib/pages/wallet/wallet_overview.dart:196 — bitwindow/lib/pages/wallet/wallet_overview.dart:196-204 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:395-403 — before extracting anything, compare `bitwindow/lib/pages/wallet/wallet_overview.dart` and `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 (9 lines × 2) bitwindow/lib/widgets/import_psbt_modal.dart:541 — bitwindow/lib/widgets/import_psbt_modal.dart:541-550 | bitwindow/lib/widgets/psbt_coordinator_modal.dart:131-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/import_psbt_modal.dart:541` it does not close everything it opens, so those 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) sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart:102 — sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart:102-110 | truthcoin/lib/pages/voting_dashboard_page.dart:378-386 — 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 `sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) sail_ui/lib/shell/sidechain_conf_editor_page.dart:278 — sail_ui/lib/shell/sidechain_conf_editor_page.dart:278-286 | sail_ui/lib/shell/sidechain_conf_editor_page.dart:289-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/shell/sidechain_conf_editor_page.dart:278` 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) sail_ui/lib/widgets/config_editor/configurator_panel.dart:167 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:167-175 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:129-137 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/config_editor/configurator_panel.dart:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) sail_ui/lib/widgets/inputs/dropdown_menu.dart:348 — sail_ui/lib/widgets/inputs/dropdown_menu.dart:348-356 | sail_ui/lib/widgets/inputs/dropdown_menu.dart:643-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) sidechain_core/lib/rpcs/coinshift_rpc.dart:475 — sidechain_core/lib/rpcs/coinshift_rpc.dart:475-483 | sidechain_core/lib/rpcs/coinshift_rpc.dart:626-634 — both copies are in the same file, so extract the 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) truthcoin/lib/pages/market_detail_page.dart:985 — truthcoin/lib/pages/market_detail_page.dart:985-993 | truthcoin/lib/widgets/market_card.dart:287-295 — 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 `truthcoin/lib/pages/market_detail_page.dart:985` it does not close everything it opens, so those 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) truthcoin/lib/widgets/homepage_widget_catalog.dart:529 — truthcoin/lib/widgets/homepage_widget_catalog.dart:529-537 | truthcoin/lib/widgets/trading_position_widget.dart:232-240 — before extracting anything, compare `truthcoin/lib/widgets/homepage_widget_catalog.dart` and `truthcoin/lib/widgets/trading_position_widget.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 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 `truthcoin/lib/widgets/homepage_widget_catalog.dart:529` it does not close everything it opens, so those 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) bitassets/lib/widgets/amm_analytics_widget.dart:420 — bitassets/lib/widgets/amm_analytics_widget.dart:420-428 | bitassets/lib/widgets/amm_analytics_widget.dart:542-550 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/widgets/amm_analytics_widget.dart:542` 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 (9 lines × 2) bitwindow/lib/providers/mempool_provider.dart:107 — bitwindow/lib/providers/mempool_provider.dart:107-115 | bitwindow/lib/providers/network_provider.dart:89-97 — 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) bitwindow/lib/pages/overview_page.dart:1594 — bitwindow/lib/pages/overview_page.dart:1594-1602 | bitwindow/lib/widgets/coinnews.dart:575-584 — 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) bitwindow/server/api/bitwindowd/bitwindowd.go:515 — bitwindow/server/api/bitwindowd/bitwindowd.go:515-523 | bitwindow/server/api/bitwindowd/bitwindowd.go:527-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 `bitwindow/server/api/bitwindowd/bitwindowd.go:515` 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 (9 lines × 2) bitwindow/server/drivechain/utils.go:32 — bitwindow/server/drivechain/utils.go:32-40 | bitwindow/server/drivechain/utils.go:46-54 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/drivechain/utils.go:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) REDACTED:634 — REDACTED:634-642 | REDACTED:674-682 — both copies are in the same file, so extract the 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, `REDACTED:644` calls `Int` and `REDACTED:684` 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) sidechain-orchestrator/api/explorer_cache.go:65 — sidechain-orchestrator/api/explorer_cache.go:65-73 | sidechain-orchestrator/api/explorer_cache.go:120-128 — both copies are in the same file, so extract the 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.
  • Duplicated block (9 lines × 2) sidechain-orchestrator/api/explorer_core.go:371 — sidechain-orchestrator/api/explorer_core.go:371-379 | sidechain-orchestrator/api/explorer_handler.go:237-245 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) sidechain-orchestrator/corewalletfile/convert.go:724 — sidechain-orchestrator/corewalletfile/convert.go:724-732 | sidechain-orchestrator/walletfile/walletfile.go:266-274 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `sidechain-orchestrator/corewalletfile/convert.go:723` calls `Name` and `sidechain-orchestrator/walletfile/walletfile.go:265` 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) sidechain-orchestrator/sidechain/bitnames/types.go:47 — sidechain-orchestrator/sidechain/bitnames/types.go:47-55 | sidechain-orchestrator/sidechain/bitnames/types.go:172-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) sidechain-orchestrator/wallet/electrum_backend.go:2413 — sidechain-orchestrator/wallet/electrum_backend.go:2413-2421 | sidechain-orchestrator/wallet/electrum_backend.go:2426-2434 — both copies are in the same file, so extract the 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) sidechain-orchestrator/wallet/multisiglounge.go:491 — sidechain-orchestrator/wallet/multisiglounge.go:491-499 | REDACTED:371-379 — 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 `sidechain-orchestrator/wallet/multisiglounge.go:491` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×26
  • Duplicated block (5 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:404 — sidechain_core/lib/rpcs/bitassets_rpc.dart:404-408 | sidechain_core/lib/rpcs/bitnames_rpc.dart:342-346 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:472 — sidechain_core/lib/rpcs/bitassets_rpc.dart:472-476 | sidechain_core/lib/rpcs/bitnames_rpc.dart:591-595 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 2) truthcoin/lib/models/market.dart:359 — truthcoin/lib/models/market.dart:359-363 | truthcoin/lib/models/voting.dart:429-433 — 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) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:584 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:584-588 | zside/lib/widgets/homepage_widget_catalog.dart:749-753 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 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 (5 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:449 — sidechain_core/lib/rpcs/bitassets_rpc.dart:449-453 | sidechain_core/lib/rpcs/bitnames_rpc.dart:492-496 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:861 — sidechain_core/lib/rpcs/bitassets_rpc.dart:861-865 | sidechain_core/lib/rpcs/bitnames_rpc.dart:427-431 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 2) bitwindow/lib/providers/mempool_watch_provider.dart:48 — bitwindow/lib/providers/mempool_watch_provider.dart:48-52 | bitwindow/lib/providers/mining_pools_provider.dart:29-33 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:425 — sidechain_core/lib/rpcs/bitassets_rpc.dart:425-429 | sidechain_core/lib/rpcs/bitnames_rpc.dart:362-366 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 2) bitwindow/lib/pages/mining/mining_tab.dart:644 — bitwindow/lib/pages/mining/mining_tab.dart:644-648 | bitwindow/lib/pages/mining/mining_tab.dart:680-684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/mining/mining_tab.dart:644` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `block` to `FoundBlock` in one and `PoolBlock` 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) bitwindow/server/api/bitwindowd/bitwindowd.go:778 — bitwindow/server/api/bitwindowd/bitwindowd.go:778-782 | bitwindow/server/api/bitwindowd/bitwindowd.go:939-951 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/api/bitwindowd/bitwindowd.go:778` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) sidechain-orchestrator/api/explorer_core.go:31 — sidechain-orchestrator/api/explorer_core.go:31-35 | sidechain-orchestrator/api/explorer_handler.go:226-230 — 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) sidechain-orchestrator/config/enforcer_conf.go:175 — sidechain-orchestrator/config/enforcer_conf.go:175-179 | sidechain-orchestrator/config/sidechain_conf.go:479-483 — 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 `sidechain-orchestrator/config/enforcer_conf.go: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `sidechain-orchestrator/config/enforcer_conf.go:174` calls `convertNetworkPreset` and `sidechain-orchestrator/config/sidechain_conf.go:478` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) sidechain-orchestrator/rpc/client.go:123 — sidechain-orchestrator/rpc/client.go:123-127 | sidechain-orchestrator/rpc/client.go:173-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/rpc/client.go: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. 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 (5 lines × 2) sidechain-orchestrator/sidechain/truthcoin/handler.go:559 — sidechain-orchestrator/sidechain/truthcoin/handler.go:559-563 | sidechain-orchestrator/sidechain/truthcoin/handler.go:585-589 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) sidechain-orchestrator/wallet/service.go:1178 — sidechain-orchestrator/wallet/service.go:1178-1182 | sidechain-orchestrator/wallet/service.go:1341-1345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/wallet/service.go:1178` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) REDACTED:774 — REDACTED:774-778 | sidechain-orchestrator/wallet/esplora.go:169-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. 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 (5 lines × 2) bitwindow/server/api/misc/misc.go:106 — bitwindow/server/api/misc/misc.go:106-110 | bitwindow/server/api/misc/misc.go:214-219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/api/misc/misc.go:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) sidechain-orchestrator/commands/wallet_burn_ecx.go:297 — sidechain-orchestrator/commands/wallet_burn_ecx.go:297-301 | sidechain-orchestrator/commands/wallet_sign_psbt.go:123-127 — 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 `sidechain-orchestrator/commands/wallet_burn_ecx.go:297` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) sidechain-orchestrator/api/explorer_handler.go:484 — sidechain-orchestrator/api/explorer_handler.go:484-488 | sidechain-orchestrator/api/explorer_handler.go:665-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) sidechain-orchestrator/sidechain/mempool.go:450 — sidechain-orchestrator/sidechain/mempool.go:450-454 | sidechain-orchestrator/sidechain/mempool.go:473-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 `sidechain-orchestrator/sidechain/mempool.go:450` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) REDACTED:318 — REDACTED:318-322 | REDACTED:335-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:318` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) bitwindow/server/models/coinnews/store.go:175 — bitwindow/server/models/coinnews/store.go:175-179 | coinnews/server/store/store.go:151-155 — before extracting anything, compare `bitwindow/server/models/coinnews/store.go` and `coinnews/server/store/store.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 113 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 `bitwindow/server/models/coinnews/store.go: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.
  • Duplicated block (5 lines × 2) sidechain-orchestrator/bitcoind_rpc.go:54 — sidechain-orchestrator/bitcoind_rpc.go:54-58 | sidechain-orchestrator/wallet/core_rpc.go:124-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) sidechain-orchestrator/stratum/cpu.go:298 — sidechain-orchestrator/stratum/cpu.go:298-302 | sidechain-orchestrator/stratum/pool.go:402-406 — 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) sidechain-orchestrator/ecash_migration.go:1009 — sidechain-orchestrator/ecash_migration.go:1009-1013 | sidechain-orchestrator/ecash_migration.go:1229-1233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×25
  • Duplicated block (12 lines × 2) bitassets/lib/pages/tabs/reserve_register_page.dart:634 — bitassets/lib/pages/tabs/reserve_register_page.dart:634-645 | bitnames/lib/pages/tabs/reserve_register_page.dart:690-701 — before extracting anything, compare `bitassets/lib/pages/tabs/reserve_register_page.dart` and `bitnames/lib/pages/tabs/reserve_register_page.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/pages/tabs/reserve_register_page.dart:634` 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 (12 lines × 2) bitassets/lib/widgets/asset_issuance_wizard.dart:169 — bitassets/lib/widgets/asset_issuance_wizard.dart:169-180 | bitassets/lib/widgets/asset_issuance_wizard.dart:243-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/widgets/asset_issuance_wizard.dart:169` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) bitwindow/lib/dialogs/change_password_dialog.dart:156 — bitwindow/lib/dialogs/change_password_dialog.dart:156-167 | bitwindow/lib/dialogs/encrypt_wallet_dialog.dart:148-159 — 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 `bitwindow/lib/dialogs/change_password_dialog.dart:156` 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) bitwindow/lib/dialogs/network_statistics_dialog.dart:323 — bitwindow/lib/dialogs/network_statistics_dialog.dart:323-334 | bitwindow/lib/widgets/traffic_graph_widget.dart:176-187 — before extracting anything, compare `bitwindow/lib/dialogs/network_statistics_dialog.dart` and `bitwindow/lib/widgets/traffic_graph_widget.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bitwindow/lib/dialogs/network_statistics_dialog.dart:323` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) bitwindow/lib/pages/wallet/wallet_overview.dart:582 — bitwindow/lib/pages/wallet/wallet_overview.dart:582-593 | bitwindow/lib/providers/transactions_provider.dart:197-208 — 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 `bitwindow/lib/pages/wallet/wallet_overview.dart:582` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) bitwindow/lib/pages/wallet/wallet_overview.dart:662 — bitwindow/lib/pages/wallet/wallet_overview.dart:662-673 | bitwindow/lib/pages/wallet/wallet_receive.dart:518-529 — 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 `bitwindow/lib/pages/wallet/wallet_overview.dart:662` 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) bitwindow/lib/widgets/coinnews.dart:851 — bitwindow/lib/widgets/coinnews.dart:851-862 | bitwindow/lib/widgets/fee_coinnews.dart:333-344 — before extracting anything, compare `bitwindow/lib/widgets/coinnews.dart` and `bitwindow/lib/widgets/fee_coinnews.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 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 `bitwindow/lib/widgets/coinnews.dart:851` it does not close everything it opens, so those 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) coinshift/lib/widgets/liquidity_monitor_widget.dart:316 — coinshift/lib/widgets/liquidity_monitor_widget.dart:316-327 | truthcoin/lib/pages/market_detail_page.dart:1021-1032 — 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 `coinshift/lib/widgets/liquidity_monitor_widget.dart:316` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) coinshift/lib/widgets/swap/swap_list.dart:587 — coinshift/lib/widgets/swap/swap_list.dart:587-598 | coinshift/lib/widgets/swap/swap_list.dart:613-624 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `coinshift/lib/widgets/swap/swap_list.dart:587` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) sail_ui/lib/pages/l1_restart_page.dart:135 — sail_ui/lib/pages/l1_restart_page.dart:135-146 | sail_ui/lib/pages/utxo_snapshot_page.dart:164-175 — before extracting anything, compare `sail_ui/lib/pages/l1_restart_page.dart` and `sail_ui/lib/pages/utxo_snapshot_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 113 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 `sail_ui/lib/pages/l1_restart_page.dart:135` it does not close everything it opens, so those 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) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:493 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:493-504 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:476-487 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/pages/tabs/zside/zside_transfer_page.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 66 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 `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:493` it does not close everything it opens, so those 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) sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:68 — sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:68-79 | sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart:68-79 — 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 `sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) sail_ui/lib/shell/sidechain_home_page.dart:242 — sail_ui/lib/shell/sidechain_home_page.dart:242-253 | sail_ui/lib/shell/sidechain_home_page.dart:258-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/shell/sidechain_home_page.dart:242` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `label` to `'Font Settings'` in one and `'Bitcoin Unit Settings'` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 2) sail_ui/lib/widgets/homepage/homepage_builder.dart:120 — sail_ui/lib/widgets/homepage/homepage_builder.dart:120-131 | sail_ui/lib/widgets/homepage/homepage_builder.dart:155-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/homepage/homepage_builder.dart: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 (12 lines × 2) sail_ui/lib/widgets/inputs/checkbox.dart:46 — sail_ui/lib/widgets/inputs/checkbox.dart:46-57 | sail_ui/lib/widgets/inputs/checkbox.dart:81-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/inputs/checkbox.dart:46` it does not close everything it opens, so those 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) sail_ui/lib/widgets/inputs/radio_button.dart:48 — sail_ui/lib/widgets/inputs/radio_button.dart:48-59 | sail_ui/lib/widgets/inputs/radio_button.dart:93-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/inputs/radio_button.dart:48` it does not close everything it opens, so those 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) sail_ui/lib/widgets/transaction_byte_parser.dart:252 — sail_ui/lib/widgets/transaction_byte_parser.dart:252-263 | sail_ui/lib/widgets/transaction_byte_parser.dart:266-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) truthcoin/lib/widgets/homepage_widget_catalog.dart:432 — truthcoin/lib/widgets/homepage_widget_catalog.dart:432-443 | truthcoin/lib/widgets/trading_position_widget.dart:235-246 — before extracting anything, compare `truthcoin/lib/widgets/homepage_widget_catalog.dart` and `truthcoin/lib/widgets/trading_position_widget.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 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 `truthcoin/lib/widgets/homepage_widget_catalog.dart: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `truthcoin/lib/widgets/trading_position_widget.dart:234` calls `of` and `truthcoin/lib/widgets/homepage_widget_catalog.dart:431` 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) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:683 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:683-694 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:741-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:683` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:101 — zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:101-112 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:265-276 — both copies are in the same file, so extract the 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) sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart:233 — sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart:233-247 | sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart:144-155 — 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) bitwindow/server/engines/notification_engine.go:76 — bitwindow/server/engines/notification_engine.go:76-87 | bitwindow/server/engines/notification_engine.go:189-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/engines/notification_engine.go:76` it does not close everything it opens, so those 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.
  • Duplicated block (12 lines × 2) bitwindow/server/engines/notification_engine.go:341 — bitwindow/server/engines/notification_engine.go:341-352 | bitwindow/server/engines/notification_engine.go:365-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/engines/notification_engine.go:341` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) sidechain-orchestrator/api/bmm_cancel.go:150 — sidechain-orchestrator/api/bmm_cancel.go:150-161 | sidechain-orchestrator/wallet/core_rpc.go:810-821 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) sidechain-orchestrator/wallet/decode.go:269 — sidechain-orchestrator/wallet/decode.go:269-280 | sidechain-orchestrator/wallet/psbt.go:311-322 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×22
  • Duplicated block (8 lines × 2) bitassets/lib/pages/tabs/reserve_register_page.dart:99 — bitassets/lib/pages/tabs/reserve_register_page.dart:99-106 | bitassets/lib/pages/tabs/reserve_register_page.dart:353-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/pages/tabs/reserve_register_page.dart:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:671 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:671-678 | bitwindow/lib/pages/explorer/block_explorer_dialog.dart:750-757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/explorer/block_explorer_dialog.dart:671` it does not close everything it opens, so those 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) bitwindow/lib/signing/psbt_signer.dart:77 — bitwindow/lib/signing/psbt_signer.dart:77-84 | bitwindow/lib/widgets/draft_panel.dart:195-202 — 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 `bitwindow/lib/signing/psbt_signer.dart:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) bitwindow/lib/widgets/fund_group_modal.dart:71 — bitwindow/lib/widgets/fund_group_modal.dart:71-78 | bitwindow/lib/widgets/psbt_coordinator_modal.dart:136-143 — 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 `bitwindow/lib/widgets/fund_group_modal.dart:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bitwindow/lib/widgets/psbt_coordinator_modal.dart:144` calls `secondary12` and `bitwindow/lib/widgets/fund_group_modal.dart:79` 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) sidechain_core/lib/config/binaries.dart:1286 — sidechain_core/lib/config/binaries.dart:1286-1293 | sidechain_core/lib/config/binaries.dart:1418-1425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain_core/lib/config/binaries.dart:1286` it does not close everything it opens, so those 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:505 — sidechain_core/lib/rpcs/bitassets_rpc.dart:505-512 | sidechain_core/lib/rpcs/bitnames_rpc.dart:618-625 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (8 lines × 2) truthcoin/lib/widgets/trading_position_widget.dart:14 — truthcoin/lib/widgets/trading_position_widget.dart:14-21 | truthcoin/lib/widgets/trading_position_widget.dart:228-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `truthcoin/lib/widgets/trading_position_widget.dart:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) bitwindow/lib/dialogs/paper_check_dialog.dart:136 — bitwindow/lib/dialogs/paper_check_dialog.dart:136-143 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:54-61 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) sidechain_core/lib/providers/balance_provider.dart:174 — sidechain_core/lib/providers/balance_provider.dart:174-181 | sidechain_core/lib/providers/parentchain/parent_chain_provider.dart:80-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:333 — sidechain_core/lib/rpcs/bitassets_rpc.dart:333-340 | sidechain_core/lib/rpcs/bitnames_rpc.dart:260-267 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (8 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:461 — sidechain_core/lib/rpcs/bitassets_rpc.dart:461-468 | sidechain_core/lib/rpcs/bitnames_rpc.dart:580-587 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (8 lines × 2) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:339 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:339-346 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:120-127 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) bitassets/lib/settings/amm_settings.dart:12 — bitassets/lib/settings/amm_settings.dart:12-19 | bitwindow/lib/widgets/coinnews.dart:695-702 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bitwindow/lib/widgets/coinnews.dart:690` calls `PageSizeSetting` and `bitassets/lib/settings/amm_settings.dart:7` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) bitwindow/lib/models/settings.dart:29 — bitwindow/lib/models/settings.dart:29-36 | sidechain_core/lib/settings/bitwindow_settings.dart:41-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) bitwindow/server/api/enforcer/enforcer.go:52 — bitwindow/server/api/enforcer/enforcer.go:52-59 | dc-hub/server/api/validator/api_validator.go:159-166 — before extracting anything, compare `bitwindow/server/api/enforcer/enforcer.go` and `dc-hub/server/api/validator/api_validator.go` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 113 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 (8 lines × 2) bitwindow/server/api/m4/m4.go:79 — bitwindow/server/api/m4/m4.go:79-86 | bitwindow/server/api/m4/m4.go:122-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) REDACTED:2580 — REDACTED:2580-2587 | REDACTED:4207-4214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) sidechain-orchestrator/wallet/electrum_backend.go:1372 — sidechain-orchestrator/wallet/electrum_backend.go:1372-1379 | sidechain-orchestrator/wallet/electrum_backend.go:1527-1534 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) sidechain-orchestrator/wallet/electrum_backend.go:1642 — sidechain-orchestrator/wallet/electrum_backend.go:1642-1649 | sidechain-orchestrator/wallet/signer.go:36-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) sidechain-orchestrator/wallet/scripttype.go:236 — sidechain-orchestrator/wallet/scripttype.go:236-243 | sidechain-orchestrator/wallet/scripttype.go:258-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) bitwindow/server/api/enforcer/enforcer.go:89 — bitwindow/server/api/enforcer/enforcer.go:89-96 | dc-hub/server/api/validator/api_validator.go:196-203 — before extracting anything, compare `bitwindow/server/api/enforcer/enforcer.go` and `dc-hub/server/api/validator/api_validator.go` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 113 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) sidechain-orchestrator/api/ctip_index.go:39 — sidechain-orchestrator/api/ctip_index.go:39-46 | sidechain-orchestrator/wallet/core_rpc.go:133-140 — 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 `sidechain-orchestrator/api/ctip_index.go:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (11 corresponding lines) · ×21
  • Edited copy of a member (11 corresponding lines) bitwindow/lib/pages/wallet/wallet_receive.dart:301 — bitwindow/lib/pages/wallet/wallet_receive.dart:301-413 | bitwindow/lib/widgets/peers_table_widget.dart:145-178 — 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) bitwindow/lib/pages/mining/mining_tab.dart:643 — bitwindow/lib/pages/mining/mining_tab.dart:643-653 | bitwindow/lib/pages/mining/mining_tab.dart:679-690 — 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) sidechain-orchestrator/api/ecash_migration_handler.go:12 — sidechain-orchestrator/api/ecash_migration_handler.go:12-22 | sidechain-orchestrator/api/ecash_migration_handler.go:24-34 — 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) sidechain-orchestrator/sidechain/bitassets/handler.go:250 — sidechain-orchestrator/sidechain/bitassets/handler.go:250-260 | sidechain-orchestrator/sidechain/bitnames/handler.go:231-241 — 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) sidechain_core/lib/rpcs/coinshift_rpc.dart:212 — sidechain_core/lib/rpcs/coinshift_rpc.dart:212-222 | sidechain_core/lib/rpcs/coinshift_rpc.dart:230-240 — 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) sidechain_core/lib/config/binaries.dart:1286 — sidechain_core/lib/config/binaries.dart:1286-1299 | sidechain_core/lib/providers/sync_provider.dart:472-482 — 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) sidechain_core/lib/rpcs/bitwindow_api.dart:1886 — sidechain_core/lib/rpcs/bitwindow_api.dart:1886-1896 | sidechain_core/lib/rpcs/bitwindow_api.dart:1898-1908 — 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) sidechain-orchestrator/sidechain/coinshift/handler.go:293 — sidechain-orchestrator/sidechain/coinshift/handler.go:293-304 | sidechain-orchestrator/sidechain/coinshift/handler.go:334-344 — 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) REDACTED:113 — REDACTED:113-123 | sidechain-orchestrator/commands/wallet.go:27-37 — 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) sidechain-orchestrator/sidechain/truthcoin/handler.go:426 — sidechain-orchestrator/sidechain/truthcoin/handler.go:426-436 | sidechain-orchestrator/sidechain/truthcoin/handler.go:535-546 — 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) sidechain-orchestrator/wallet/core_backend.go:618 — sidechain-orchestrator/wallet/core_backend.go:618-632 | sidechain-orchestrator/wallet/core_rpc.go:756-766 — 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) sidechain-orchestrator/wallet/core_rpc.go:411 — sidechain-orchestrator/wallet/core_rpc.go:411-421 | sidechain-orchestrator/wallet/core_rpc.go:426-436 — 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) sidechain_core/lib/rpcs/zside_rpc.dart:409 — sidechain_core/lib/rpcs/zside_rpc.dart:409-419 | sidechain_core/lib/rpcs/zside_rpc.dart:421-431 — 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) sidechain_core/lib/settings/secure_store.dart:33 — sidechain_core/lib/settings/secure_store.dart:33-43 | sidechain_core/lib/settings/secure_store.dart:45-55 — 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) bitwindow/server/engines/wallet_engine.go:216 — bitwindow/server/engines/wallet_engine.go:216-226 | sidechain-orchestrator/api/explorer_core.go:267-277 — 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) photon/lib/pages/tabs/block_explorer_page.dart:231 — photon/lib/pages/tabs/block_explorer_page.dart:231-241 | photon/lib/pages/tabs/block_explorer_page.dart:291-301 — 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) sidechain-orchestrator/health.go:339 — sidechain-orchestrator/health.go:339-351 | sidechain-orchestrator/wallet/core_rpc.go:895-905 — 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) bitwindow/server/models/opreturns/opreturns.go:417 — bitwindow/server/models/opreturns/opreturns.go:417-427 | bitwindow/server/models/coinnews/identity.go:56-66 — 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) sidechain-orchestrator/api/deposit_balance.go:99 — sidechain-orchestrator/api/deposit_balance.go:99-109 | sidechain-orchestrator/api/multisiglounge_handler.go:911-922 — 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) sidechain-orchestrator/wallet/core_backend.go:783 — sidechain-orchestrator/wallet/core_backend.go:783-794 | sidechain-orchestrator/wallet/core_backend.go:1265-1275 — 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) sidechain-orchestrator/wallet/metadata.go:422 — sidechain-orchestrator/wallet/metadata.go:422-432 | sidechain-orchestrator/wallet/network_chain_source.go:164-174 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×21
  • Edited copy of a member (10 corresponding lines) bitassets/lib/widgets/amm_analytics_widget.dart:419 — bitassets/lib/widgets/amm_analytics_widget.dart:419-428 | bitassets/lib/widgets/amm_analytics_widget.dart:540-550 — 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) sidechain_core/lib/rpcs/coinshift_rpc.dart:417 — sidechain_core/lib/rpcs/coinshift_rpc.dart:417-426 | sidechain_core/lib/rpcs/coinshift_rpc.dart:428-437 — 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) sidechain-orchestrator/engines/deposit_watch_engine.go:152 — sidechain-orchestrator/engines/deposit_watch_engine.go:152-162 | sidechain-orchestrator/engines/deposit_watch_engine.go:165-174 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) sidechain-orchestrator/wallet/service.go:858 — sidechain-orchestrator/wallet/service.go:858-867 | sidechain-orchestrator/wallet/service.go:872-883 — 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) sidechain-orchestrator/api/wallet_handler.go:2469 — sidechain-orchestrator/api/wallet_handler.go:2469-2478 | sidechain-orchestrator/api/wallet_handler.go:2480-2489 — 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) sidechain-orchestrator/api/bid_source_wallet.go:24 — sidechain-orchestrator/api/bid_source_wallet.go:24-36 | sidechain-orchestrator/api/bid_source_wallet.go:183-192 — 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) sidechain-orchestrator/api/orchestrator_handler.go:384 — sidechain-orchestrator/api/orchestrator_handler.go:384-396 | sidechain-orchestrator/api/wallet_handler.go:700-709 — 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) bitwindow/lib/widgets/burn_ecx_card.dart:408 — bitwindow/lib/widgets/burn_ecx_card.dart:408-417 | bitwindow/lib/widgets/fork_mode_banner.dart:397-406 — 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) sidechain_core/lib/providers/window_provider.dart:224 — sidechain_core/lib/providers/window_provider.dart:224-237 | sidechain_core/lib/providers/window_provider.dart:246-255 — 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) sidechain_core/lib/rpcs/zside_rpc.dart:398 — sidechain_core/lib/rpcs/zside_rpc.dart:398-407 | sidechain_core/lib/rpcs/zside_rpc.dart:433-442 — 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) sail_ui/lib/widgets/config_editor/actual_config_panel.dart:90 — sail_ui/lib/widgets/config_editor/actual_config_panel.dart:90-99 | sail_ui/lib/widgets/enforcer_config_editor/actual_config_panel.dart:90-99 — 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) sidechain-orchestrator/sqliteguard/sqliteguard.go:162 — sidechain-orchestrator/sqliteguard/sqliteguard.go:162-171 | sidechain-orchestrator/sqliteguard/sqliteguard.go:218-227 — 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) bitwindow/server/engines/mempool_watch_engine.go:455 — bitwindow/server/engines/mempool_watch_engine.go:455-464 | sidechain-orchestrator/ecash_migration.go:935-947 — 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) bitwindow/lib/widgets/claim_ecx_card.dart:623 — bitwindow/lib/widgets/claim_ecx_card.dart:623-632 | bitwindow/lib/widgets/claim_ecx_card.dart:642-651 — 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) bitwindow/lib/pages/explorer/m4_explorer_page.dart:290 — bitwindow/lib/pages/explorer/m4_explorer_page.dart:290-299 | bitwindow/lib/pages/explorer/m4_explorer_page.dart:301-310 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:1216 — sidechain_core/lib/rpcs/bitwindow_api.dart:1216-1225 | sidechain_core/lib/rpcs/bitwindow_api.dart:1227-1236 — 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) truthcoin/lib/pages/market_creation_page.dart:762 — truthcoin/lib/pages/market_creation_page.dart:762-771 | truthcoin/lib/pages/voting_dashboard_page.dart:784-793 — 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) sail_ui/lib/widgets/config_editor/configurator_panel.dart:454 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:454-463 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:324-335 — 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) sidechain-orchestrator/wallet/electrum_own_outputs.go:126 — sidechain-orchestrator/wallet/electrum_own_outputs.go:126-137 | sidechain-orchestrator/process.go:736-745 — 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) bitwindow/server/models/preferences/preferences.go:17 — bitwindow/server/models/preferences/preferences.go:17-26 | bitwindow/server/models/utxometadata/utxometadata.go:21-33 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) bitwindow/server/api/drivechain/drivechain.go:54 — bitwindow/server/api/drivechain/drivechain.go:54-63 | bitwindow/server/api/enforcer/enforcer.go:31-41 — 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×20
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×20
  • Edited copy of a member (8 corresponding lines) sidechain-orchestrator/sidechain/truthcoin/handler.go:558 — sidechain-orchestrator/sidechain/truthcoin/handler.go:558-565 | sidechain-orchestrator/sidechain/truthcoin/handler.go:584-591 — 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) truthcoin/lib/models/voting.dart:178 — truthcoin/lib/models/voting.dart:178-185 | truthcoin/lib/models/voting.dart:299-306 — 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) sidechain-orchestrator/sidechain/bitassets/handler.go:382 — sidechain-orchestrator/sidechain/bitassets/handler.go:382-390 | sidechain-orchestrator/sidechain/truthcoin/handler.go:653-660 — 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) bitassets/lib/providers/price_alert_provider.dart:58 — bitassets/lib/providers/price_alert_provider.dart:58-66 | bitassets/lib/providers/price_alert_provider.dart:68-75 — 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) bitwindow/server/models/blocks/processed_blocks.go:125 — bitwindow/server/models/blocks/processed_blocks.go:125-132 | bitwindow/server/models/blocks/processed_blocks.go:136-143 — 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) sidechain-orchestrator/sidechain/bitassets/handler.go:418 — sidechain-orchestrator/sidechain/bitassets/handler.go:418-425 | sidechain-orchestrator/sidechain/bitassets/handler.go:427-434 — 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) truthcoin/lib/models/market.dart:22 — truthcoin/lib/models/market.dart:22-29 | truthcoin/lib/models/voting.dart:35-42 — 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) bitwindow/lib/widgets/fee_coinnews.dart:113 — bitwindow/lib/widgets/fee_coinnews.dart:113-120 | bitwindow/lib/widgets/fee_coinnews.dart:278-285 — 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) sidechain_core/lib/rpcs/truthcoin_rpc.dart:522 — sidechain_core/lib/rpcs/truthcoin_rpc.dart:522-529 | sidechain_core/lib/rpcs/bitnames_rpc.dart:609-616 — 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) bitwindow/server/api/runtime.go:85 — bitwindow/server/api/runtime.go:85-92 | sidechain-orchestrator/cmd/drivechaind/main.go:828-835 — 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) sidechain-orchestrator/wallet/core_backend.go:1280 — sidechain-orchestrator/wallet/core_backend.go:1280-1287 | sidechain-orchestrator/wallet/descriptor.go:574-581 — 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) sail_ui/lib/widgets/inputs/dropdown_menu.dart:55 — sail_ui/lib/widgets/inputs/dropdown_menu.dart:55-62 | sail_ui/lib/widgets/platform_menu.dart:265-272 — 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) bitwindow/server/engines/notification_engine.go:414 — bitwindow/server/engines/notification_engine.go:414-422 | bitwindow/server/engines/zmq_engine.go:110-117 — 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) sail_ui/lib/pages/sidechains/parent_chain_page.dart:119 — sail_ui/lib/pages/sidechains/parent_chain_page.dart:119-126 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:202-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) sidechain_core/lib/providers/balance_provider.dart:183 — sidechain_core/lib/providers/balance_provider.dart:183-191 | sidechain_core/lib/providers/parentchain/parent_chain_provider.dart:89-96 — 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) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:348 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:348-355 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:129-136 — 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) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:357 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:357-364 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:138-145 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) bitwindow/lib/pages/console_page.dart:14 — bitwindow/lib/pages/console_page.dart:14-25 | sail_ui/lib/pages/console_tab_page.dart:14-21 — 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) sidechain-orchestrator/api/multisiglounge_handler.go:78 — sidechain-orchestrator/api/multisiglounge_handler.go:78-88 | sidechain-orchestrator/api/wallet_handler.go:102-109 — 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) sail_ui/lib/widgets/containers/sail_collapsible.dart:107 — sail_ui/lib/widgets/containers/sail_collapsible.dart:107-114 | sail_ui/lib/widgets/containers/sail_popover.dart:103-110 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×18
  • Duplicated block (13 lines × 2) bitassets/lib/pages/tabs/asset_explorer_page.dart:126 — bitassets/lib/pages/tabs/asset_explorer_page.dart:126-139 | bitassets/lib/pages/tabs/auction_browser_page.dart:143-155 — before extracting anything, compare `bitassets/lib/pages/tabs/asset_explorer_page.dart` and `bitassets/lib/pages/tabs/auction_browser_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 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 `bitassets/lib/pages/tabs/asset_explorer_page.dart:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bitassets/lib/pages/tabs/asset_explorer_page.dart:125` calls `secondary12` and `bitassets/lib/pages/tabs/auction_browser_page.dart:142` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) bitassets/lib/pages/tabs/asset_explorer_page.dart:225 — bitassets/lib/pages/tabs/asset_explorer_page.dart:225-237 | bitassets/lib/widgets/amm_analytics_widget.dart:300-312 — before extracting anything, compare `bitassets/lib/pages/tabs/asset_explorer_page.dart` and `bitassets/lib/widgets/amm_analytics_widget.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 `bitassets/lib/pages/tabs/asset_explorer_page.dart:225` it does not close everything it opens, so those 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) bitassets/lib/widgets/amm_analytics_widget.dart:295 — bitassets/lib/widgets/amm_analytics_widget.dart:295-307 | bitassets/lib/widgets/portfolio_dashboard.dart:217-229 — before extracting anything, compare `bitassets/lib/widgets/amm_analytics_widget.dart` and `bitassets/lib/widgets/portfolio_dashboard.dart` 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. 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 `bitassets/lib/widgets/amm_analytics_widget.dart:295` it does not close everything it opens, so those 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) bitwindow/lib/pages/root_page.dart:151 — bitwindow/lib/pages/root_page.dart:151-163 | sail_ui/lib/shell/sidechain_home_page.dart:68-80 — before extracting anything, compare `bitwindow/lib/pages/root_page.dart` and `sail_ui/lib/shell/sidechain_home_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/root_page.dart:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) REDACTED:768 — REDACTED:768-780 | bitwindow/lib/pages/welcome/wallet_backup_page.dart:879-891 — 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 `REDACTED:768` it does not close everything it opens, so those 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) bitwindow/lib/widgets/draft_panel.dart:904 — bitwindow/lib/widgets/draft_panel.dart:904-916 | sail_ui/lib/widgets/containers/rename_wallet_dialog.dart:48-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 `bitwindow/lib/widgets/draft_panel.dart:904` it does not close everything it opens, so those 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) bitwindow/lib/widgets/sign_preview_modal.dart:106 — bitwindow/lib/widgets/sign_preview_modal.dart:106-118 | bitwindow/lib/widgets/sign_preview_modal.dart:209-221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/sign_preview_modal.dart: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. 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) sail_ui/lib/pages/sidechains/explorer/transaction_broadcast.dart:39 — sail_ui/lib/pages/sidechains/explorer/transaction_broadcast.dart:39-51 | sail_ui/lib/pages/sidechains/explorer/transaction_broadcast.dart:211-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/pages/sidechains/explorer/transaction_broadcast.dart: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.
  • Duplicated block (13 lines × 2) sail_ui/lib/widgets/containers/edit_wallet_dialog.dart:178 — sail_ui/lib/widgets/containers/edit_wallet_dialog.dart:178-190 | sail_ui/lib/widgets/containers/rename_wallet_dialog.dart:74-86 — 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 `sail_ui/lib/widgets/containers/edit_wallet_dialog.dart:178` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) sail_ui/lib/widgets/core/sail_text.dart:43 — sail_ui/lib/widgets/core/sail_text.dart:43-55 | sail_ui/lib/widgets/core/sail_text.dart:65-77 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/core/sail_text.dart:43` 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 (13 lines × 2) sidechain_core/lib/rpcs/truthcoin_rpc.dart:557 — sidechain_core/lib/mocks/mocks.dart:709-721 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:557-569 — 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 `sidechain_core/lib/mocks/mocks.dart:709` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:354 — sidechain_core/lib/rpcs/bitassets_rpc.dart:354-366 | sidechain_core/lib/rpcs/bitnames_rpc.dart:281-293 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:561 — sidechain_core/lib/rpcs/bitassets_rpc.dart:561-573 | sidechain_core/lib/rpcs/bitnames_rpc.dart:543-555 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (13 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:771 — sidechain_core/lib/rpcs/bitassets_rpc.dart:771-783 | sidechain_core/lib/rpcs/bitnames_rpc.dart:478-490 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (13 lines × 2) bitwindow/server/api/enforcer/enforcer.go:100 — bitwindow/server/api/enforcer/enforcer.go:100-112 | dc-hub/server/api/validator/api_validator.go:207-219 — before extracting anything, compare `bitwindow/server/api/enforcer/enforcer.go` and `dc-hub/server/api/validator/api_validator.go` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 113 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 `bitwindow/server/api/enforcer/enforcer.go:100` it does not close everything it opens, so those 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `dc-hub/server/api/validator/api_validator.go:220` calls `ForwardError`, `Send` and `bitwindow/server/api/enforcer/enforcer.go:113` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) sidechain-orchestrator/api/wallet_handler.go:1414 — sidechain-orchestrator/api/wallet_handler.go:1414-1426 | sidechain-orchestrator/api/wallet_handler.go:1594-1606 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/api/wallet_handler.go:1414` it does not close everything it opens, so those 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) sidechain-orchestrator/blockfile/convert.go:201 — sidechain-orchestrator/blockfile/convert.go:201-213 | sidechain-orchestrator/corewalletfile/convert.go:241-253 — 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 `sidechain-orchestrator/blockfile/convert.go:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) sidechain-orchestrator/wallet/service.go:1350 — sidechain-orchestrator/wallet/service.go:1350-1362 | sidechain-orchestrator/wallet/service.go:1428-1440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/wallet/service.go:1350` it does not close everything it opens, so those 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 (7 corresponding lines) · ×17
  • Edited copy of a member (7 corresponding lines) sidechain-orchestrator/stratum/work.go:148 — sidechain-orchestrator/stratum/work.go:148-154 | sidechain-orchestrator/stratum/work.go:156-165 — 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) sidechain_core/lib/rpcs/bbc_rpc.dart:102 — sidechain_core/lib/rpcs/bbc_rpc.dart:102-109 | sidechain_core/lib/rpcs/coinshift_rpc.dart:125-131 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:952 — sidechain_core/lib/rpcs/bitassets_rpc.dart:952-958 | sidechain_core/lib/rpcs/bitnames_rpc.dart:736-743 — 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) sidechain-orchestrator/sidechain/bitassets/handler.go:306 — sidechain-orchestrator/sidechain/bitassets/handler.go:306-312 | sidechain-orchestrator/sidechain/bitnames/handler.go:280-286 — 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) sidechain-orchestrator/sidechain/coinshift/handler.go:79 — sidechain-orchestrator/sidechain/coinshift/handler.go:79-85 | sidechain-orchestrator/sidechain/thunder/handler.go:95-101 — 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) sidechain-orchestrator/wallet/bip47state/inbound.go:191 — sidechain-orchestrator/wallet/bip47state/inbound.go:191-197 | sidechain-orchestrator/wallet/bip47state/store.go:192-198 — 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) sidechain-orchestrator/sidechain/bitnames/handler.go:446 — sidechain-orchestrator/sidechain/bitnames/handler.go:446-452 | sidechain-orchestrator/sidechain/truthcoin/handler.go:265-271 — 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) sidechain-orchestrator/sidechain/jsonrpc_proxy.go:121 — sidechain-orchestrator/sidechain/jsonrpc_proxy.go:121-127 | sidechain-orchestrator/sidechain/solana/client.go:85-91 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) sidechain-orchestrator/sidechain/jsonrpc_proxy.go:129 — sidechain-orchestrator/sidechain/jsonrpc_proxy.go:129-135 | sidechain-orchestrator/sidechain/solana/client.go:94-100 — 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) bitwindow/server/models/bitdrive/bitdrive.go:111 — bitwindow/server/models/bitdrive/bitdrive.go:111-117 | bitwindow/server/models/timestamps/timestamps.go:130-136 — 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) sail_ui/lib/widgets/containers/edit_wallet_dialog.dart:90 — sail_ui/lib/widgets/containers/edit_wallet_dialog.dart:90-98 | sail_ui/lib/widgets/containers/rename_wallet_dialog.dart:40-46 — 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) sidechain-orchestrator/blockfile/detect.go:102 — sidechain-orchestrator/blockfile/detect.go:102-108 | sidechain-orchestrator/stratum/server.go:936-942 — 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) sidechain-orchestrator/sidechain/jsonrpc_proxy.go:113 — sidechain-orchestrator/sidechain/jsonrpc_proxy.go:113-119 | sidechain-orchestrator/sidechain/solana/client.go:75-81 — 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) sidechain-orchestrator/sidechain/bbc/handler.go:101 — sidechain-orchestrator/sidechain/bbc/handler.go:101-107 | sidechain-orchestrator/sidechain/thunder/handler.go:78-84 — 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) bitwindow/lib/providers/multisig_provider.dart:195 — bitwindow/lib/providers/multisig_provider.dart:195-201 | sidechain_core/lib/providers/window_provider.dart:358-364 — 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) bitwindow/lib/providers/m4_provider.dart:173 — bitwindow/lib/providers/m4_provider.dart:173-180 | bitwindow/lib/providers/timestamp_provider.dart:132-138 — 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) sidechain-orchestrator/wallet/address_reads.go:98 — sidechain-orchestrator/wallet/address_reads.go:98-104 | REDACTED:137-143 — 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 · Duplicated block (6 lines × 2) · ×17
  • Duplicated block (6 lines × 2) bitassets/lib/widgets/transaction_history.dart:259 — bitassets/lib/widgets/transaction_history.dart:259-264 | bitwindow/lib/widgets/coinnews.dart:745-750 — 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 `bitassets/lib/widgets/transaction_history.dart:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) sidechain_core/lib/rpcs/bitnames_rpc.dart:592 — sidechain_core/lib/rpcs/bitnames_rpc.dart:592-597 | sidechain_core/lib/rpcs/bitnames_rpc.dart:602-607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain_core/lib/rpcs/bitnames_rpc.dart:592` 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) bitwindow/lib/pages/wallet/wallet_timestamps.dart:177 — bitwindow/lib/pages/wallet/wallet_timestamps.dart:177-182 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:260-265 — 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) sail_ui/lib/widgets/config_editor/configurator_panel.dart:32 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:32-37 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:27-32 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `BitcoinConfigEditorViewModel` in one and `EnforcerConfigEditorViewModel` 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 (6 lines × 2) sail_ui/lib/widgets/config_editor/working_config_panel.dart:47 — sail_ui/lib/widgets/config_editor/working_config_panel.dart:47-52 | sail_ui/lib/widgets/enforcer_config_editor/working_config_panel.dart:47-52 — `sail_ui/lib/widgets/config_editor/working_config_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/working_config_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 77 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:872 — sidechain_core/lib/rpcs/bitassets_rpc.dart:872-877 | sidechain_core/lib/rpcs/bitnames_rpc.dart:667-672 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (6 lines × 2) bitwindow/lib/providers/homepage_provider.dart:125 — bitwindow/lib/providers/homepage_provider.dart:125-130 | sail_ui/lib/shell/sidechain_homepage_provider.dart:110-115 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) sidechain_core/lib/providers/backend_sidechain_conf_provider.dart:72 — sidechain_core/lib/providers/backend_sidechain_conf_provider.dart:72-77 | sidechain_core/lib/providers/bitcoin_conf_provider.dart:123-128 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) sidechain-orchestrator/api/multisiglounge_handler.go:227 — sidechain-orchestrator/api/multisiglounge_handler.go:227-232 | sidechain-orchestrator/api/multisiglounge_handler.go:264-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/api/multisiglounge_handler.go:227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) sidechain-orchestrator/wallet/electrum_backend.go:1575 — sidechain-orchestrator/wallet/electrum_backend.go:1575-1580 | REDACTED:717-722 — 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) sidechain-orchestrator/stratum/cpu.go:306 — sidechain-orchestrator/stratum/cpu.go:306-312 | sidechain-orchestrator/stratum/pool.go:410-415 — 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 `sidechain-orchestrator/stratum/cpu.go:306` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) coinnews/server/scanner/client.go:34 — coinnews/server/scanner/client.go:34-39 | sidechain-orchestrator/config/bitcoin_conf.go:270-275 — 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 `coinnews/server/scanner/client.go:34` it does not close everything it opens, so those 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) sidechain-orchestrator/wallet/service.go:922 — sidechain-orchestrator/wallet/service.go:922-927 | sidechain-orchestrator/wallet/service.go:978-983 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) sidechain-orchestrator/ecash_sidechain_state.go:93 — sidechain-orchestrator/ecash_sidechain_state.go:93-98 | sidechain-orchestrator/sidechain_wallet_state.go:163-168 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/ecash_sidechain_state.go:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) sidechain-orchestrator/api/wallet_handler.go:933 — sidechain-orchestrator/api/wallet_handler.go:933-938 | sidechain-orchestrator/api/wallet_handler.go:948-953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) bitwindow/server/api/bitwindowd/bitwindowd.go:371 — bitwindow/server/api/bitwindowd/bitwindowd.go:371-376 | bitwindow/server/api/bitwindowd/bitwindowd.go:386-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/api/bitwindowd/bitwindowd.go:371` 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 (6 lines × 2) bitwindow/server/engines/zmq_engine.go:205 — bitwindow/server/engines/zmq_engine.go:205-210 | bitwindow/server/engines/zmq_engine.go:264-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/engines/zmq_engine.go:205` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×16
  • Duplicated block (15 lines × 2) bitwindow/lib/pages/settings/settings_reset.dart:46 — bitwindow/lib/pages/settings/settings_reset.dart:46-60 | sail_ui/lib/pages/settings_reset.dart:36-50 — before extracting anything, compare `bitwindow/lib/pages/settings/settings_reset.dart` and `sail_ui/lib/pages/settings_reset.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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) bitwindow/lib/pages/wallet/bump_fee_dialog.dart:151 — bitwindow/lib/pages/wallet/bump_fee_dialog.dart:151-165 | bitwindow/lib/pages/wallet/bump_fee_dialog.dart:187-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/bump_fee_dialog.dart:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) bitwindow/lib/pages/wallet/cash_check_page.dart:54 — bitwindow/lib/pages/wallet/cash_check_page.dart:54-68 | bitwindow/lib/pages/wallet/create_check_page.dart:50-64 — before extracting anything, compare `bitwindow/lib/pages/wallet/cash_check_page.dart` and `bitwindow/lib/pages/wallet/create_check_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 142 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 `bitwindow/lib/pages/wallet/cash_check_page.dart:54` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:367 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:367-381 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:434-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 `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:367` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) bitwindow/lib/widgets/create_multisig_modal.dart:400 — bitwindow/lib/widgets/create_multisig_modal.dart:400-414 | bitwindow/lib/widgets/create_multisig_modal.dart:1059-1073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/create_multisig_modal.dart:400` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) bitwindow/lib/widgets/draft_panel.dart:403 — bitwindow/lib/widgets/draft_panel.dart:403-417 | bitwindow/lib/widgets/draft_panel.dart:752-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/draft_panel.dart:403` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) bitwindow/lib/widgets/proof_of_funds_modal.dart:256 — bitwindow/lib/widgets/proof_of_funds_modal.dart:256-270 | bitwindow/lib/widgets/proof_of_funds_modal.dart:460-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/proof_of_funds_modal.dart:256` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:615 — sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:615-629 | sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart:147-161 — before extracting anything, compare `sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart` and `sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) sail_ui/lib/widgets/containers/sail_card.dart:137 — sail_ui/lib/widgets/containers/sail_card.dart:137-151 | sail_ui/lib/widgets/containers/sail_card.dart:236-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `sail_ui/lib/widgets/containers/sail_card.dart:152` calls `SizedBox` and `sail_ui/lib/widgets/containers/sail_card.dart:251` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:845 — sidechain_core/lib/rpcs/bitassets_rpc.dart:845-859 | sidechain_core/lib/rpcs/bitnames_rpc.dart:445-459 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) zside/lib/pages/tabs/zside/zside_transfer_page.dart:387 — zside/lib/pages/tabs/zside/zside_transfer_page.dart:387-401 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:576-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 `zside/lib/pages/tabs/zside/zside_transfer_page.dart:387` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) bitwindow/server/service/service.go:136 — bitwindow/server/service/service.go:136-150 | sidechain-orchestrator/wallet/service.go:130-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/service/service.go:136` 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.
  • Duplicated block (15 lines × 2) sidechain-orchestrator/api/explorer_bundle.go:117 — sidechain-orchestrator/api/explorer_bundle.go:117-131 | sidechain-orchestrator/sidechain/mempool.go:237-251 — 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 `sidechain-orchestrator/sidechain/mempool.go:237` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) sidechain-orchestrator/api/multisiglounge_handler.go:91 — sidechain-orchestrator/api/multisiglounge_handler.go:91-105 | sidechain-orchestrator/api/multisiglounge_handler.go:322-336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) sidechain-orchestrator/commands/reset.go:65 — sidechain-orchestrator/commands/reset.go:65-79 | sidechain-orchestrator/commands/reset.go:186-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/commands/reset.go:65` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) sidechain-orchestrator/wallet/descriptor.go:505 — sidechain-orchestrator/wallet/descriptor.go:505-519 | sidechain-orchestrator/wallet/descriptor.go:554-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×16
  • Duplicated block (11 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:593 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:593-603 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:605-615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:1863 — REDACTED:1863-1873 | bitwindow/lib/widgets/draft_panel.dart:918-928 — 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 `REDACTED:1863` it does not close everything it opens, so those 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) photon/lib/pages/tabs/mempool_explorer_page.dart:17 — photon/lib/pages/tabs/mempool_explorer_page.dart:17-27 | photon/lib/pages/tabs/withdrawals_page.dart:17-27 — before extracting anything, compare `photon/lib/pages/tabs/mempool_explorer_page.dart` and `photon/lib/pages/tabs/withdrawals_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 `photon/lib/pages/tabs/mempool_explorer_page.dart:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) sail_ui/lib/pages/create_wallet_page.dart:215 — sail_ui/lib/pages/create_wallet_page.dart:215-225 | sail_ui/lib/pages/create_wallet_page.dart:448-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/pages/create_wallet_page.dart: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) sail_ui/lib/shell/sidechain_conf_editor_page.dart:331 — sail_ui/lib/shell/sidechain_conf_editor_page.dart:331-341 | sail_ui/lib/widgets/components/setting_row.dart:91-101 — 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 `sail_ui/lib/shell/sidechain_conf_editor_page.dart:331` 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) truthcoin/lib/pages/market_explorer_page.dart:256 — truthcoin/lib/pages/market_explorer_page.dart:256-266 | truthcoin/lib/pages/tabs/portfolio_page.dart:180-190 — 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 `truthcoin/lib/pages/market_explorer_page.dart:256` it does not close everything it opens, so those 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 × 2) sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:705 — sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:705-715 | sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:738-748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:735` calls `where`, `toSet`, `GetTransactionDetailsResponse` and `sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:703` 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) photon/lib/pages/tabs/mempool_explorer_page.dart:199 — photon/lib/pages/tabs/mempool_explorer_page.dart:199-209 | photon/lib/pages/tabs/withdrawals_page.dart:233-243 — before extracting anything, compare `photon/lib/pages/tabs/mempool_explorer_page.dart` and `photon/lib/pages/tabs/withdrawals_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 (11 lines × 2) truthcoin/lib/pages/market_detail_page.dart:1084 — truthcoin/lib/pages/market_detail_page.dart:1084-1094 | truthcoin/lib/pages/voting_dashboard_page.dart:529-539 — 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 (11 lines × 2) coinshift/lib/pages/tabs/swaps_page.dart:102 — coinshift/lib/pages/tabs/swaps_page.dart:102-112 | coinshift/lib/widgets/liquidity_monitor_widget.dart:257-267 — 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 (11 lines × 2) REDACTED:1020 — REDACTED:1020-1030 | REDACTED:1818-1828 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) sidechain-orchestrator/wallet/scripttype.go:163 — sidechain-orchestrator/wallet/scripttype.go:163-173 | sidechain-orchestrator/wallet/scripttype.go:251-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) bitwindow/server/models/coinnews/store.go:190 — bitwindow/server/models/coinnews/store.go:190-202 | coinnews/server/store/store.go:166-176 — before extracting anything, compare `bitwindow/server/models/coinnews/store.go` and `coinnews/server/store/store.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 113 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) sidechain-orchestrator/blockfile/file_windows.go:14 — sidechain-orchestrator/blockfile/file_windows.go:14-24 | sidechain-orchestrator/corewalletfile/file_windows.go:13-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) sidechain-orchestrator/wallet/service.go:1298 — sidechain-orchestrator/wallet/service.go:1298-1309 | sidechain-orchestrator/wallet/service.go:1375-1385 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/wallet/service.go:1298` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) REDACTED:232 — REDACTED:232-242 | REDACTED:1337-1347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:232` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×15
  • Edited copy of a member (14 corresponding lines) sidechain-orchestrator/api/seed_handler.go:15 — sidechain-orchestrator/api/seed_handler.go:15-34 | sidechain-orchestrator/api/wallet_handler.go:612-625 — 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) sidechain-orchestrator/stratum/cpu.go:437 — sidechain-orchestrator/stratum/cpu.go:437-450 | sidechain-orchestrator/stratum/work.go:167-182 — 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) sidechain-orchestrator/walletfile/lock_unix.go:14 — sidechain-orchestrator/walletfile/lock_unix.go:14-27 | sidechain-orchestrator/walletfile/lock_windows.go:14-28 — 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) sidechain-orchestrator/sidechain/bitassets/handler.go:86 — sidechain-orchestrator/sidechain/bitassets/handler.go:86-99 | sidechain-orchestrator/sidechain/bitnames/handler.go:81-94 — 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) sidechain-orchestrator/api/explorer_core.go:163 — sidechain-orchestrator/api/explorer_core.go:163-176 | sidechain-orchestrator/sidechain/mempool.go:169-182 — 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) sidechain-orchestrator/engines/bmmstate/store.go:108 — sidechain-orchestrator/engines/bmmstate/store.go:108-121 | sidechain-orchestrator/engines/bmmstate/store.go:252-265 — 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) sidechain_core/lib/rpcs/bitwindow_api.dart:174 — sidechain_core/lib/rpcs/bitwindow_api.dart:174-187 | sidechain_core/lib/rpcs/enforcer_rpc.dart:205-222 — 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) sail_ui/lib/widgets/feedback/sail_toast.dart:248 — sail_ui/lib/widgets/feedback/sail_toast.dart:248-261 | sail_ui/lib/widgets/feedback/sail_toast.dart:263-276 — 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) bitwindow/server/api/bitdrive/bitdrive.go:38 — bitwindow/server/api/bitdrive/bitdrive.go:38-53 | bitwindow/server/api/bitdrive/bitdrive.go:193-206 — 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) sidechain-orchestrator/wallet/deposits.go:96 — sidechain-orchestrator/wallet/deposits.go:96-111 | sidechain-orchestrator/wallet/deposits.go:115-128 — 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) bitwindow/server/engines/wallet_engine.go:136 — bitwindow/server/engines/wallet_engine.go:136-149 | sidechain-orchestrator/stranded_release.go:19-32 — 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) photon/lib/widgets/miner_widget.dart:63 — photon/lib/widgets/miner_widget.dart:63-76 | photon/lib/widgets/parent_chain_info_widget.dart:67-82 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) bitwindow/server/models/bip47/store.go:23 — bitwindow/server/models/bip47/store.go:23-36 | bitwindow/server/models/opreturns/opreturns.go:126-141 — 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) bitwindow/server/models/deniability/deniability.go:221 — bitwindow/server/models/deniability/deniability.go:221-235 | bitwindow/server/models/deniability/deniability.go:344-357 — 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) sidechain-orchestrator/api/orchestrator_handler.go:94 — sidechain-orchestrator/api/orchestrator_handler.go:94-108 | sidechain-orchestrator/api/orchestrator_handler.go:175-188 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×14
  • Edited copy of a member (15 corresponding lines) truthcoin/lib/models/market.dart:358 — truthcoin/lib/models/market.dart:358-372 | truthcoin/lib/models/voting.dart:428-446 — 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) bitwindow/server/api/utils/utils.go:137 — bitwindow/server/api/utils/utils.go:137-151 | bitwindow/server/api/utils/utils.go:154-170 — 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) sidechain-orchestrator/api/stratum_handler.go:472 — sidechain-orchestrator/api/stratum_handler.go:472-486 | sidechain-orchestrator/stratum/poolblocks.go:86-104 — 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) sidechain-orchestrator/replay/replay.go:52 — sidechain-orchestrator/replay/replay.go:52-67 | sidechain-orchestrator/wallet/core_backend.go:1248-1262 — 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) bitwindow/server/service/service.go:57 — bitwindow/server/service/service.go:57-71 | dc-hub/server/connector/connector.go:49-66 — 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) sidechain_core/lib/models/enforcer_config.dart:57 — sidechain_core/lib/models/enforcer_config.dart:57-77 | sidechain_core/lib/models/generic_app_config.dart:40-54 — 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) bitwindow/lib/services/chat_file_storage.dart:139 — bitwindow/lib/services/chat_file_storage.dart:139-153 | bitwindow/lib/services/chat_file_storage.dart:155-170 — 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) sail_ui/lib/widgets/debug/sidechain_debug_window.dart:97 — sail_ui/lib/widgets/debug/sidechain_debug_window.dart:97-111 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:400-414 — 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) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1023 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1023-1044 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1046-1060 — 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) sidechain-orchestrator/cmd/drivechain-cli/main.go:15 — sidechain-orchestrator/cmd/drivechain-cli/main.go:15-29 | sidechain-orchestrator/cmd/drivechaind/main.go:72-152 — 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) sidechain_core/lib/classes/rpc_connection.dart:168 — sidechain_core/lib/classes/rpc_connection.dart:168-182 | sidechain_core/lib/mocks/mocks.dart:259-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) sidechain_core/lib/rpcs/truthcoin_rpc.dart:936 — sidechain_core/lib/rpcs/truthcoin_rpc.dart:936-952 | sidechain_core/lib/rpcs/bitassets_rpc.dart:592-606 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:610 — sidechain_core/lib/rpcs/bitassets_rpc.dart:610-624 | sidechain_core/lib/rpcs/bitassets_rpc.dart:644-658 — 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) bitwindow/server/models/timestamps/timestamps.go:164 — bitwindow/server/models/timestamps/timestamps.go:164-180 | bitwindow/server/models/bitdrive/bitdrive.go:139-153 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×14
  • Edited copy of a member (13 corresponding lines) sail_ui/lib/widgets/config_editor/configurator_panel.dart:503 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:503-515 | sail_ui/lib/widgets/config_editor/configurator_panel.dart:569-581 — 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) sidechain-orchestrator/api/bid_source_core.go:154 — sidechain-orchestrator/api/bid_source_core.go:154-168 | sidechain-orchestrator/api/bmm_frozen.go:175-187 — 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) sidechain-orchestrator/api/bid_source_core.go:170 — sidechain-orchestrator/api/bid_source_core.go:170-182 | sidechain-orchestrator/api/bid_source_core.go:192-204 — 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) sidechain_core/lib/providers/window_provider.dart:257 — sidechain_core/lib/providers/window_provider.dart:257-273 | sidechain_core/lib/providers/window_provider.dart:291-303 — 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) bitwindow/server/models/addressbook/addressbook.go:65 — bitwindow/server/models/addressbook/addressbook.go:65-77 | sidechain-orchestrator/wallet/electrum_backend.go:586-601 — 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) REDACTED:3101 — REDACTED:3101-3114 | REDACTED:3124-3136 — 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) sidechain-orchestrator/sidechain/zside/handler.go:29 — sidechain-orchestrator/sidechain/zside/handler.go:29-46 | sidechain-orchestrator/sidechain/zside/node.go:25-37 — 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) sidechain-orchestrator/wallet/network_chain_source.go:302 — sidechain-orchestrator/wallet/network_chain_source.go:302-314 | sidechain-orchestrator/wallet/network_chain_source.go:317-329 — 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) bitassets/lib/providers/bitassets_provider.dart:78 — bitassets/lib/providers/bitassets_provider.dart:78-90 | sidechain_core/lib/providers/sidechain/address_provider.dart:34-48 — 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) bitwindow/server/models/cheques/cheques.go:309 — bitwindow/server/models/cheques/cheques.go:309-321 | bitwindow/server/models/cheques/cheques.go:323-337 — 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) coinshift/lib/pages/swap_analytics_page.dart:173 — coinshift/lib/pages/swap_analytics_page.dart:173-186 | truthcoin/lib/widgets/market_stat_tile.dart:19-31 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:697 — sidechain_core/lib/rpcs/bitassets_rpc.dart:697-709 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:681-693 — 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) bitwindow/lib/pages/overview_page.dart:143 — bitwindow/lib/pages/overview_page.dart:143-155 | bitwindow/lib/pages/wallet/wallet_overview.dart:882-894 — 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) bitwindow/server/service/service.go:15 — bitwindow/server/service/service.go:15-30 | dc-hub/server/connector/connector.go:13-25 — 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×13
  • Members sharing a duplicated core (6 members, 50+ identical tokens) bbc/lib/bbc_module.dart:44 — bbc/lib/bbc_module.dart:44-67 | coinshift/lib/coinshift_module.dart:59-82 | photon/lib/photon_module.dart:41-64 | thunder/lib/thunder_module.dart:41-64 | truthcoin/lib/truthcoin_module.dart:82-105 | zside/lib/zside_module.dart:74-97 — 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) bbc/lib/widgets/homepage_widget_catalog.dart:178 — bbc/lib/widgets/homepage_widget_catalog.dart:178-199 | coinshift/lib/widgets/homepage_widget_catalog.dart:322-343 | photon/lib/widgets/homepage_widget_catalog.dart:198-219 | thunder/lib/widgets/homepage_widget_catalog.dart:201-222 | truthcoin/lib/widgets/homepage_widget_catalog.dart:211-232 | zside/lib/widgets/homepage_widget_catalog.dart:793-810 — 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) bbc/lib/widgets/homepage_widget_catalog.dart:206 — bbc/lib/widgets/homepage_widget_catalog.dart:206-218 | coinshift/lib/widgets/homepage_widget_catalog.dart:349-361 | photon/lib/widgets/homepage_widget_catalog.dart:226-238 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:674-686 | thunder/lib/widgets/homepage_widget_catalog.dart:229-241 | truthcoin/lib/widgets/homepage_widget_catalog.dart:239-251 — 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) bbc/lib/widgets/homepage_widget_catalog.dart:253 — bbc/lib/widgets/homepage_widget_catalog.dart:253-279 | coinshift/lib/widgets/homepage_widget_catalog.dart:396-422 | photon/lib/widgets/homepage_widget_catalog.dart:273-299 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:721-751 | thunder/lib/widgets/homepage_widget_catalog.dart:276-302 | truthcoin/lib/widgets/homepage_widget_catalog.dart:286-312 — 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) bbc/lib/widgets/homepage_widget_catalog.dart:342 — bbc/lib/widgets/homepage_widget_catalog.dart:342-367 | coinshift/lib/widgets/homepage_widget_catalog.dart:485-510 | photon/lib/widgets/homepage_widget_catalog.dart:362-387 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:836-861 | thunder/lib/widgets/homepage_widget_catalog.dart:365-390 | truthcoin/lib/widgets/homepage_widget_catalog.dart:375-400 — 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) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:121 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:121-214 | bitwindow/lib/pages/wallet/denability_page.dart:455-520 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:629-653 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:980-1016 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:503-527 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:681-704 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:245 — sidechain_core/lib/rpcs/bitassets_rpc.dart:245-251 | sidechain_core/lib/rpcs/bitnames_rpc.dart:172-178 | sidechain_core/lib/rpcs/photon_rpc.dart:83-89 | sidechain_core/lib/rpcs/thunder_rpc.dart:77-83 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:276-282 | sidechain_core/lib/rpcs/zside_rpc.dart:120-126 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:321 — sidechain_core/lib/rpcs/bitassets_rpc.dart:321-331 | sidechain_core/lib/rpcs/bitnames_rpc.dart:248-258 | sidechain_core/lib/rpcs/photon_rpc.dart:170-180 | sidechain_core/lib/rpcs/thunder_rpc.dart:213-223 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:363-373 | sidechain_core/lib/rpcs/zside_rpc.dart:244-254 — 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) sidechain-orchestrator/sidechain/bitassets/client.go:96 — sidechain-orchestrator/sidechain/bitassets/client.go:96-107 | sidechain-orchestrator/sidechain/bitnames/client.go:106-117 | sidechain-orchestrator/sidechain/coinshift/client.go:111-122 | sidechain-orchestrator/sidechain/photon/client.go:96-107 | sidechain-orchestrator/sidechain/thunder/client.go:96-107 | sidechain-orchestrator/sidechain/truthcoin/client.go:111-122 — 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) sidechain-orchestrator/sidechain/bitassets/client.go:183 — sidechain-orchestrator/sidechain/bitassets/client.go:183-196 | sidechain-orchestrator/sidechain/bitnames/client.go:233-246 | sidechain-orchestrator/sidechain/coinshift/client.go:198-211 | sidechain-orchestrator/sidechain/photon/client.go:183-196 | sidechain-orchestrator/sidechain/thunder/client.go:183-196 | sidechain-orchestrator/sidechain/truthcoin/client.go:198-211 — 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) sidechain-orchestrator/sidechain/bitassets/client.go:199 — sidechain-orchestrator/sidechain/bitassets/client.go:199-212 | sidechain-orchestrator/sidechain/bitnames/client.go:249-262 | sidechain-orchestrator/sidechain/coinshift/client.go:214-227 | sidechain-orchestrator/sidechain/photon/client.go:199-212 | sidechain-orchestrator/sidechain/thunder/client.go:199-212 | sidechain-orchestrator/sidechain/truthcoin/client.go:214-227 — 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) sidechain-orchestrator/sidechain/bitassets/client.go:216 — sidechain-orchestrator/sidechain/bitassets/client.go:216-229 | sidechain-orchestrator/sidechain/bitnames/client.go:266-279 | sidechain-orchestrator/sidechain/coinshift/client.go:231-244 | sidechain-orchestrator/sidechain/photon/client.go:216-229 | sidechain-orchestrator/sidechain/thunder/client.go:216-229 | sidechain-orchestrator/sidechain/truthcoin/client.go:231-244 — 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) sidechain-orchestrator/sidechain/bitassets/handler.go:172 — sidechain-orchestrator/sidechain/bitassets/handler.go:172-179 | sidechain-orchestrator/sidechain/bitnames/handler.go:160-167 | sidechain-orchestrator/sidechain/coinshift/handler.go:173-180 | sidechain-orchestrator/sidechain/photon/handler.go:172-179 | sidechain-orchestrator/sidechain/truthcoin/handler.go:178-185 | sidechain-orchestrator/sidechain/zside/handler.go:224-231 — 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 (20 corresponding lines) · ×13
  • Edited copy of a member (20 corresponding lines) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:712 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:712-742 | bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:345-364 — 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) sidechain-orchestrator/sidechain/bitassets/handler.go:285 — sidechain-orchestrator/sidechain/bitassets/handler.go:285-304 | sidechain-orchestrator/sidechain/bitnames/handler.go:259-278 — 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) sidechain-orchestrator/api/wallet_handler.go:556 — sidechain-orchestrator/api/wallet_handler.go:556-575 | sidechain-orchestrator/api/wallet_handler.go:577-599 — 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) sidechain-orchestrator/sidechain/mempool.go:438 — sidechain-orchestrator/sidechain/mempool.go:438-459 | sidechain-orchestrator/sidechain/mempool.go:463-482 — 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) bitwindow/lib/pages/mining/mining_tab.dart:622 — bitwindow/lib/pages/mining/mining_tab.dart:622-641 | bitwindow/lib/pages/mining/mining_tab.dart:655-677 — 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) sidechain-orchestrator/api/bmm_handler.go:732 — sidechain-orchestrator/api/bmm_handler.go:732-755 | sidechain-orchestrator/api/bmm_label.go:93-112 — 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) sidechain_core/lib/rpcs/bitwindow_api.dart:348 — sidechain_core/lib/rpcs/bitwindow_api.dart:348-367 | sidechain_core/lib/rpcs/enforcer_rpc.dart:234-258 — 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) sail_ui/lib/widgets/config_editor/actual_config_panel.dart:35 — sail_ui/lib/widgets/config_editor/actual_config_panel.dart:35-54 | sail_ui/lib/widgets/enforcer_config_editor/actual_config_panel.dart:35-54 — 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) sidechain_core/lib/models/enforcer_config.dart:95 — sidechain_core/lib/models/enforcer_config.dart:95-117 | sidechain_core/lib/models/generic_app_config.dart:72-91 — 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) bitwindow/lib/widgets/address_list.dart:42 — bitwindow/lib/widgets/address_list.dart:42-62 | bitwindow/lib/widgets/address_list.dart:64-83 — 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) bitwindow/lib/widgets/peers_table_widget.dart:109 — bitwindow/lib/widgets/peers_table_widget.dart:109-128 | bitwindow/lib/widgets/traffic_graph_widget.dart:53-72 — 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) sail_ui/lib/routing/network_guard.dart:14 — sail_ui/lib/routing/network_guard.dart:14-33 | sail_ui/lib/routing/password_guard.dart:14-41 — 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) sidechain-orchestrator/wallet/scripttype.go:85 — sidechain-orchestrator/wallet/scripttype.go:85-104 | sidechain-orchestrator/wallet/types.go:112-131 — 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 · Duplicated block (7 lines × 7) · ×12
  • Duplicated block (7 lines × 7) sidechain_core/lib/rpcs/bitassets_rpc.dart:293 — sidechain_core/lib/rpcs/bitassets_rpc.dart:293-299 | sidechain_core/lib/rpcs/bitnames_rpc.dart:220-226 | sidechain_core/lib/rpcs/coinshift_rpc.dart:173-179 | sidechain_core/lib/rpcs/photon_rpc.dart:131-137 | sidechain_core/lib/rpcs/thunder_rpc.dart:125-131 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:324-330 | sidechain_core/lib/rpcs/zside_rpc.dart:173-179 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:55 — sidechain-orchestrator/sidechain/bitassets/handler.go:55-61 | sidechain-orchestrator/sidechain/bitnames/handler.go:49-55 | sidechain-orchestrator/sidechain/coinshift/handler.go:48-54 | sidechain-orchestrator/sidechain/photon/handler.go:45-51 | sidechain-orchestrator/sidechain/thunder/handler.go:63-69 | sidechain-orchestrator/sidechain/truthcoin/handler.go:51-57 | sidechain-orchestrator/sidechain/zside/handler.go:48-54 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:101 — sidechain-orchestrator/sidechain/bitassets/handler.go:101-107 | sidechain-orchestrator/sidechain/bitnames/handler.go:96-102 | sidechain-orchestrator/sidechain/coinshift/handler.go:87-93 | sidechain-orchestrator/sidechain/photon/handler.go:86-92 | sidechain-orchestrator/sidechain/thunder/handler.go:103-109 | sidechain-orchestrator/sidechain/truthcoin/handler.go:92-98 | sidechain-orchestrator/sidechain/zside/handler.go:82-88 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:109 — sidechain-orchestrator/sidechain/bitassets/handler.go:109-115 | sidechain-orchestrator/sidechain/bitnames/handler.go:104-110 | sidechain-orchestrator/sidechain/coinshift/handler.go:95-101 | sidechain-orchestrator/sidechain/photon/handler.go:94-100 | sidechain-orchestrator/sidechain/thunder/handler.go:111-117 | sidechain-orchestrator/sidechain/truthcoin/handler.go:100-106 | sidechain-orchestrator/sidechain/zside/handler.go:90-96 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:125 — sidechain-orchestrator/sidechain/bitassets/handler.go:125-131 | sidechain-orchestrator/sidechain/bitnames/handler.go:120-126 | sidechain-orchestrator/sidechain/coinshift/handler.go:111-117 | sidechain-orchestrator/sidechain/photon/handler.go:110-116 | sidechain-orchestrator/sidechain/thunder/handler.go:131-137 | sidechain-orchestrator/sidechain/truthcoin/handler.go:116-122 | sidechain-orchestrator/sidechain/zside/handler.go:162-168 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:140 — sidechain-orchestrator/sidechain/bitassets/handler.go:140-146 | sidechain-orchestrator/sidechain/bitnames/handler.go:128-134 | sidechain-orchestrator/sidechain/coinshift/handler.go:126-132 | sidechain-orchestrator/sidechain/photon/handler.go:125-131 | sidechain-orchestrator/sidechain/thunder/handler.go:139-145 | sidechain-orchestrator/sidechain/truthcoin/handler.go:131-137 | sidechain-orchestrator/sidechain/zside/handler.go:177-183 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:164 — sidechain-orchestrator/sidechain/bitassets/handler.go:164-170 | sidechain-orchestrator/sidechain/bitnames/handler.go:152-158 | sidechain-orchestrator/sidechain/coinshift/handler.go:165-171 | sidechain-orchestrator/sidechain/photon/handler.go:164-170 | sidechain-orchestrator/sidechain/thunder/handler.go:163-169 | sidechain-orchestrator/sidechain/truthcoin/handler.go:170-176 | sidechain-orchestrator/sidechain/zside/handler.go:216-222 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:195 — sidechain-orchestrator/sidechain/bitassets/handler.go:195-201 | sidechain-orchestrator/sidechain/bitnames/handler.go:176-182 | sidechain-orchestrator/sidechain/coinshift/handler.go:196-202 | sidechain-orchestrator/sidechain/photon/handler.go:195-201 | sidechain-orchestrator/sidechain/thunder/handler.go:193-199 | sidechain-orchestrator/sidechain/truthcoin/handler.go:194-200 | sidechain-orchestrator/sidechain/zside/handler.go:240-246 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:211 — sidechain-orchestrator/sidechain/bitassets/handler.go:211-217 | sidechain-orchestrator/sidechain/bitnames/handler.go:192-198 | sidechain-orchestrator/sidechain/coinshift/handler.go:212-218 | sidechain-orchestrator/sidechain/photon/handler.go:211-217 | sidechain-orchestrator/sidechain/thunder/handler.go:209-215 | sidechain-orchestrator/sidechain/truthcoin/handler.go:210-216 | sidechain-orchestrator/sidechain/zside/handler.go:256-262 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:219 — sidechain-orchestrator/sidechain/bitassets/handler.go:219-225 | sidechain-orchestrator/sidechain/bitnames/handler.go:200-206 | sidechain-orchestrator/sidechain/coinshift/handler.go:220-226 | sidechain-orchestrator/sidechain/photon/handler.go:219-225 | sidechain-orchestrator/sidechain/thunder/handler.go:217-223 | sidechain-orchestrator/sidechain/truthcoin/handler.go:218-224 | sidechain-orchestrator/sidechain/zside/handler.go:264-270 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:227 — sidechain-orchestrator/sidechain/bitassets/handler.go:227-233 | sidechain-orchestrator/sidechain/bitnames/handler.go:208-214 | sidechain-orchestrator/sidechain/coinshift/handler.go:228-234 | sidechain-orchestrator/sidechain/photon/handler.go:227-233 | sidechain-orchestrator/sidechain/thunder/handler.go:225-231 | sidechain-orchestrator/sidechain/truthcoin/handler.go:226-232 | sidechain-orchestrator/sidechain/zside/handler.go:272-278 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:235 — sidechain-orchestrator/sidechain/bitassets/handler.go:235-241 | sidechain-orchestrator/sidechain/bitnames/handler.go:216-222 | sidechain-orchestrator/sidechain/coinshift/handler.go:134-140 | sidechain-orchestrator/sidechain/photon/handler.go:133-139 | sidechain-orchestrator/sidechain/thunder/handler.go:240-246 | sidechain-orchestrator/sidechain/truthcoin/handler.go:139-145 | sidechain-orchestrator/sidechain/zside/handler.go:185-191 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×11
  • Edited copy of a member (9 corresponding lines) sidechain_core/lib/rpcs/bitassets_rpc.dart:402 — sidechain_core/lib/rpcs/bitassets_rpc.dart:402-410 | sidechain_core/lib/rpcs/bitnames_rpc.dart:340-348 — 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) sidechain-orchestrator/api/bmm_handler.go:248 — sidechain-orchestrator/api/bmm_handler.go:248-256 | sidechain-orchestrator/api/bmm_handler.go:260-268 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:342 — sidechain_core/lib/rpcs/bitassets_rpc.dart:342-350 | sidechain_core/lib/rpcs/bitnames_rpc.dart:269-277 — 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) bitwindow/server/api/enforcer/enforcer.go:51 — bitwindow/server/api/enforcer/enforcer.go:51-59 | dc-hub/server/api/validator/api_validator.go:158-166 — 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) sidechain_core/lib/rpcs/bitwindow_api.dart:1972 — sidechain_core/lib/rpcs/bitwindow_api.dart:1972-1980 | sidechain_core/lib/rpcs/bitwindow_api.dart:1982-1990 — 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) sidechain-orchestrator/config/binaries.go:292 — sidechain-orchestrator/config/binaries.go:292-302 | sidechain-orchestrator/config/sidechain_conf.go:33-41 — 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) sidechain_core/lib/providers/bitcoin_conf_provider.dart:397 — sidechain_core/lib/providers/bitcoin_conf_provider.dart:397-405 | REDACTED:180-190 — 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) bitassets/lib/pages/tabs/asset_explorer_page.dart:684 — bitassets/lib/pages/tabs/asset_explorer_page.dart:684-692 | bitassets/lib/pages/tabs/auction_browser_page.dart:851-860 — 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) sidechain-orchestrator/wallet/network_chain_source.go:287 — sidechain-orchestrator/wallet/network_chain_source.go:287-299 | REDACTED:256-264 — 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) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:561 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:561-569 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:275-284 — 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) bitwindow/lib/providers/blockchain_provider.dart:136 — bitwindow/lib/providers/blockchain_provider.dart:136-144 | bitwindow/lib/providers/transactions_provider.dart:98-108 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×11
  • Duplicated block (16 lines × 2) bitwindow/lib/dialogs/network_statistics_dialog.dart:335 — bitwindow/lib/dialogs/network_statistics_dialog.dart:335-350 | bitwindow/lib/widgets/traffic_graph_widget.dart:189-204 — before extracting anything, compare `bitwindow/lib/dialogs/network_statistics_dialog.dart` and `bitwindow/lib/widgets/traffic_graph_widget.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bitwindow/lib/dialogs/network_statistics_dialog.dart:335` 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 (16 lines × 2) bitwindow/lib/pages/root_page.dart:1487 — bitwindow/lib/pages/root_page.dart:1487-1502 | bitwindow/lib/pages/root_page.dart:1505-1520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/root_page.dart:1487` it does not close everything it opens, so those 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, `bitwindow/lib/pages/root_page.dart:1486` calls `TextSpan` and `bitwindow/lib/pages/root_page.dart:1504` 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 (16 lines × 2) bitwindow/lib/pages/wallet/cash_check_page.dart:29 — bitwindow/lib/pages/wallet/cash_check_page.dart:29-44 | bitwindow/lib/pages/wallet/create_check_page.dart:29-44 — before extracting anything, compare `bitwindow/lib/pages/wallet/cash_check_page.dart` and `bitwindow/lib/pages/wallet/create_check_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 142 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 `bitwindow/lib/pages/wallet/cash_check_page.dart:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (16 lines × 2) REDACTED:996 — REDACTED:996-1011 | REDACTED:1593-1608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:996` it does not close everything it opens, so those 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:575 — sidechain_core/lib/rpcs/bitassets_rpc.dart:575-590 | sidechain_core/lib/rpcs/bitnames_rpc.dart:557-572 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (16 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:754 — sidechain_core/lib/rpcs/bitassets_rpc.dart:754-769 | sidechain_core/lib/rpcs/bitnames_rpc.dart:461-476 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (16 lines × 2) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:579 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:579-594 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:869-884 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:579` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) zside/lib/pages/tabs/zside/zside_transfer_page.dart:486 — zside/lib/pages/tabs/zside/zside_transfer_page.dart:486-501 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:664-679 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/pages/tabs/zside/zside_transfer_page.dart:486` 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) bitwindow/lib/pages/root_page.dart:403 — bitwindow/lib/pages/root_page.dart:403-418 | sail_ui/lib/shell/sidechain_home_page.dart:88-103 — before extracting anything, compare `bitwindow/lib/pages/root_page.dart` and `sail_ui/lib/shell/sidechain_home_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/root_page.dart:403` 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) sidechain-orchestrator/api/wallet_handler.go:213 — sidechain-orchestrator/api/wallet_handler.go:213-228 | sidechain-orchestrator/api/wallet_handler.go:2125-2140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) sidechain-orchestrator/wallet/core_backend.go:1543 — sidechain-orchestrator/wallet/core_backend.go:1543-1558 | sidechain-orchestrator/wallet/electrum_backend.go:1902-1917 — 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 `sidechain-orchestrator/wallet/core_backend.go:1543` 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 (14 lines × 2) · ×11
  • Duplicated block (14 lines × 2) bitwindow/lib/dialogs/paper_check_dialog.dart:269 — bitwindow/lib/dialogs/paper_check_dialog.dart:269-282 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:158-171 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) bitwindow/lib/dialogs/paper_check_dialog.dart:376 — bitwindow/lib/dialogs/paper_check_dialog.dart:376-389 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:188-201 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 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 `bitwindow/lib/dialogs/paper_check_dialog.dart:376` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:155 — bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:155-168 | bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:187-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:155` 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 (14 lines × 2) bitwindow/lib/pages/success_page.dart:22 — bitwindow/lib/pages/success_page.dart:22-35 | sail_ui/lib/pages/unlock_wallet_page.dart:156-169 — 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 `bitwindow/lib/pages/success_page.dart:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) bitwindow/lib/pages/wallet/check_detail_page.dart:446 — bitwindow/lib/pages/wallet/check_detail_page.dart:446-459 | bitwindow/lib/pages/wallet/check_detail_page.dart:482-495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/check_detail_page.dart:446` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) bitwindow/lib/pages/wallet/create_timestamp_page.dart:34 — bitwindow/lib/pages/wallet/create_timestamp_page.dart:34-47 | bitwindow/lib/pages/wallet/verify_timestamp_page.dart:21-34 — before extracting anything, compare `bitwindow/lib/pages/wallet/create_timestamp_page.dart` and `bitwindow/lib/pages/wallet/verify_timestamp_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/create_timestamp_page.dart:34` it does not close everything it opens, so those 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) bitwindow/lib/pages/wallet/wallet_overview.dart:303 — bitwindow/lib/pages/wallet/wallet_overview.dart:303-316 | bitwindow/lib/widgets/address_list.dart:318-331 — 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 `bitwindow/lib/pages/wallet/wallet_overview.dart:303` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) REDACTED:1876 — REDACTED:1876-1889 | bitwindow/lib/widgets/draft_panel.dart:931-944 — 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 `REDACTED:1876` 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 (14 lines × 2) sail_ui/lib/widgets/config_editor/configurator_panel.dart:329 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:329-342 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:253-266 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/config_editor/configurator_panel.dart:329` it does not close everything it opens, so those 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) sail_ui/lib/widgets/core/sail_text.dart:128 — sail_ui/lib/widgets/core/sail_text.dart:128-141 | sail_ui/lib/widgets/core/sail_text.dart:211-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/core/sail_text.dart:128` 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 (14 lines × 2) bitwindow/server/models/coinnews/store.go:337 — bitwindow/server/models/coinnews/store.go:337-350 | coinnews/server/store/store.go:286-299 — before extracting anything, compare `bitwindow/server/models/coinnews/store.go` and `coinnews/server/store/store.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 113 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 `bitwindow/server/models/coinnews/store.go:337` 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×10
  • Members sharing a duplicated core (4 members, 50+ identical tokens) bitassets/lib/pages/tabs/amm_page.dart:278 — bitassets/lib/pages/tabs/amm_page.dart:278-300 | bitassets/lib/pages/tabs/asset_explorer_page.dart:262-296 | bitassets/lib/pages/tabs/auction_browser_page.dart:874-896 | bitassets/lib/widgets/amm_analytics_widget.dart:448-465 — 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) bitwindow/lib/dialogs/network_statistics_dialog.dart:191 — bitwindow/lib/dialogs/network_statistics_dialog.dart:191-199 | bitwindow/lib/widgets/network_stats_widget.dart:149-157 | bitwindow/lib/widgets/traffic_graph_widget.dart:223-231 | bitwindow/lib/widgets/traffic_graph_widget.dart:265-273 — 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) bitwindow/lib/pages/debug_window.dart:521 — bitwindow/lib/pages/debug_window.dart:521-567 | bitwindow/lib/pages/debug_window.dart:573-638 | bitwindow/lib/pages/overview_page.dart:395-424 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:306-352 — 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) bitwindow/lib/pages/settings/network_swap_page.dart:98 — bitwindow/lib/pages/settings/network_swap_page.dart:98-226 | sail_ui/lib/pages/datadir_select_page.dart:63-148 | sail_ui/lib/pages/l1_restart_page.dart:65-190 | sail_ui/lib/pages/utxo_snapshot_page.dart:87-201 — 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) bitwindow/lib/widgets/create_multisig_modal.dart:973 — bitwindow/lib/widgets/create_multisig_modal.dart:973-1091 | bitwindow/lib/widgets/fund_group_modal.dart:13-109 | bitwindow/lib/widgets/import_txid_modal.dart:15-128 | bitwindow/lib/widgets/multisig_key_modal.dart:15-147 — 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) sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:487 — sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:487-508 | sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:575-599 | sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:608-629 | sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart:140-161 — 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) sail_ui/lib/pages/sidechains/parent_chain_page.dart:145 — sail_ui/lib/pages/sidechains/parent_chain_page.dart:145-154 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:231-240 | zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:103-114 | zside/lib/widgets/homepage_widget_catalog.dart:350-359 — 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) sidechain_core/lib/rpcs/photon_rpc.dart:188 — sidechain_core/lib/rpcs/photon_rpc.dart:188-198 | sidechain_core/lib/rpcs/thunder_rpc.dart:231-241 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:381-391 | sidechain_core/lib/rpcs/zside_rpc.dart:262-272 — 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) zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:160 — zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:160-202 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:120-173 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:289-342 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:737-786 — 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) bitwindow/server/models/coinnews/store.go:330 — bitwindow/server/models/coinnews/store.go:330-350 | bitwindow/server/models/coinnews/store.go:352-366 | coinnews/server/store/store.go:279-299 | coinnews/server/store/store.go:301-315 — 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) · ×10
  • Edited copy of a member (17 corresponding lines) bitwindow/lib/widgets/hash_calculator_modal.dart:197 — bitwindow/lib/widgets/hash_calculator_modal.dart:197-218 | bitwindow/lib/widgets/hash_calculator_modal.dart:367-383 — 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) sidechain-orchestrator/corewalletfile/convert.go:718 — sidechain-orchestrator/corewalletfile/convert.go:718-734 | sidechain-orchestrator/walletfile/walletfile.go:260-276 — 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) bitwindow/lib/pages/wallet/wallet_overview.dart:657 — bitwindow/lib/pages/wallet/wallet_overview.dart:657-673 | bitwindow/lib/pages/wallet/wallet_receive.dart:509-529 — 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) sidechain-orchestrator/config/enforcer_conf.go:583 — sidechain-orchestrator/config/enforcer_conf.go:583-601 | sidechain-orchestrator/config/sidechain_conf.go:599-615 — 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) bitwindow/lib/pages/settings/settings_network.dart:121 — bitwindow/lib/pages/settings/settings_network.dart:121-137 | bitwindow/lib/pages/settings/settings_network.dart:139-156 — 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) bitwindow/server/engines/wallet_engine.go:384 — bitwindow/server/engines/wallet_engine.go:384-400 | bitwindow/server/engines/wallet_engine.go:740-762 — 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) bitwindow/lib/widgets/draft_panel.dart:135 — bitwindow/lib/widgets/draft_panel.dart:135-151 | bitwindow/lib/widgets/import_descriptor_dialog.dart:40-59 — 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) bitwindow/lib/pages/wallet/timestamp_detail_page.dart:168 — bitwindow/lib/pages/wallet/timestamp_detail_page.dart:168-184 | bitwindow/lib/pages/wallet/timestamp_detail_page.dart:235-251 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:537 — sidechain_core/lib/rpcs/bitassets_rpc.dart:537-553 | sidechain_core/lib/rpcs/bitnames_rpc.dart:649-665 — 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) bitwindow/lib/pages/settings/settings_network.dart:685 — bitwindow/lib/pages/settings/settings_network.dart:685-701 | bitwindow/lib/widgets/traffic_graph_widget.dart:288-307 — 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 (4 corresponding lines) · ×10
  • Edited copy of a member (4 corresponding lines) bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:126 — bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:126-129 | bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:132-135 — 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) sidechain-orchestrator/blockfile/file_unix.go:13 — sidechain-orchestrator/blockfile/file_unix.go:13-16 | sidechain-orchestrator/corewalletfile/file_unix.go:13-16 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) bitwindow/lib/services/chat_file_storage.dart:10 — bitwindow/lib/services/chat_file_storage.dart:10-13 | sidechain_core/lib/settings/secure_store.dart:21-24 — 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:976 — sidechain_core/lib/rpcs/bitassets_rpc.dart:976-979 | sidechain_core/lib/rpcs/bitnames_rpc.dart:815-818 — 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) sidechain-orchestrator/sidechain/bitassets/client.go:148 — sidechain-orchestrator/sidechain/bitassets/client.go:148-151 | sidechain-orchestrator/sidechain/coinshift/client.go:163-166 — 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) bitassets/lib/settings/price_alerts_settings.dart:82 — bitassets/lib/settings/price_alerts_settings.dart:82-85 | bitwindow/lib/providers/chat_provider.dart:1084-1095 — 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) photon/lib/pages/tabs/mempool_explorer_page.dart:181 — photon/lib/pages/tabs/mempool_explorer_page.dart:181-184 | photon/lib/pages/tabs/withdrawals_page.dart:208-211 — 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) bitassets/lib/providers/bitassets_provider.dart:271 — bitassets/lib/providers/bitassets_provider.dart:271-274 | bitwindow/lib/providers/chat_provider.dart:1145-1148 — 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) bitwindow/lib/pages/wallet/check_detail_page.dart:69 — bitwindow/lib/pages/wallet/check_detail_page.dart:69-72 | coinshift/lib/widgets/swap_failure_recovery.dart:227-234 — 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) bitassets/lib/widgets/portfolio_dashboard.dart:503 — bitassets/lib/widgets/portfolio_dashboard.dart:503-506 | bitwindow/lib/pages/wallet/wallet_checks.dart:276-279 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×10
  • Duplicated block (7 lines × 3) bitassets/lib/pages/tabs/auction_browser_page.dart:486 — bitassets/lib/pages/tabs/auction_browser_page.dart:486-492 | bitassets/lib/widgets/amm_analytics_widget.dart:433-439 | bitassets/lib/widgets/transaction_history.dart:245-251 — before extracting anything, compare `bitassets/lib/widgets/amm_analytics_widget.dart` and `bitassets/lib/widgets/transaction_history.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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 `bitassets/lib/pages/tabs/auction_browser_page.dart:486` 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 (7 lines × 3) bitwindow/lib/pages/overview_page.dart:1317 — bitwindow/lib/pages/overview_page.dart:1317-1323 | bitwindow/lib/widgets/combine_broadcast_modal.dart:114-120 | bitwindow/lib/widgets/draft_panel.dart:267-273 — 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.
  • Duplicated block (7 lines × 3) sidechain_core/lib/providers/backend_sidechain_conf_provider.dart:79 — sidechain_core/lib/providers/backend_sidechain_conf_provider.dart:79-85 | sidechain_core/lib/providers/bitcoin_conf_provider.dart:130-136 | REDACTED: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 all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) sidechain-orchestrator/sidechain/bitassets/handler.go:350 — sidechain-orchestrator/sidechain/bitassets/handler.go:350-356 | sidechain-orchestrator/sidechain/bitnames/handler.go:314-320 | sidechain-orchestrator/sidechain/truthcoin/handler.go:612-618 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 3) sidechain-orchestrator/sidechain/bitassets/handler.go:359 — sidechain-orchestrator/sidechain/bitassets/handler.go:359-365 | sidechain-orchestrator/sidechain/bitnames/handler.go:415-421 | sidechain-orchestrator/sidechain/truthcoin/handler.go:630-636 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 3) sidechain-orchestrator/sidechain/bitnames/handler.go:73 — sidechain-orchestrator/sidechain/bitnames/handler.go:73-79 | sidechain-orchestrator/sidechain/photon/handler.go:69-75 | sidechain-orchestrator/sidechain/truthcoin/handler.go:75-81 — `sidechain-orchestrator/sidechain/bitnames/handler.go` and `sidechain-orchestrator/sidechain/photon/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 22 separate duplicated blocks between them, totalling at least 161 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 3) sidechain-orchestrator/sidechain/bitassets/handler.go:324 — sidechain-orchestrator/sidechain/bitassets/handler.go:324-330 | sidechain-orchestrator/sidechain/bitnames/handler.go:288-294 | sidechain-orchestrator/sidechain/truthcoin/handler.go:595-601 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 3) sidechain-orchestrator/sidechain/bitassets/handler.go:332 — sidechain-orchestrator/sidechain/bitassets/handler.go:332-338 | sidechain-orchestrator/sidechain/bitnames/handler.go:296-302 | sidechain-orchestrator/sidechain/truthcoin/handler.go:603-609 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 3) sidechain-orchestrator/sidechain/bitassets/handler.go:408 — sidechain-orchestrator/sidechain/bitassets/handler.go:408-414 | sidechain-orchestrator/sidechain/bitnames/handler.go:454-460 | sidechain-orchestrator/sidechain/coinshift/handler.go:244-250 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 3) sidechain-orchestrator/cmd/drivechaind/main.go:493 — sidechain-orchestrator/cmd/drivechaind/main.go:493-499 | sidechain-orchestrator/cmd/drivechaind/main.go:509-515 | sidechain-orchestrator/cmd/drivechaind/main.go:521-527 — 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 `sidechain-orchestrator/cmd/drivechaind/main.go:493` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×9
  • Edited copy of a member (18 corresponding lines) sidechain-orchestrator/wallet/core_backend.go:1541 — sidechain-orchestrator/wallet/core_backend.go:1541-1558 | sidechain-orchestrator/wallet/electrum_backend.go:1897-1917 — 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) bitassets/lib/pages/tabs/messaging_page.dart:14 — bitassets/lib/pages/tabs/messaging_page.dart:14-32 | bitnames/lib/pages/tabs/messaging_page.dart:14-31 — 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) sail_ui/lib/pages/bitcoin_conf_editor_page.dart:99 — sail_ui/lib/pages/bitcoin_conf_editor_page.dart:99-116 | sail_ui/lib/pages/enforcer_conf_editor_page.dart:125-142 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) sidechain-orchestrator/api/orchestrator_handler.go:1000 — sidechain-orchestrator/api/orchestrator_handler.go:1000-1018 | sidechain-orchestrator/api/orchestrator_handler.go:1032-1049 — 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) bitwindow/server/service/service.go:132 — bitwindow/server/service/service.go:132-150 | sidechain-orchestrator/wallet/service.go:127-144 — 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) sidechain-orchestrator/blockfile/convert.go:200 — sidechain-orchestrator/blockfile/convert.go:200-217 | sidechain-orchestrator/corewalletfile/convert.go:240-257 — 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) bitwindow/lib/providers/check_provider.dart:117 — bitwindow/lib/providers/check_provider.dart:117-141 | bitwindow/lib/providers/timestamp_provider.dart:48-65 — 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) sidechain_core/lib/rpcs/truthcoin_rpc.dart:835 — sidechain_core/lib/rpcs/truthcoin_rpc.dart:835-852 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:860-877 — 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) sidechain-orchestrator/engines/bmm_engine.go:485 — sidechain-orchestrator/engines/bmm_engine.go:485-503 | sidechain-orchestrator/engines/wallet_sync_engine.go:56-73 — 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 (21 corresponding lines) · ×9
  • Edited copy of a member (21 corresponding lines) sidechain_core/lib/rpcs/truthcoin_rpc.dart:621 — sidechain_core/lib/rpcs/truthcoin_rpc.dart:621-641 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:643-665 — 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) sidechain-orchestrator/sidechain/zside/history.go:116 — sidechain-orchestrator/sidechain/zside/history.go:116-141 | sidechain-orchestrator/sidechain/zside/history.go:144-164 — 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) bitwindow/server/api/bitwindowd/bitwindowd.go:1241 — bitwindow/server/api/bitwindowd/bitwindowd.go:1241-1262 | REDACTED:707-727 — 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) bitwindow/server/api/enforcer/enforcer.go:99 — bitwindow/server/api/enforcer/enforcer.go:99-120 | dc-hub/server/api/validator/api_validator.go:206-226 — 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) sidechain-orchestrator/wallet/bip47state/store.go:117 — sidechain-orchestrator/wallet/bip47state/store.go:117-137 | sidechain-orchestrator/wallet/bip47state/store.go:142-167 — 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) bitassets/lib/pages/tabs/reserve_register_page.dart:601 — bitassets/lib/pages/tabs/reserve_register_page.dart:601-621 | bitnames/lib/pages/tabs/reserve_register_page.dart:657-677 — 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) sidechain-orchestrator/wallet/core_rpc.go:345 — sidechain-orchestrator/wallet/core_rpc.go:345-365 | sidechain-orchestrator/wallet/core_rpc.go:369-390 — 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) bitwindow/lib/providers/bitdrive_provider.dart:221 — bitwindow/lib/providers/bitdrive_provider.dart:221-242 | bitwindow/lib/providers/bitdrive_provider.dart:244-264 — 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) bitwindow/server/api/wallet/wallet.go:1062 — bitwindow/server/api/wallet/wallet.go:1062-1082 | bitwindow/server/api/wallet/wallet.go:1085-1105 — 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 (16 corresponding lines) · ×9
  • Edited copy of a member (16 corresponding lines) bitwindow/server/api/multisig/multisig.go:200 — bitwindow/server/api/multisig/multisig.go:200-215 | bitwindow/server/api/multisig/multisig.go:220-235 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) sidechain-orchestrator/config/bitcoin_config_syncer.go:360 — sidechain-orchestrator/config/bitcoin_config_syncer.go:360-381 | sidechain-orchestrator/config/bitcoin_config_syncer.go:413-428 — 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) sidechain-orchestrator/blockfile/convert.go:241 — sidechain-orchestrator/blockfile/convert.go:241-259 | sidechain-orchestrator/corewalletfile/convert.go:348-363 — 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) sidechain-orchestrator/api/bmm_cancel.go:148 — sidechain-orchestrator/api/bmm_cancel.go:148-163 | sidechain-orchestrator/wallet/core_rpc.go:808-823 — 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) bitwindow/lib/widgets/ecash_migration_dialog.dart:236 — bitwindow/lib/widgets/ecash_migration_dialog.dart:236-251 | bitwindow/lib/widgets/ecash_migration_dialog.dart:253-271 — 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) sail_ui/lib/theme/theme_data.dart:24 — sail_ui/lib/theme/theme_data.dart:24-39 | sail_ui/lib/theme/theme_data.dart:41-56 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) sidechain_core/lib/providers/stratum_provider.dart:109 — sidechain_core/lib/providers/stratum_provider.dart:109-124 | sidechain_core/lib/rpcs/orchestrator_stratum_rpc.dart:40-56 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) sidechain-orchestrator/sidechain/truthcoin/types.go:5 — sidechain-orchestrator/sidechain/truthcoin/types.go:5-26 | sidechain-orchestrator/sidechain/zside/types.go:5-20 — 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) sidechain-orchestrator/sidechain/corenode/client.go:48 — sidechain-orchestrator/sidechain/corenode/client.go:48-64 | sidechain-orchestrator/wallet/core_rpc.go:66-81 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×9
  • Duplicated block (17 lines × 2) bitassets/lib/pages/tabs/reserve_register_page.dart:59 — bitassets/lib/pages/tabs/reserve_register_page.dart:59-75 | bitassets/lib/pages/tabs/reserve_register_page.dart:313-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/pages/tabs/reserve_register_page.dart:59` it does not close everything it opens, so those 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 (17 lines × 2) bitnames/lib/pages/tabs/reserve_register_page.dart:84 — bitnames/lib/pages/tabs/reserve_register_page.dart:84-100 | bitnames/lib/pages/tabs/reserve_register_page.dart:391-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitnames/lib/pages/tabs/reserve_register_page.dart:84` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) bitwindow/lib/dialogs/paper_check_dialog.dart:450 — bitwindow/lib/dialogs/paper_check_dialog.dart:450-466 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:228-244 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 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 `bitwindow/lib/dialogs/paper_check_dialog.dart:450` 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 (17 lines × 2) sail_ui/lib/widgets/config_editor/actual_config_panel.dart:38 — sail_ui/lib/widgets/config_editor/actual_config_panel.dart:38-54 | sail_ui/lib/widgets/enforcer_config_editor/actual_config_panel.dart:38-54 — `sail_ui/lib/widgets/config_editor/actual_config_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/actual_config_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 75 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/config_editor/actual_config_panel.dart:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `BitcoinConfigEditorViewModel` in one and `EnforcerConfigEditorViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) sidechain_core/lib/rpcs/bitassets_rpc.dart:519 — sidechain_core/lib/rpcs/bitassets_rpc.dart:519-535 | sidechain_core/lib/rpcs/bitnames_rpc.dart:631-647 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (17 lines × 2) zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:139 — zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:139-155 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:308-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:139` 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 (17 lines × 2) bitwindow/server/models/coinnews/store.go:205 — bitwindow/server/models/coinnews/store.go:205-221 | coinnews/server/store/store.go:179-195 — before extracting anything, compare `bitwindow/server/models/coinnews/store.go` and `coinnews/server/store/store.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 113 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 (17 lines × 2) bitwindow/server/models/coinnews/store.go:224 — bitwindow/server/models/coinnews/store.go:224-240 | coinnews/server/store/store.go:198-214 — before extracting anything, compare `bitwindow/server/models/coinnews/store.go` and `coinnews/server/store/store.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 113 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 (17 lines × 2) sidechain-orchestrator/sidechain/coinshift/client.go:78 — sidechain-orchestrator/sidechain/coinshift/client.go:78-94 | sidechain-orchestrator/sidechain/truthcoin/client.go:78-94 — `sidechain-orchestrator/sidechain/coinshift/client.go` and `sidechain-orchestrator/sidechain/truthcoin/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 137 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/sidechain/coinshift/client.go:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×8
  • Edited copy of a member (23 corresponding lines) sidechain-orchestrator/platform_windows.go:68 — sidechain-orchestrator/platform_windows.go:68-90 | sidechain-orchestrator/platform_windows.go:92-115 — 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) bitwindow/lib/dialogs/paper_check_dialog.dart:45 — bitwindow/lib/dialogs/paper_check_dialog.dart:45-69 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:30-52 — 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) sidechain-orchestrator/api/enforcer_conf_handler.go:25 — sidechain-orchestrator/api/enforcer_conf_handler.go:25-52 | sidechain-orchestrator/api/sidechain_conf_handler.go:36-58 — 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) sail_ui/lib/widgets/config_editor/configurator_panel.dart:322 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:322-348 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:249-271 — 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) bitwindow/lib/widgets/ecash_migration_dialog.dart:273 — bitwindow/lib/widgets/ecash_migration_dialog.dart:273-295 | bitwindow/lib/widgets/ecash_migration_dialog.dart:297-319 — 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) bitwindow/lib/pages/sidechain_activation_management_page.dart:214 — bitwindow/lib/pages/sidechain_activation_management_page.dart:214-236 | bitwindow/lib/pages/sidechain_activation_management_page.dart:343-385 — 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) sidechain_core/lib/rpcs/coinshift_rpc.dart:373 — sidechain_core/lib/rpcs/coinshift_rpc.dart:373-395 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:725-749 — 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) zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:952 — zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:952-974 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:980-1010 — 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.
D3 · God Classes · FunctionTooLong · ×7
  • FunctionTooLong: main.run sidechain-orchestrator/cmd/drivechaind/main.go:154 — FunctionTooLong — run runs 390 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 290 over it, 3.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.Home dc-hub/app/page.tsx:24 — FunctionTooLong — Home runs 298 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 198 over it, 2.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.InfoPage dc-hub/app/info/page.tsx:23 — FunctionTooLong — InfoPage runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: commands.runWalletBurnECX sidechain-orchestrator/commands/wallet_burn_ecx.go:137 — FunctionTooLong — runWalletBurnECX 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.
  • FunctionTooLong: main.realMain REDACTED:72 — FunctionTooLong — realMain runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: console.Console REDACTED:121 — FunctionTooLong — Console runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: explorer-client.ExplorerClient dc-hub/app/sidechains/explorer-client.tsx:50 — FunctionTooLong — ExplorerClient 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.
D31 · IaC & Container Security · Medium IaC · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×7
  • Edited copy of a member (25 corresponding lines) bitwindow/server/models/coinnews/store.go:164 — bitwindow/server/models/coinnews/store.go:164-188 | coinnews/server/store/store.go:137-164 — 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) REDACTED:995 — REDACTED:995-1019 | REDACTED:1592-1618 — 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) bitwindow/lib/widgets/draft_panel.dart:483 — bitwindow/lib/widgets/draft_panel.dart:483-509 | bitwindow/lib/widgets/draft_panel.dart:529-553 — 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) sidechain-orchestrator/wallet/deposits.go:190 — sidechain-orchestrator/wallet/deposits.go:190-215 | sidechain-orchestrator/wallet/splitcache.go:10-34 — 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) REDACTED:2961 — REDACTED:2961-2991 | REDACTED:3009-3033 — 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) sidechain-orchestrator/wallet/descriptor.go:603 — sidechain-orchestrator/wallet/descriptor.go:603-627 | sidechain-orchestrator/wallet/multisiglounge_codec.go:118-142 — 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) sail_ui/lib/pages/sidechains/explorer/transaction_broadcast.dart:27 — sail_ui/lib/pages/sidechains/explorer/transaction_broadcast.dart:27-51 | sail_ui/lib/pages/sidechains/explorer/transaction_broadcast.dart: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.
X3 · Exception handling · Swallowed exception (empty catch) · ×7
  • Swallowed exception (empty catch) sidechain_core/lib/rpcs/bitassets_rpc.dart:364 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) sidechain_core/lib/rpcs/bitnames_rpc.dart:291 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) sidechain_core/lib/rpcs/enforcer_rpc.dart:121 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) sidechain_core/lib/providers/generic_sidechain_conf_provider.dart:146 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) sidechain_core/lib/providers/sidechain_conf_provider.dart:49 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) sidechain_core/lib/providers/wallet_reader_provider.dart:154 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) sidechain_core/lib/providers/wallet_reader_provider.dart:161 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (7 members, 50+ identical tokens) bitassets/lib/pages/tabs/dutch_auction_page.dart:328 — bitassets/lib/pages/tabs/dutch_auction_page.dart:328-352 | bitassets/lib/pages/tabs/reserve_register_page.dart:533-557 | bitnames/lib/pages/tabs/reserve_register_page.dart:570-594 | bitwindow/lib/pages/explorer/block_explorer_dialog.dart:223-247 | bitwindow/lib/pages/wallet/wallet_page.dart:404-428 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:558-577 | zside/lib/widgets/homepage_widget_catalog.dart:718-742 — 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.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) sidechain_core/lib/rpcs/bitassets_rpc.dart:264 — sidechain_core/lib/rpcs/bitassets_rpc.dart:264-286 | sidechain_core/lib/rpcs/bitnames_rpc.dart:191-213 | sidechain_core/lib/rpcs/coinshift_rpc.dart:144-166 | sidechain_core/lib/rpcs/photon_rpc.dart:102-124 | sidechain_core/lib/rpcs/thunder_rpc.dart:96-118 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:295-317 | sidechain_core/lib/rpcs/zside_rpc.dart:144-166 — 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.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) sidechain_core/lib/rpcs/bitassets_rpc.dart:291 — sidechain_core/lib/rpcs/bitassets_rpc.dart:291-299 | sidechain_core/lib/rpcs/bitnames_rpc.dart:218-226 | sidechain_core/lib/rpcs/coinshift_rpc.dart:171-179 | sidechain_core/lib/rpcs/photon_rpc.dart:129-137 | sidechain_core/lib/rpcs/thunder_rpc.dart:123-131 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:322-330 | sidechain_core/lib/rpcs/zside_rpc.dart:171-179 — 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.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) sidechain_core/lib/rpcs/bitassets_rpc.dart:791 — sidechain_core/lib/rpcs/bitassets_rpc.dart:791-798 | sidechain_core/lib/rpcs/bitnames_rpc.dart:368-375 | sidechain_core/lib/rpcs/coinshift_rpc.dart:280-287 | sidechain_core/lib/rpcs/photon_rpc.dart:238-245 | sidechain_core/lib/rpcs/thunder_rpc.dart:276-283 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:426-433 | sidechain_core/lib/rpcs/zside_rpc.dart:307-314 — 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.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) sidechain_core/lib/rpcs/bitassets_rpc.dart:826 — sidechain_core/lib/rpcs/bitassets_rpc.dart:826-837 | sidechain_core/lib/rpcs/bitnames_rpc.dart:403-414 | sidechain_core/lib/rpcs/coinshift_rpc.dart:242-253 | sidechain_core/lib/rpcs/photon_rpc.dart:200-211 | sidechain_core/lib/rpcs/thunder_rpc.dart:243-254 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:393-404 | sidechain_core/lib/rpcs/zside_rpc.dart:274-285 — 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.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) sidechain-orchestrator/sidechain/bitassets/handler.go:148 — sidechain-orchestrator/sidechain/bitassets/handler.go:148-160 | sidechain-orchestrator/sidechain/bitnames/handler.go:136-148 | sidechain-orchestrator/sidechain/coinshift/handler.go:149-161 | sidechain-orchestrator/sidechain/photon/handler.go:148-160 | sidechain-orchestrator/sidechain/thunder/handler.go:147-159 | sidechain-orchestrator/sidechain/truthcoin/handler.go:154-166 | sidechain-orchestrator/sidechain/zside/handler.go:200-212 — 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 (19 corresponding lines) · ×6
  • Edited copy of a member (19 corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:1676 — sidechain_core/lib/rpcs/bitwindow_api.dart:1676-1698 | sidechain_core/lib/rpcs/bitwindow_api.dart:1767-1785 — 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) zside/lib/pages/tabs/zside/zside_transfer_page.dart:181 — zside/lib/pages/tabs/zside/zside_transfer_page.dart:181-199 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:216-234 — 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) bitwindow/lib/pages/message_signer.dart:54 — bitwindow/lib/pages/message_signer.dart:54-72 | bitwindow/lib/pages/message_signer.dart:141-164 — 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) REDACTED:818 — REDACTED:818-836 | REDACTED:906-926 — 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) bitwindow/lib/pages/wallet/widgets/utxo_distribution_chart.dart:45 — bitwindow/lib/pages/wallet/widgets/utxo_distribution_chart.dart:45-68 | bitwindow/lib/widgets/ecash_upgrade_banner.dart:379-397 — 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) REDACTED:42 — REDACTED:42-64 | bitwindow/server/engines/notification_engine.go:75-93 — 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 (12 corresponding lines) · ×6
  • Edited copy of a member (12 corresponding lines) bitwindow/server/models/cheques/cheques.go:152 — bitwindow/server/models/cheques/cheques.go:152-163 | bitwindow/server/models/cheques/cheques.go:165-176 — 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) sidechain-orchestrator/api/wallet_handler.go:931 — sidechain-orchestrator/api/wallet_handler.go:931-942 | sidechain-orchestrator/api/wallet_handler.go:946-957 — 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) sidechain-orchestrator/api/sidechain_conf_handler.go:60 — sidechain-orchestrator/api/sidechain_conf_handler.go:60-71 | sidechain-orchestrator/api/sidechain_conf_handler.go:73-84 — 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) bitassets/lib/pages/tabs/reserve_register_page.dart:790 — bitassets/lib/pages/tabs/reserve_register_page.dart:790-801 | bitnames/lib/pages/tabs/reserve_register_page.dart:951-963 — 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) bitwindow/lib/pages/sidechain_proposal_page.dart:200 — bitwindow/lib/pages/sidechain_proposal_page.dart:200-211 | bitwindow/lib/widgets/hash_calculator_modal.dart:180-191 — 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) bitwindow/server/api/bitwindowd/bitwindowd.go:64 — bitwindow/server/api/bitwindowd/bitwindowd.go:64-78 | bitwindow/server/engines/bitcoind_engine.go:48-59 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×6
  • Edited copies of one member (3 members, 14+ corresponding lines) sidechain-orchestrator/sidechain/truthcoin/handler.go:283 — sidechain-orchestrator/sidechain/truthcoin/handler.go:283-296 | sidechain-orchestrator/sidechain/truthcoin/handler.go:346-363 | sidechain-orchestrator/sidechain/truthcoin/handler.go:365-383 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:68 — sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:68-81 | sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart:77-92 | sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart:68-82 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) sidechain_core/lib/providers/core_variant_provider.dart:33 — sidechain_core/lib/providers/core_variant_provider.dart:33-48 | sidechain_core/lib/providers/electrum_server_provider.dart:27-40 | sidechain_core/lib/providers/tor_config_provider.dart:27-40 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) bitwindow/server/models/multisig/multisig.go:304 — bitwindow/server/models/multisig/multisig.go:304-317 | bitwindow/server/models/multisig/multisig.go:328-342 | bitwindow/server/models/multisig/multisig.go:474-487 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:1475 — sidechain_core/lib/rpcs/bitwindow_api.dart:1475-1489 | sidechain_core/lib/rpcs/bitwindow_api.dart:1513-1526 | sidechain_core/lib/rpcs/bitwindow_api.dart:1539-1552 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) sidechain-orchestrator/platform_unix.go:122 — sidechain-orchestrator/platform_unix.go:122-141 | sidechain-orchestrator/platform_unix.go:144-162 | sidechain-orchestrator/platform_windows.go:140-153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×6
  • Edited copy of a member (6 corresponding lines) bitwindow/server/api/wallet/wallet.go:1376 — bitwindow/server/api/wallet/wallet.go:1376-1382 | bitwindow/server/api/multisig/multisig.go:167-172 — 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) sidechain-orchestrator/api/datadir_network_handler.go:10 — sidechain-orchestrator/api/datadir_network_handler.go:10-32 | sidechain-orchestrator/api/orchestrator_handler.go:278-283 — 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) bitwindow/lib/pages/chat_page.dart:424 — bitwindow/lib/pages/chat_page.dart:424-429 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1006-1011 — 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) bitwindow/server/api/enforcer/enforcer.go:82 — bitwindow/server/api/enforcer/enforcer.go:82-87 | dc-hub/server/api/validator/api_validator.go:189-194 — 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) bitwindow/server/api/bitwindowd/bitwindowd.go:1275 — bitwindow/server/api/bitwindowd/bitwindowd.go:1275-1280 | bitwindow/server/api/wallet/wallet.go:1006-1011 — 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) sidechain-orchestrator/feerate/feerate.go:65 — sidechain-orchestrator/feerate/feerate.go:65-70 | sidechain-orchestrator/sidechain/sidechainesplora/client.go:27-32 — 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 (18 lines × 2) · ×6
  • Duplicated block (18 lines × 2) bitwindow/lib/dialogs/paper_check_dialog.dart:52 — bitwindow/lib/dialogs/paper_check_dialog.dart:52-69 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:35-52 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 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 `bitwindow/lib/dialogs/paper_check_dialog.dart:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) bitwindow/lib/dialogs/remove_encryption_dialog.dart:34 — bitwindow/lib/dialogs/remove_encryption_dialog.dart:34-51 | bitwindow/lib/pages/remove_encryption_page.dart:27-44 — 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 `bitwindow/lib/dialogs/remove_encryption_dialog.dart:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) bitwindow/lib/widgets/coinnews.dart:23 — bitwindow/lib/widgets/coinnews.dart:23-40 | bitwindow/lib/widgets/fee_coinnews.dart:34-51 — before extracting anything, compare `bitwindow/lib/widgets/coinnews.dart` and `bitwindow/lib/widgets/fee_coinnews.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 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 `bitwindow/lib/widgets/coinnews.dart:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) sail_ui/lib/pages/l1_restart_page.dart:42 — sail_ui/lib/pages/l1_restart_page.dart:42-59 | sail_ui/lib/pages/utxo_snapshot_page.dart:64-81 — before extracting anything, compare `sail_ui/lib/pages/l1_restart_page.dart` and `sail_ui/lib/pages/utxo_snapshot_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 113 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 `sail_ui/lib/pages/l1_restart_page.dart:42` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:282 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:282-299 | zside/lib/widgets/homepage_widget_catalog.dart:461-478 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 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 `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:282` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) sail_ui/lib/widgets/components/table.dart:293 — sail_ui/lib/widgets/components/table.dart:293-310 | sail_ui/lib/widgets/components/table.dart:320-337 — both copies are in the same file, so extract the 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 (13 lines × 3) · ×6
  • Duplicated block (13 lines × 3) bitwindow/lib/pages/settings/network_swap_page.dart:124 — bitwindow/lib/pages/settings/network_swap_page.dart:124-136 | sail_ui/lib/pages/l1_restart_page.dart:90-102 | sail_ui/lib/pages/utxo_snapshot_page.dart:110-122 — before extracting anything, compare `bitwindow/lib/pages/settings/network_swap_page.dart` and `sail_ui/lib/pages/l1_restart_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `bitwindow/lib/pages/settings/network_swap_page.dart:124` it does not close everything it opens, so those 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 × 3) bitwindow/lib/pages/wallet/denability_page.dart:201 — bitwindow/lib/pages/wallet/denability_page.dart:201-213 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:580-592 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:870-882 — before extracting anything, compare `bitwindow/lib/pages/wallet/denability_page.dart` and `zside/lib/pages/tabs/zside/zside_melt_cast_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 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 `bitwindow/lib/pages/wallet/denability_page.dart:201` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) bitwindow/lib/pages/wallet/timestamp_detail_page.dart:143 — bitwindow/lib/pages/wallet/timestamp_detail_page.dart:143-155 | bitwindow/lib/pages/wallet/verify_timestamp_page.dart:162-174 | bitwindow/lib/pages/wallet/wallet_timestamps.dart:163-175 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (13 lines × 3) REDACTED:998 — REDACTED:998-1010 | REDACTED:1595-1607 | bitwindow/lib/widgets/import_descriptor_dialog.dart:64-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.
  • Duplicated block (13 lines × 3) truthcoin/lib/pages/market_detail_page.dart:1344 — truthcoin/lib/pages/market_detail_page.dart:1344-1356 | truthcoin/lib/pages/market_detail_page.dart:1694-1706 | truthcoin/lib/pages/market_detail_page.dart:1730-1742 — 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 `truthcoin/lib/pages/market_detail_page.dart:1344` 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, `truthcoin/lib/pages/market_detail_page.dart:1693` calls `loadPositions` and `truthcoin/lib/pages/market_detail_page.dart:1343` 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 (13 lines × 3) sidechain-orchestrator/sidechain/bitassets/handler.go:368 — sidechain-orchestrator/sidechain/bitassets/handler.go:368-380 | sidechain-orchestrator/sidechain/bitnames/handler.go:424-436 | sidechain-orchestrator/sidechain/truthcoin/handler.go:639-651 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (12 lines × 3) · ×6
  • Duplicated block (12 lines × 3) bitassets/lib/widgets/amm_analytics_widget.dart:336 — bitassets/lib/widgets/amm_analytics_widget.dart:336-347 | bitassets/lib/widgets/portfolio_dashboard.dart:380-391 | bitassets/lib/widgets/transaction_history.dart:142-153 — before extracting anything, compare `bitassets/lib/widgets/amm_analytics_widget.dart` and `bitassets/lib/widgets/portfolio_dashboard.dart` 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. 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 `bitassets/lib/widgets/amm_analytics_widget.dart:336` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) bitwindow/lib/dialogs/network_statistics_dialog.dart:178 — bitwindow/lib/dialogs/network_statistics_dialog.dart:178-189 | bitwindow/lib/widgets/network_stats_widget.dart:159-170 | bitwindow/lib/widgets/peers_table_widget.dart:205-216 — 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. 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 × 3) photon/lib/pages/tabs/mempool_explorer_page.dart:121 — photon/lib/pages/tabs/mempool_explorer_page.dart:121-132 | photon/lib/pages/tabs/transaction_builder_page.dart:139-150 | photon/lib/pages/tabs/withdrawals_page.dart:186-197 — before extracting anything, compare `photon/lib/pages/tabs/mempool_explorer_page.dart` and `photon/lib/pages/tabs/withdrawals_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 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 × 3) sail_ui/lib/pages/create_wallet_page.dart:878 — sail_ui/lib/pages/create_wallet_page.dart:878-889 | sail_ui/lib/pages/unlock_wallet_page.dart:231-242 | sail_ui/lib/widgets/wallet_backup_restore.dart:43-54 — 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. 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 × 3) bitwindow/lib/pages/wallet/wallet_overview.dart:529 — bitwindow/lib/pages/wallet/wallet_overview.dart:529-540 | bitwindow/lib/pages/wallet/wallet_overview.dart:542-553 | bitwindow/lib/pages/wallet/wallet_overview.dart:554-565 — 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 `bitwindow/lib/pages/wallet/wallet_overview.dart:529` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bitwindow/lib/pages/wallet/wallet_overview.dart:529` calls `Int64` and `bitwindow/lib/pages/wallet/wallet_overview.dart:554` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) bitwindow/server/models/coinbases/coinbases.go:30 — bitwindow/server/models/coinbases/coinbases.go:30-51 | bitwindow/server/models/mempooltx/mempooltx.go:44-59 | bitwindow/server/models/mempooltx/mempooltx.go:73-84 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/server/models/coinbases/coinbases.go:30` 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. 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 (8 lines × 3) · ×6
  • Duplicated block (8 lines × 3) bitwindow/lib/pages/debug_window.dart:537 — bitwindow/lib/pages/debug_window.dart:537-544 | bitwindow/lib/pages/overview_page.dart:400-407 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:322-329 — before extracting anything, compare `bitwindow/lib/pages/debug_window.dart` and `sail_ui/lib/widgets/debug/sidechain_debug_window.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 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 `bitwindow/lib/pages/debug_window.dart: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.
  • Duplicated block (8 lines × 3) bitwindow/lib/providers/homepage_provider.dart:16 — bitwindow/lib/providers/homepage_provider.dart:16-23 | sail_ui/lib/shell/sidechain_homepage_provider.dart:17-24 | sidechain_core/lib/settings/homepage_configuration_setting.dart:13-20 — 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.
  • Duplicated block (8 lines × 3) sail_ui/lib/pages/sidechains/parent_chain_page.dart:230 — sail_ui/lib/pages/sidechains/parent_chain_page.dart:230-237 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:323-330 | zside/lib/widgets/homepage_widget_catalog.dart:514-521 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 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 × 3) sail_ui/lib/pages/bitcoin_conf_editor_page.dart:9 — sail_ui/lib/pages/bitcoin_conf_editor_page.dart:9-16 | sail_ui/lib/pages/enforcer_conf_editor_page.dart:10-17 | sail_ui/lib/shell/sidechain_conf_editor_page.dart:11-18 — before extracting anything, compare `sail_ui/lib/pages/bitcoin_conf_editor_page.dart` and `sail_ui/lib/pages/enforcer_conf_editor_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) sail_ui/lib/widgets/components/utxo.dart:34 — sail_ui/lib/widgets/components/utxo.dart:34-41 | sidechain_core/lib/rpcs/zside_rpc.dart:538-545 | sidechain_core/lib/rpcs/zside_rpc.dart:605-612 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) sidechain-orchestrator/config/bitcoin_config_syncer.go:674 — sidechain-orchestrator/config/bitcoin_config_syncer.go:674-681 | sidechain-orchestrator/config/enforcer_conf.go:533-540 | sidechain-orchestrator/config/sidechain_conf.go:553-560 — 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.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×5
  • Edited copy of a member (31 corresponding lines) sail_ui/lib/widgets/config_editor/configurator_panel.dart:160 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:160-196 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:123-153 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:138 — bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:138-168 | bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:170-200 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) sidechain-orchestrator/api/wallet_handler.go:2245 — sidechain-orchestrator/api/wallet_handler.go:2245-2283 | sidechain-orchestrator/api/wallet_handler.go:2304-2334 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) zside/lib/widgets/homepage_widget_catalog.dart:366 — zside/lib/widgets/homepage_widget_catalog.dart:366-396 | zside/lib/widgets/homepage_widget_catalog.dart:398-428 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) bitwindow/lib/pages/settings/network_swap_page.dart:46 — bitwindow/lib/pages/settings/network_swap_page.dart:46-76 | sail_ui/lib/pages/l1_restart_page.dart:27-59 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×5
  • Edited copy of a member (35 corresponding lines) sidechain-orchestrator/wallet/descriptor.go:487 — sidechain-orchestrator/wallet/descriptor.go:487-521 | sidechain-orchestrator/wallet/descriptor.go:523-570 — 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) bitwindow/lib/pages/wallet/bump_fee_dialog.dart:130 — bitwindow/lib/pages/wallet/bump_fee_dialog.dart:130-165 | bitwindow/lib/pages/wallet/bump_fee_dialog.dart:167-201 — 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) bitwindow/server/models/coinnews/store.go:124 — bitwindow/server/models/coinnews/store.go:124-158 | coinnews/server/store/store.go:101-135 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) bitwindow/server/api/server.go:339 — bitwindow/server/api/server.go:339-373 | REDACTED:165-204 — 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) truthcoin/lib/pages/market_detail_page.dart:1671 — truthcoin/lib/pages/market_detail_page.dart:1671-1706 | truthcoin/lib/pages/market_detail_page.dart:1708-1742 — 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 (22 corresponding lines) · ×5
  • Edited copy of a member (22 corresponding lines) bitwindow/lib/pages/root_page.dart:397 — bitwindow/lib/pages/root_page.dart:397-418 | sail_ui/lib/shell/sidechain_home_page.dart:82-103 — 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) coinnews/codec/decode.go:60 — coinnews/codec/decode.go:60-81 | coinnews/codec/decode.go:83-108 — 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) sail_ui/lib/shell/sidechain_conf_editor_page.dart:320 — sail_ui/lib/shell/sidechain_conf_editor_page.dart:320-341 | sail_ui/lib/widgets/components/setting_row.dart:80-101 — 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) bitwindow/lib/dialogs/paper_check_dialog.dart:145 — bitwindow/lib/dialogs/paper_check_dialog.dart:145-169 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:63-84 — 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) sail_ui/lib/pages/sidechains/explorer/explorer_model.dart:110 — sail_ui/lib/pages/sidechains/explorer/explorer_model.dart:110-134 | sail_ui/lib/pages/sidechains/explorer/explorer_model.dart:193-214 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 8+ corresponding lines) sidechain_core/lib/rpcs/bitassets_rpc.dart:960 — sidechain_core/lib/rpcs/bitassets_rpc.dart:960-967 | sidechain_core/lib/rpcs/bitnames_rpc.dart:745-752 | sidechain_core/lib/rpcs/bitnames_rpc.dart:853-862 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) sidechain-orchestrator/sidechain/bitassets/handler.go:340 — sidechain-orchestrator/sidechain/bitassets/handler.go:340-347 | sidechain-orchestrator/sidechain/bitnames/handler.go:304-311 | sidechain-orchestrator/sidechain/truthcoin/handler.go:620-627 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) sidechain-orchestrator/sidechain/bitassets/handler.go:349 — sidechain-orchestrator/sidechain/bitassets/handler.go:349-356 | sidechain-orchestrator/sidechain/bitnames/handler.go:313-320 | sidechain-orchestrator/sidechain/truthcoin/handler.go:611-618 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) sidechain-orchestrator/sidechain/bitassets/handler.go:358 — sidechain-orchestrator/sidechain/bitassets/handler.go:358-365 | sidechain-orchestrator/sidechain/bitnames/handler.go:414-421 | sidechain-orchestrator/sidechain/truthcoin/handler.go:629-636 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) sidechain-orchestrator/sidechain/photon/handler.go:77 — sidechain-orchestrator/sidechain/photon/handler.go:77-84 | sidechain-orchestrator/sidechain/thunder/backend.go:33-40 | sidechain-orchestrator/sidechain/truthcoin/handler.go:83-90 — 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 · Duplicated block (21 lines × 2) · ×5
  • Duplicated block (21 lines × 2) bitassets/lib/widgets/asset_issuance_wizard.dart:215 — bitassets/lib/widgets/asset_issuance_wizard.dart:215-235 | bitassets/lib/widgets/asset_issuance_wizard.dart:390-410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/widgets/asset_issuance_wizard.dart:215` 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 (21 lines × 2) bitwindow/lib/pages/settings/settings_reset.dart:148 — bitwindow/lib/pages/settings/settings_reset.dart:148-168 | sail_ui/lib/pages/settings_reset.dart:118-138 — before extracting anything, compare `bitwindow/lib/pages/settings/settings_reset.dart` and `sail_ui/lib/pages/settings_reset.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bitwindow/lib/pages/settings/settings_reset.dart:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) sail_ui/lib/pages/l1_restart_page.dart:65 — sail_ui/lib/pages/l1_restart_page.dart:65-85 | sail_ui/lib/pages/utxo_snapshot_page.dart:87-107 — before extracting anything, compare `sail_ui/lib/pages/l1_restart_page.dart` and `sail_ui/lib/pages/utxo_snapshot_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 113 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 `sail_ui/lib/pages/l1_restart_page.dart:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (21 lines × 2) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:247 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:247-267 | zside/lib/widgets/homepage_widget_catalog.dart:430-450 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 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 `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:247` it does not close everything it opens, so those 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 (21 lines × 2) sail_ui/lib/style/color.dart:151 — sail_ui/lib/style/color.dart:151-171 | sail_ui/lib/style/color.dart:200-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 `sail_ui/lib/style/color.dart:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `sail_ui/lib/style/color.dart:148` calls `withValues` and `sail_ui/lib/style/color.dart:197` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×5
  • Duplicated block (19 lines × 2) bitwindow/lib/pages/settings/network_swap_page.dart:208 — bitwindow/lib/pages/settings/network_swap_page.dart:208-226 | sail_ui/lib/pages/l1_restart_page.dart:172-190 — before extracting anything, compare `bitwindow/lib/pages/settings/network_swap_page.dart` and `sail_ui/lib/pages/l1_restart_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `bitwindow/lib/pages/settings/network_swap_page.dart:208` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:660 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:660-678 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:738-756 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:660` 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) sail_ui/lib/widgets/wallet_backup_restore.dart:225 — sail_ui/lib/widgets/wallet_backup_restore.dart:225-243 | sail_ui/lib/widgets/wallet_backup_restore.dart:1101-1119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/wallet_backup_restore.dart:225` 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) sidechain_core/lib/rpcs/bitassets_rpc.dart:268 — sidechain_core/lib/rpcs/bitassets_rpc.dart:268-286 | sidechain_core/lib/rpcs/bitnames_rpc.dart:195-213 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 `sidechain_core/lib/rpcs/bitassets_rpc.dart:268` 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 (19 lines × 2) zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:190 — zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:190-208 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:286-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×5
  • Duplicated block (6 lines × 3) sidechain_core/lib/rpcs/bitassets_rpc.dart:473 — sidechain_core/lib/rpcs/bitassets_rpc.dart:473-478 | sidechain_core/lib/rpcs/bitassets_rpc.dart:483-488 | sidechain_core/lib/rpcs/bitassets_rpc.dart:493-498 — 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 `sidechain_core/lib/rpcs/bitassets_rpc.dart:473` 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 × 3) bitwindow/lib/widgets/combine_broadcast_modal.dart:297 — bitwindow/lib/widgets/combine_broadcast_modal.dart:297-302 | bitwindow/lib/widgets/import_psbt_modal.dart:380-385 | bitwindow/lib/widgets/import_psbt_modal.dart:477-482 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bitwindow/lib/widgets/import_psbt_modal.dart:386` calls `SailRow`, `Expanded` and `bitwindow/lib/widgets/combine_broadcast_modal.dart:303` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) sidechain_core/lib/settings/bitcoin_unit_settings.dart:18 — sidechain_core/lib/settings/bitcoin_unit_settings.dart:18-23 | sidechain_core/lib/settings/font_settings.dart:20-25 | sidechain_core/lib/settings/theme_settings.dart:52-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 all 3 call sites, so a change lands once.
  • Duplicated block (6 lines × 3) sidechain-orchestrator/api/multisiglounge_handler.go:651 — sidechain-orchestrator/api/multisiglounge_handler.go:651-656 | sidechain-orchestrator/api/multisiglounge_handler.go:726-731 | sidechain-orchestrator/api/multisiglounge_handler.go:836-841 — 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 `sidechain-orchestrator/api/multisiglounge_handler.go:651` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) sidechain-orchestrator/sidechain/bitassets/handler.go:188 — sidechain-orchestrator/sidechain/bitassets/handler.go:188-193 | sidechain-orchestrator/sidechain/coinshift/handler.go:189-194 | sidechain-orchestrator/sidechain/photon/handler.go:188-193 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/coinshift/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 180 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (5 lines × 7) · ×5
  • Duplicated block (5 lines × 7) sidechain_core/lib/rpcs/bbc_rpc.dart:131 — sidechain_core/lib/rpcs/bbc_rpc.dart:131-135 | sidechain_core/lib/rpcs/bitassets_rpc.dart:307-311 | sidechain_core/lib/rpcs/bitnames_rpc.dart:234-238 | sidechain_core/lib/rpcs/coinshift_rpc.dart:187-191 | sidechain_core/lib/rpcs/photon_rpc.dart:145-149 | sidechain_core/lib/rpcs/thunder_rpc.dart:139-143 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:338-342 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 7) sidechain_core/lib/rpcs/bitassets_rpc.dart:785 — sidechain_core/lib/rpcs/bitassets_rpc.dart:785-789 | sidechain_core/lib/rpcs/bitnames_rpc.dart:416-420 | sidechain_core/lib/rpcs/coinshift_rpc.dart:336-340 | sidechain_core/lib/rpcs/photon_rpc.dart:294-298 | sidechain_core/lib/rpcs/thunder_rpc.dart:332-336 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:482-486 | sidechain_core/lib/rpcs/zside_rpc.dart:363-367 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 7) sidechain_core/lib/rpcs/bitassets_rpc.dart:800 — sidechain_core/lib/rpcs/bitassets_rpc.dart:800-804 | sidechain_core/lib/rpcs/bitnames_rpc.dart:377-381 | sidechain_core/lib/rpcs/coinshift_rpc.dart:301-305 | sidechain_core/lib/rpcs/photon_rpc.dart:259-263 | sidechain_core/lib/rpcs/thunder_rpc.dart:297-301 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:447-451 | sidechain_core/lib/rpcs/zside_rpc.dart:328-332 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 7) sidechain_core/lib/rpcs/bitassets_rpc.dart:806 — sidechain_core/lib/rpcs/bitassets_rpc.dart:806-810 | sidechain_core/lib/rpcs/bitnames_rpc.dart:383-387 | sidechain_core/lib/rpcs/coinshift_rpc.dart:289-293 | sidechain_core/lib/rpcs/photon_rpc.dart:247-251 | sidechain_core/lib/rpcs/thunder_rpc.dart:285-289 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:435-439 | sidechain_core/lib/rpcs/zside_rpc.dart:316-320 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 7) sidechain_core/lib/rpcs/bitassets_rpc.dart:812 — sidechain_core/lib/rpcs/bitassets_rpc.dart:812-816 | sidechain_core/lib/rpcs/bitnames_rpc.dart:389-393 | sidechain_core/lib/rpcs/coinshift_rpc.dart:295-299 | sidechain_core/lib/rpcs/photon_rpc.dart:253-257 | sidechain_core/lib/rpcs/thunder_rpc.dart:291-295 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:441-445 | sidechain_core/lib/rpcs/zside_rpc.dart:322-326 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×5
  • Outbound HTTP without resilience bitwindow/server/dial/dial.go:56 — `http.DefaultClient` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience bitwindow/server/dial/dial.go:67 — `http.DefaultClient` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience bitwindow/server/dial/dial.go:78 — `http.DefaultClient` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience bitwindow/server/dial/dial.go:235 — `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience dc-hub/server/dial/dial.go:49 — `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×4
  • Change coupling: bitnames_rpc.dart ↔ thunder_rpc.dart sidechain_core/lib/rpcs/bitnames_rpc.dart:1 — `sidechain_core/lib/rpcs/bitnames_rpc.dart` and `sidechain_core/lib/rpcs/thunder_rpc.dart` change together 64% of the time (29 of the 45 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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 29 shared commits counted here, the most recent 3 are `5420fa16` multi: add listallutxos to sidechain rpc (at that commit the files were still `sail_ui/lib/rpcs/bitnames_rpc.dart` and `sail_ui/lib/rpcs/thunder_rpc.dart`); `9f701511` sail_ui: move getLatestFailedWithdrawalBundleHeight to base class (at that commit the files were still `sail_ui/lib/rpcs/bitnames_rpc.dart` and `sail_ui/lib/rpcs/thunder_rpc.dart`); `f64b66cc` clients: send correctly on sidechains (at that commit the files were still `sail_ui/lib/rpcs/bitnames_rpc.dart` and `sail_ui/lib/rpcs/thunder_rpc.dart`) — run `git show` on any of them.
  • Change coupling: router.dart ↔ sail_ui.dart sail_ui/lib/pages/router.dart:1 — `sail_ui/lib/pages/router.dart` and `sail_ui/lib/sail_ui.dart` change together 58% of the time (7 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 7 shared commits counted here, the most recent 3 are `535a8529` multi: add better sidechain guard; `fbd8379a` sail_ui: add SidechainDebugWindow and NetworkSwitchPage to sidechains; `df4dea34` multi: add conf provider to sidechains — run `git show` on any of them.
  • Change coupling: check_detail_page.dart ↔ wallet_checks.dart bitwindow/lib/pages/wallet/check_detail_page.dart:1 — `bitwindow/lib/pages/wallet/check_detail_page.dart` and `bitwindow/lib/pages/wallet/wallet_checks.dart` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise 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 `c18a05f7` bitwindow: show partial funding status in cheque UI; `bab14548` bitwindow: unlock cheque cache correctly (at that commit the files were still `bitwindow/lib/pages/wallet/cheque_detail_page.dart` and `bitwindow/lib/pages/wallet/wallet_cheques.dart`); `63a1375f` bitwindow: make cheque works with bitcoin core (at that commit the files were still `bitwindow/lib/pages/wallet/cheque_detail_page.dart` and `bitwindow/lib/pages/wallet/wallet_cheques.dart`) — run `git show` on any of them.
  • Change coupling: processed_blocks.go ↔ store.go bitwindow/server/models/blocks/processed_blocks.go:1 — `bitwindow/server/models/blocks/processed_blocks.go` and `bitwindow/server/models/coinnews/store.go` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `b40e0c1c` bitwindow: keep user data through backup and time; `e3bf62e9` bitwindow: map each error to the right code; `a3fa63f4` bitwindow: read rows through Get and Select — run `git show` on any of them.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (5 members, 50+ identical tokens) sidechain_core/lib/rpcs/coinshift_rpc.dart:196 — sidechain_core/lib/rpcs/coinshift_rpc.dart:196-207 | sidechain_core/lib/rpcs/photon_rpc.dart:154-165 | sidechain_core/lib/rpcs/thunder_rpc.dart:197-208 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:347-358 | sidechain_core/lib/rpcs/zside_rpc.dart:228-239 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) sidechain_core/lib/rpcs/coinshift_rpc.dart:265 — sidechain_core/lib/rpcs/coinshift_rpc.dart:265-272 | sidechain_core/lib/rpcs/photon_rpc.dart:223-230 | sidechain_core/lib/rpcs/thunder_rpc.dart:261-268 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:411-418 | sidechain_core/lib/rpcs/zside_rpc.dart:292-299 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) sidechain_core/lib/rpcs/coinshift_rpc.dart:307 — sidechain_core/lib/rpcs/coinshift_rpc.dart:307-314 | sidechain_core/lib/rpcs/photon_rpc.dart:265-272 | sidechain_core/lib/rpcs/thunder_rpc.dart:303-310 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:453-460 | sidechain_core/lib/rpcs/zside_rpc.dart:334-341 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) sidechain_core/lib/rpcs/coinshift_rpc.dart:316 — sidechain_core/lib/rpcs/coinshift_rpc.dart:316-323 | sidechain_core/lib/rpcs/photon_rpc.dart:274-281 | sidechain_core/lib/rpcs/thunder_rpc.dart:312-319 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:462-469 | sidechain_core/lib/rpcs/zside_rpc.dart:343-350 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×4
  • Edited copy of a member (37 corresponding lines) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:665 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:665-704 | bitwindow/lib/pages/explorer/block_explorer_dialog.dart:744-780 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:1356 — sidechain_core/lib/rpcs/bitwindow_api.dart:1356-1398 | sidechain_core/lib/rpcs/bitwindow_api.dart:1426-1462 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) bitwindow/lib/pages/debug_window.dart:25 — bitwindow/lib/pages/debug_window.dart:25-66 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:21-57 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) coinshift/lib/pages/swap_analytics_page.dart:11 — coinshift/lib/pages/swap_analytics_page.dart:11-51 | coinshift/lib/pages/tabs/swaps_page.dart:13-49 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×4
  • Edited copy of a member (28 corresponding lines) sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:692 — sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:692-719 | sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:721-753 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) sidechain-orchestrator/health.go:116 — sidechain-orchestrator/health.go:116-149 | REDACTED:4113-4140 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) bitwindow/lib/pages/root_page.dart:136 — bitwindow/lib/pages/root_page.dart:136-163 | sail_ui/lib/shell/sidechain_home_page.dart:45-80 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) sail_ui/lib/widgets/core/sail_shadow.dart:16 — sail_ui/lib/widgets/core/sail_shadow.dart:16-45 | sail_ui/lib/widgets/core/sail_shadow.dart:60-87 — 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 (26 corresponding lines) · ×4
  • Edited copy of a member (26 corresponding lines) bitwindow/server/miningpools/registry.go:146 — bitwindow/server/miningpools/registry.go:146-171 | sidechain-orchestrator/config/netcatalog/catalog.go:439-465 — 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) bitassets/lib/pages/tabs/asset_explorer_page.dart:219 — bitassets/lib/pages/tabs/asset_explorer_page.dart:219-246 | bitassets/lib/widgets/amm_analytics_widget.dart:295-320 — 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) bitassets/lib/pages/tabs/asset_explorer_page.dart:578 — bitassets/lib/pages/tabs/asset_explorer_page.dart:578-605 | bitwindow/lib/pages/wallet/timestamp_detail_page.dart:199-224 — 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) coinshift/lib/widgets/swap_scheduler_widget.dart:11 — coinshift/lib/widgets/swap_scheduler_widget.dart:11-41 | sail_ui/lib/pages/sidechains/bmm_tab.dart:174-199 — 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 copies of one member (3 members, 10+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 10+ corresponding lines) bitassets/lib/pages/tabs/auction_browser_page.dart:483 — bitassets/lib/pages/tabs/auction_browser_page.dart:483-492 | bitassets/lib/widgets/amm_analytics_widget.dart:430-439 | bitassets/lib/widgets/transaction_history.dart:242-251 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) sidechain-orchestrator/api/hardware_handler.go:58 — sidechain-orchestrator/api/hardware_handler.go:58-68 | sidechain-orchestrator/api/hardware_handler.go:73-83 | sidechain-orchestrator/api/hardware_handler.go:102-111 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) sidechain-orchestrator/sidechain/bitassets/handler.go:30 — sidechain-orchestrator/sidechain/bitassets/handler.go:30-40 | sidechain-orchestrator/sidechain/jsonrpc_proxy.go:34-43 | sidechain-orchestrator/sidechain/truthcoin/handler.go:27-36 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) sidechain_core/lib/providers/wallet_reader_provider.dart:425 — sidechain_core/lib/providers/wallet_reader_provider.dart:425-434 | sidechain_core/lib/providers/wallet_reader_provider.dart:476-492 | sidechain_core/lib/providers/wallet_writer_provider.dart:290-306 — 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, 11+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 11+ corresponding lines) coinnews/server/api/api.go:30 — coinnews/server/api/api.go:30-40 | coinnews/server/api/api.go:42-52 | coinnews/server/api/api.go:99-114 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) coinnews/server/scanner/client.go:33 — coinnews/server/scanner/client.go:33-43 | sidechain-orchestrator/config/bitcoin_conf.go:269-279 | sidechain-orchestrator/wallet/ecx_burn_core.go:17-27 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) sidechain-orchestrator/sidechain/zside/node.go:54 — sidechain-orchestrator/sidechain/zside/node.go:54-64 | sidechain-orchestrator/wallet/core_rpc.go:192-202 | sidechain-orchestrator/wallet/core_rpc.go:876-886 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:1285 — sidechain_core/lib/rpcs/bitwindow_api.dart:1285-1295 | sidechain_core/lib/rpcs/bitwindow_api.dart:1700-1710 | sidechain_core/lib/rpcs/bitwindow_api.dart:1745-1755 — 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 (3 members, 9+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 9+ corresponding lines) sidechain_core/lib/rpcs/bitassets_rpc.dart:470 — sidechain_core/lib/rpcs/bitassets_rpc.dart:470-478 | sidechain_core/lib/rpcs/bitassets_rpc.dart:490-498 | sidechain_core/lib/rpcs/bitnames_rpc.dart:589-597 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) sidechain-orchestrator/commands/bmm.go:23 — sidechain-orchestrator/commands/bmm.go:23-31 | sidechain-orchestrator/commands/mining.go:21-29 | sidechain-orchestrator/commands/thunder.go:19-27 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:1042 — sidechain_core/lib/rpcs/bitwindow_api.dart:1042-1050 | sidechain_core/lib/rpcs/bitwindow_api.dart:1052-1060 | sidechain_core/lib/rpcs/bitwindow_api.dart:1169-1177 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:310 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:310-318 | bitwindow/lib/widgets/peers_table_widget.dart:19-27 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:179-188 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 12+ corresponding lines) bitassets/lib/pages/tabs/auction_browser_page.dart:501 — bitassets/lib/pages/tabs/auction_browser_page.dart:501-516 | bitwindow/lib/widgets/tx_flow_diagram.dart:260-271 | coinshift/lib/widgets/swap/swap_status_badge.dart:10-27 — 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.
  • Edited copies of one member (3 members, 12+ corresponding lines) REDACTED:315 — REDACTED:315-326 | REDACTED:332-344 | REDACTED:347-358 — 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.
  • Edited copies of one member (3 members, 12+ corresponding lines) sidechain-orchestrator/engines/bmmstate/store.go:155 — sidechain-orchestrator/engines/bmmstate/store.go:155-169 | sidechain-orchestrator/engines/bmmstate/store.go:172-183 | sidechain-orchestrator/engines/bmmstate/store.go:203-218 — 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.
  • Edited copies of one member (3 members, 12+ corresponding lines) sidechain-orchestrator/corewalletfile/convert.go:671 — sidechain-orchestrator/corewalletfile/convert.go:671-682 | sidechain-orchestrator/ecash_migration.go:713-724 | sidechain-orchestrator/snapshot.go:564-575 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×4
  • Edited copy of a member (3 corresponding lines) sidechain-orchestrator/blockfile/file_windows.go:9 — sidechain-orchestrator/blockfile/file_windows.go:9-12 | sidechain-orchestrator/corewalletfile/file_windows.go:9-11 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) sidechain_core/lib/models/bitcoin_config_options.dart:1220 — sidechain_core/lib/models/bitcoin_config_options.dart:1220-1222 | sidechain_core/lib/models/enforcer_config_options.dart:303-305 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) bitassets/lib/pages/tabs/reserve_register_page.dart:675 — bitassets/lib/pages/tabs/reserve_register_page.dart:675-677 | bitnames/lib/pages/tabs/reserve_register_page.dart:722-724 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) sidechain_core/lib/models/bitcoin_config_options.dart:1224 — sidechain_core/lib/models/bitcoin_config_options.dart:1224-1226 | sidechain_core/lib/models/enforcer_config_options.dart:307-309 — 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 (15–16 lines × 2) · ×4
  • Duplicated block (15–16 lines × 2) bitwindow/lib/pages/wallet/create_timestamp_page.dart:103 — bitwindow/lib/pages/wallet/create_timestamp_page.dart:103-118 | bitwindow/lib/pages/wallet/verify_timestamp_page.dart:70-84 — before extracting anything, compare `bitwindow/lib/pages/wallet/create_timestamp_page.dart` and `bitwindow/lib/pages/wallet/verify_timestamp_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/create_timestamp_page.dart:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15–16 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:358 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:358-372 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:651-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:358` it does not close everything it opens, so those 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, `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:666` calls `SailTableHeaderCell`, `onSort` and `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:372` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15–16 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1343 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1343-1357 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1430-1445 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1343` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) bitwindow/lib/widgets/hash_calculator_modal.dart:200 — bitwindow/lib/widgets/hash_calculator_modal.dart:200-214 | bitwindow/lib/widgets/hash_calculator_modal.dart:368-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×4
  • Duplicated block (13 lines × 6) bbc/lib/widgets/homepage_widget_catalog.dart:206 — bbc/lib/widgets/homepage_widget_catalog.dart:206-218 | coinshift/lib/widgets/homepage_widget_catalog.dart:349-361 | photon/lib/widgets/homepage_widget_catalog.dart:226-238 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:674-686 | thunder/lib/widgets/homepage_widget_catalog.dart:229-241 | truthcoin/lib/widgets/homepage_widget_catalog.dart:239-251 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 × 6) sidechain-orchestrator/sidechain/bitassets/client.go:184 — sidechain-orchestrator/sidechain/bitassets/client.go:184-196 | sidechain-orchestrator/sidechain/bitnames/client.go:234-246 | sidechain-orchestrator/sidechain/coinshift/client.go:199-211 | sidechain-orchestrator/sidechain/photon/client.go:184-196 | sidechain-orchestrator/sidechain/thunder/client.go:184-196 | sidechain-orchestrator/sidechain/truthcoin/client.go:199-211 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (13 lines × 6) sidechain-orchestrator/sidechain/bitassets/client.go:200 — sidechain-orchestrator/sidechain/bitassets/client.go:200-212 | sidechain-orchestrator/sidechain/bitnames/client.go:250-262 | sidechain-orchestrator/sidechain/coinshift/client.go:215-227 | sidechain-orchestrator/sidechain/photon/client.go:200-212 | sidechain-orchestrator/sidechain/thunder/client.go:200-212 | sidechain-orchestrator/sidechain/truthcoin/client.go:215-227 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (13 lines × 6) sidechain-orchestrator/sidechain/bitassets/client.go:217 — sidechain-orchestrator/sidechain/bitassets/client.go:217-229 | sidechain-orchestrator/sidechain/bitnames/client.go:267-279 | sidechain-orchestrator/sidechain/coinshift/client.go:232-244 | sidechain-orchestrator/sidechain/photon/client.go:217-229 | sidechain-orchestrator/sidechain/thunder/client.go:217-229 | sidechain-orchestrator/sidechain/truthcoin/client.go:232-244 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (12–13 lines × 2) · ×4
  • Duplicated block (12–13 lines × 2) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:145 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:145-157 | bitwindow/lib/pages/explorer/block_explorer_dialog.dart:857-868 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/explorer/block_explorer_dialog.dart:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) bitwindow/lib/pages/root_page.dart:136 — bitwindow/lib/pages/root_page.dart:136-148 | sail_ui/lib/shell/sidechain_home_page.dart:45-56 — before extracting anything, compare `bitwindow/lib/pages/root_page.dart` and `sail_ui/lib/shell/sidechain_home_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/root_page.dart: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.
  • Duplicated block (12–13 lines × 2) bitwindow/lib/pages/wallet/timestamp_detail_page.dart:168 — bitwindow/lib/pages/wallet/timestamp_detail_page.dart:168-179 | bitwindow/lib/pages/wallet/timestamp_detail_page.dart:199-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/timestamp_detail_page.dart:168` it does not close everything it opens, so those 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 (12–13 lines × 2) sail_ui/lib/pages/log_page.dart:200 — sail_ui/lib/pages/log_page.dart:200-211 | sail_ui/lib/pages/log_page.dart:215-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 `sail_ui/lib/pages/log_page.dart:215` 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 × 5) · ×4
  • Duplicated block (8 lines × 5) sidechain_core/lib/rpcs/coinshift_rpc.dart:265 — sidechain_core/lib/rpcs/coinshift_rpc.dart:265-272 | sidechain_core/lib/rpcs/photon_rpc.dart:223-230 | sidechain_core/lib/rpcs/thunder_rpc.dart:261-268 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:411-418 | sidechain_core/lib/rpcs/zside_rpc.dart:292-299 — before extracting anything, compare `sidechain_core/lib/rpcs/coinshift_rpc.dart` and `sidechain_core/lib/rpcs/photon_rpc.dart` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 150 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 (8 lines × 5) sidechain_core/lib/rpcs/coinshift_rpc.dart:307 — sidechain_core/lib/rpcs/coinshift_rpc.dart:307-314 | sidechain_core/lib/rpcs/photon_rpc.dart:265-272 | sidechain_core/lib/rpcs/thunder_rpc.dart:303-310 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:453-460 | sidechain_core/lib/rpcs/zside_rpc.dart:334-341 — before extracting anything, compare `sidechain_core/lib/rpcs/coinshift_rpc.dart` and `sidechain_core/lib/rpcs/photon_rpc.dart` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 150 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 (8 lines × 5) sidechain_core/lib/rpcs/coinshift_rpc.dart:316 — sidechain_core/lib/rpcs/coinshift_rpc.dart:316-323 | sidechain_core/lib/rpcs/photon_rpc.dart:274-281 | sidechain_core/lib/rpcs/thunder_rpc.dart:312-319 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:462-469 | sidechain_core/lib/rpcs/zside_rpc.dart:343-350 — before extracting anything, compare `sidechain_core/lib/rpcs/coinshift_rpc.dart` and `sidechain_core/lib/rpcs/photon_rpc.dart` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 150 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 (8 lines × 5) bitassets/lib/pages/tabs/asset_explorer_page.dart:675 — bitassets/lib/pages/tabs/asset_explorer_page.dart:675-682 | bitassets/lib/pages/tabs/auction_browser_page.dart:603-610 | bitassets/lib/widgets/amm_analytics_widget.dart:581-588 | bitassets/lib/widgets/portfolio_dashboard.dart:533-540 | bitassets/lib/widgets/transaction_history.dart:288-295 — before extracting anything, compare `bitassets/lib/pages/tabs/asset_explorer_page.dart` and `bitassets/lib/pages/tabs/auction_browser_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×4
  • Duplicated block (7 lines × 6) sidechain_core/lib/rpcs/bitassets_rpc.dart:245 — sidechain_core/lib/rpcs/bitassets_rpc.dart:245-251 | sidechain_core/lib/rpcs/bitnames_rpc.dart:172-178 | sidechain_core/lib/rpcs/photon_rpc.dart:83-89 | sidechain_core/lib/rpcs/thunder_rpc.dart:77-83 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:276-282 | sidechain_core/lib/rpcs/zside_rpc.dart:120-126 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (7 lines × 6) sidechain-orchestrator/sidechain/bitassets/handler.go:173 — sidechain-orchestrator/sidechain/bitassets/handler.go:173-179 | sidechain-orchestrator/sidechain/bitnames/handler.go:161-167 | sidechain-orchestrator/sidechain/coinshift/handler.go:174-180 | sidechain-orchestrator/sidechain/photon/handler.go:173-179 | sidechain-orchestrator/sidechain/truthcoin/handler.go:179-185 | sidechain-orchestrator/sidechain/zside/handler.go:225-231 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 6) sidechain-orchestrator/sidechain/bitassets/client.go:114 — sidechain-orchestrator/sidechain/bitassets/client.go:114-120 | sidechain-orchestrator/sidechain/bitnames/client.go:124-130 | sidechain-orchestrator/sidechain/coinshift/client.go:129-135 | sidechain-orchestrator/sidechain/photon/client.go:114-120 | sidechain-orchestrator/sidechain/thunder/client.go:114-120 | sidechain-orchestrator/sidechain/truthcoin/client.go:129-135 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 6) sidechain-orchestrator/sidechain/bitassets/handler.go:203 — sidechain-orchestrator/sidechain/bitassets/handler.go:203-209 | sidechain-orchestrator/sidechain/bitnames/handler.go:184-190 | sidechain-orchestrator/sidechain/coinshift/handler.go:204-210 | sidechain-orchestrator/sidechain/photon/handler.go:203-209 | sidechain-orchestrator/sidechain/thunder/handler.go:201-207 | sidechain-orchestrator/sidechain/zside/handler.go:248-254 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×4
  • Duplicated block (5 lines × 5) sidechain_core/lib/rpcs/bitassets_rpc.dart:301 — sidechain_core/lib/rpcs/bitassets_rpc.dart:301-305 | sidechain_core/lib/rpcs/bitnames_rpc.dart:228-232 | sidechain_core/lib/rpcs/photon_rpc.dart:139-143 | sidechain_core/lib/rpcs/thunder_rpc.dart:133-137 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:332-336 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 5) sidechain_core/lib/rpcs/bitassets_rpc.dart:455 — sidechain_core/lib/rpcs/bitassets_rpc.dart:455-459 | sidechain_core/lib/rpcs/bitnames_rpc.dart:574-578 | sidechain_core/lib/rpcs/coinshift_rpc.dart:347-351 | sidechain_core/lib/rpcs/photon_rpc.dart:305-309 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:516-520 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 5) sidechain_core/lib/rpcs/coinshift_rpc.dart:274 — sidechain_core/lib/rpcs/coinshift_rpc.dart:274-278 | sidechain_core/lib/rpcs/photon_rpc.dart:232-236 | sidechain_core/lib/rpcs/thunder_rpc.dart:270-274 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:420-424 | sidechain_core/lib/rpcs/zside_rpc.dart:301-305 — before extracting anything, compare `sidechain_core/lib/rpcs/coinshift_rpc.dart` and `sidechain_core/lib/rpcs/photon_rpc.dart` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 150 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 (5 lines × 5) sidechain_core/lib/rpcs/coinshift_rpc.dart:330 — sidechain_core/lib/rpcs/coinshift_rpc.dart:330-334 | sidechain_core/lib/rpcs/photon_rpc.dart:288-292 | sidechain_core/lib/rpcs/thunder_rpc.dart:326-330 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:476-480 | sidechain_core/lib/rpcs/zside_rpc.dart:357-361 — before extracting anything, compare `sidechain_core/lib/rpcs/coinshift_rpc.dart` and `sidechain_core/lib/rpcs/photon_rpc.dart` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 150 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×4
  • Duplicated block (5 lines × 3) sidechain_core/lib/rpcs/bitassets_rpc.dart:555 — sidechain_core/lib/rpcs/bitassets_rpc.dart:555-559 | sidechain_core/lib/rpcs/bitnames_rpc.dart:439-443 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:886-890 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 3) sidechain_core/lib/rpcs/bitassets_rpc.dart:839 — sidechain_core/lib/rpcs/bitassets_rpc.dart:839-843 | sidechain_core/lib/rpcs/bitnames_rpc.dart:433-437 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:880-884 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (5 lines × 3) sidechain-orchestrator/api/multisiglounge_handler.go:228 — sidechain-orchestrator/api/multisiglounge_handler.go:228-232 | sidechain-orchestrator/api/multisiglounge_handler.go:265-269 | sidechain-orchestrator/api/multisiglounge_handler.go:379-383 — 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 `sidechain-orchestrator/api/multisiglounge_handler.go:228` 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, `sidechain-orchestrator/api/multisiglounge_handler.go:376` calls `NewError`, `Error`, `WithCause` and `sidechain-orchestrator/api/multisiglounge_handler.go:227` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) sidechain-orchestrator/engines/bmmstate/store.go:113 — sidechain-orchestrator/engines/bmmstate/store.go:113-117 | sidechain-orchestrator/wallet/bip47state/inbound.go:101-105 | sidechain-orchestrator/wallet/bip47state/store.go:85-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/engines/bmmstate/store.go:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×4
  • Sync-over-async blocking sail_ui/lib/pages/log_page.dart:177 — `_readLastNLines` is async and calls openSync, readSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking sail_ui/lib/pages/log_page.dart:691 — `_readLastNLines` is async and calls readSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking third_party/logger/lib/src/outputs/advanced_file_output.dart:154 — `init` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking third_party/logger/lib/src/outputs/advanced_file_output.dart:239 — `_deleteRotatedFiles` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
X2 · Cancellation propagation · Function without context.Context · ×4
  • Function without context.Context: dialCoreRPC sidechain-orchestrator/network_catalog.go:588 — `dialCoreRPC` calls `net.DialTimeout(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
  • Function without context.Context: StatusWithOptions REDACTED:758 — `StatusWithOptions` calls `net.DialTimeout(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
  • Function without context.Context: GetBTCPrice REDACTED:3354 — `GetBTCPrice` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
  • Function without context.Context: func dc-hub/server/jsonrpc/jsonrpc.go:77 — `func` calls `http.NewRequestWithContext(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
AC6 · Visual & motion safety · Low contrast Tailwind colour pair (3.5 · ×3
  • Low contrast Tailwind colour pair (3.5:1) dc-hub/app/page.tsx:191 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
  • Low contrast Tailwind colour pair (3.5:1) dc-hub/app/page.tsx:205 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
  • Low contrast Tailwind colour pair (3.5:1) REDACTED:207 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×3
  • Edited copy of a member (44 corresponding lines) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:607 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:607-657 | bitwindow/lib/pages/explorer/load_transaction_dialog.dart:216-259 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1185 — zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1185-1228 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1304-1347 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) bitwindow/lib/pages/success_page.dart:22 — bitwindow/lib/pages/success_page.dart:22-67 | sail_ui/lib/pages/create_wallet_page.dart:802-845 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×3
  • Edited copy of a member (39 corresponding lines) zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:210 — zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:210-248 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:306-344 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) bitwindow/lib/providers/multisig_provider.dart:504 — bitwindow/lib/providers/multisig_provider.dart:504-542 | bitwindow/lib/providers/multisig_provider.dart:544-583 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) bitwindow/lib/widgets/address_list.dart:505 — bitwindow/lib/widgets/address_list.dart:505-546 | bitwindow/lib/widgets/address_list.dart:579-617 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×3
  • Edited copy of a member (27 corresponding lines) bitwindow/server/models/coinbases/coinbases.go:28 — bitwindow/server/models/coinbases/coinbases.go:28-67 | bitwindow/server/models/mempooltx/mempooltx.go:42-68 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) REDACTED:624 — REDACTED:624-650 | REDACTED:661-689 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) bitassets/lib/bitassets_module.dart:76 — bitassets/lib/bitassets_module.dart:76-105 | bitnames/lib/bitnames_module.dart:55-81 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×3
  • Edited copy of a member (24 corresponding lines) bitwindow/lib/models/chat_models.dart:72 — bitwindow/lib/models/chat_models.dart:72-100 | bitwindow/lib/models/chat_models.dart:154-177 — 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) sail_ui/lib/widgets/core/sail_text.dart:157 — sail_ui/lib/widgets/core/sail_text.dart:157-183 | sail_ui/lib/widgets/core/sail_text.dart:185-208 — 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) sail_ui/lib/routing/node_mode_guard.dart:20 — sail_ui/lib/routing/node_mode_guard.dart:20-43 | sail_ui/lib/routing/wallet_guard.dart:22-48 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 11+ corresponding lines) bitwindow/server/api/bitwindowd/bitwindowd.go:351 — bitwindow/server/api/bitwindowd/bitwindowd.go:351-361 | bitwindow/server/api/bitwindowd/bitwindowd.go:366-376 | bitwindow/server/api/bitwindowd/bitwindowd.go:381-391 | bitwindow/server/api/bitwindowd/bitwindowd.go:525-535 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) sidechain-orchestrator/wallet/core_rpc.go:299 — sidechain-orchestrator/wallet/core_rpc.go:299-310 | sidechain-orchestrator/wallet/core_rpc.go:454-464 | sidechain-orchestrator/wallet/core_rpc.go:546-556 | sidechain-orchestrator/wallet/core_rpc.go:558-568 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) bitwindow/server/models/bitdrive/bitdrive.go:127 — bitwindow/server/models/bitdrive/bitdrive.go:127-137 | bitwindow/server/models/blocks/processed_blocks.go:18-28 | bitwindow/server/models/multisig/multisig.go:392-402 | bitwindow/server/models/timestamps/timestamps.go:151-161 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×3
  • Edited copy of a member (5 corresponding lines) sidechain_core/lib/rpcs/thunder_rpc.dart:145 — sidechain_core/lib/rpcs/thunder_rpc.dart:145-150 | sidechain_core/lib/rpcs/zside_rpc.dart:193-197 — 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) truthcoin/lib/pages/market_detail_page.dart:1361 — truthcoin/lib/pages/market_detail_page.dart:1361-1365 | truthcoin/lib/widgets/market_card.dart:40-44 — 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) truthcoin/lib/pages/market_explorer_page.dart:362 — truthcoin/lib/pages/market_explorer_page.dart:362-366 | truthcoin/lib/pages/tabs/portfolio_page.dart:545-549 — 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 (28 lines × 2) · ×3
  • Duplicated block (28 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:702 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:702-729 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:832-859 — both copies are in the same file, so extract the 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 (28 lines × 2) sail_ui/lib/widgets/config_editor/configurator_panel.dart:263 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:263-290 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:208-235 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/config_editor/configurator_panel.dart:263` it does not close everything it opens, so those 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 (28 lines × 2) bitwindow/server/models/coinnews/store.go:131 — bitwindow/server/models/coinnews/store.go:131-158 | coinnews/server/store/store.go:108-135 — before extracting anything, compare `bitwindow/server/models/coinnews/store.go` and `coinnews/server/store/store.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 113 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 `bitwindow/server/models/coinnews/store.go:131` 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 (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) bitwindow/lib/dialogs/merkle_tree_dialog.dart:513 — bitwindow/lib/dialogs/merkle_tree_dialog.dart:513-532 | bitwindow/lib/dialogs/merkle_tree_dialog.dart:536-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/dialogs/merkle_tree_dialog.dart:513` 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 (20 lines × 2) sail_ui/lib/widgets/inputs/dropdown_menu.dart:207 — sail_ui/lib/widgets/inputs/dropdown_menu.dart:207-226 | sail_ui/lib/widgets/inputs/dropdown_menu.dart:480-499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/inputs/dropdown_menu.dart: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.
  • Duplicated block (20 lines × 2) sidechain-orchestrator/config/enforcer_conf.go:507 — sidechain-orchestrator/config/enforcer_conf.go:507-526 | sidechain-orchestrator/config/sidechain_conf.go:528-547 — 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 (17–18 lines × 2) · ×3
  • Duplicated block (17–18 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1359 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1359-1375 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1448-1465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1448` 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 (17–18 lines × 2) bitwindow/lib/widgets/import_txid_modal.dart:50 — bitwindow/lib/widgets/import_txid_modal.dart:50-66 | bitwindow/lib/widgets/multisig_key_modal.dart:91-108 — 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 `bitwindow/lib/widgets/import_txid_modal.dart:50` 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 (17–18 lines × 2) bitwindow/lib/widgets/starters_tab.dart:234 — bitwindow/lib/widgets/starters_tab.dart:234-250 | bitwindow/lib/widgets/starters_tab.dart:266-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/starters_tab.dart:234` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×3
  • Duplicated block (17 lines × 3) bitassets/lib/pages/tabs/dutch_auction_page.dart:29 — bitassets/lib/pages/tabs/dutch_auction_page.dart:29-45 | bitnames/lib/pages/tabs/reserve_register_page.dart:39-55 | bitnames/lib/pages/tabs/reserve_register_page.dart:346-362 — before extracting anything, compare `bitassets/lib/pages/tabs/dutch_auction_page.dart` and `bitnames/lib/pages/tabs/reserve_register_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 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 `bitassets/lib/pages/tabs/dutch_auction_page.dart:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 3) bitassets/lib/widgets/amm_analytics_widget.dart:89 — bitassets/lib/widgets/amm_analytics_widget.dart:89-105 | bitassets/lib/widgets/portfolio_dashboard.dart:148-164 | bitassets/lib/widgets/transaction_history.dart:87-103 — before extracting anything, compare `bitassets/lib/widgets/amm_analytics_widget.dart` and `bitassets/lib/widgets/portfolio_dashboard.dart` 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. 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 `bitassets/lib/widgets/amm_analytics_widget.dart:89` 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, `bitassets/lib/widgets/portfolio_dashboard.dart:165` calls `SizedBox` and `bitassets/lib/widgets/amm_analytics_widget.dart:106` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 3) zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:186 — zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:186-202 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:157-173 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:326-342 — 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 `zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:186` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×3
  • Duplicated block (14–15 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1322 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1322-1335 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1380-1394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1322` 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) sidechain-orchestrator/commands/wallet.go:867 — sidechain-orchestrator/commands/wallet.go:867-881 | sidechain-orchestrator/commands/wallet.go:940-953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–15 lines × 2) bitwindow/server/api/server.go:349 — bitwindow/server/api/server.go:349-362 | REDACTED:180-194 — 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 `bitwindow/server/api/server.go:349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×3
  • Duplicated block (11–12 lines × 2) bitwindow/lib/dialogs/merkle_tree_dialog.dart:258 — bitwindow/lib/dialogs/merkle_tree_dialog.dart:258-269 | bitwindow/lib/dialogs/merkle_tree_dialog.dart:483-493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/dialogs/merkle_tree_dialog.dart: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.
  • Duplicated block (11–12 lines × 2) bitwindow/lib/pages/mining/mining_tab.dart:376 — bitwindow/lib/pages/mining/mining_tab.dart:376-387 | truthcoin/lib/pages/tabs/portfolio_page.dart:207-217 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11–12 lines × 2) bitwindow/lib/widgets/claim_ecx_card.dart:428 — bitwindow/lib/widgets/claim_ecx_card.dart:428-439 | bitwindow/lib/widgets/claim_ecx_card.dart:534-544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/claim_ecx_card.dart:428` it does not close everything it opens, so those 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 lines × 6) · ×3
  • Duplicated block (11 lines × 6) sidechain_core/lib/rpcs/bitassets_rpc.dart:321 — sidechain_core/lib/rpcs/bitassets_rpc.dart:321-331 | sidechain_core/lib/rpcs/bitnames_rpc.dart:248-258 | sidechain_core/lib/rpcs/photon_rpc.dart:170-180 | sidechain_core/lib/rpcs/thunder_rpc.dart:213-223 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:363-373 | sidechain_core/lib/rpcs/zside_rpc.dart:244-254 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 (11 lines × 6) sidechain-orchestrator/sidechain/bitassets/client.go:83 — sidechain-orchestrator/sidechain/bitassets/client.go:83-93 | sidechain-orchestrator/sidechain/bitnames/client.go:93-103 | sidechain-orchestrator/sidechain/coinshift/client.go:98-108 | sidechain-orchestrator/sidechain/photon/client.go:83-93 | sidechain-orchestrator/sidechain/thunder/client.go:83-93 | sidechain-orchestrator/sidechain/truthcoin/client.go:98-108 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/sidechain/bitassets/client.go:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 6) sidechain-orchestrator/sidechain/bitassets/client.go:97 — sidechain-orchestrator/sidechain/bitassets/client.go:97-107 | sidechain-orchestrator/sidechain/bitnames/client.go:107-117 | sidechain-orchestrator/sidechain/coinshift/client.go:112-122 | sidechain-orchestrator/sidechain/photon/client.go:97-107 | sidechain-orchestrator/sidechain/thunder/client.go:97-107 | sidechain-orchestrator/sidechain/truthcoin/client.go:112-122 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (10–11 lines × 2) · ×3
  • Duplicated block (10–11 lines × 2) bitwindow/lib/providers/multisig_provider.dart:455 — bitwindow/lib/providers/multisig_provider.dart:455-464 | bitwindow/lib/providers/multisig_provider.dart:590-600 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/providers/multisig_provider.dart:590` 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–11 lines × 2) sail_ui/lib/widgets/wallet_backup_restore.dart:730 — sail_ui/lib/widgets/wallet_backup_restore.dart:730-739 | sail_ui/lib/widgets/wallet_management_dialog.dart:110-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/wallet_backup_restore.dart:730` it does not close everything it opens, so those 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–11 lines × 2) sidechain_core/lib/rpcs/bitwindow_api.dart:348 — sidechain_core/lib/rpcs/bitwindow_api.dart:348-358 | sidechain_core/lib/rpcs/enforcer_rpc.dart:234-243 — 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 `sidechain_core/lib/rpcs/bitwindow_api.dart:348` it does not close everything it opens, so those 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 (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) bitwindow/lib/pages/root_page.dart:223 — bitwindow/lib/pages/root_page.dart:223-234 | bitwindow/lib/pages/root_page.dart:236-245 | bitwindow/lib/pages/root_page.dart:247-256 — 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 `bitwindow/lib/pages/root_page.dart:223` 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 first that the copies are not typed on the same thing: the declarations holding them bind `label` to `'Send Money'` in one and `'Request Money'` 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 (10 lines × 3) bitwindow/lib/pages/wallet/denability_page.dart:393 — bitwindow/lib/pages/wallet/denability_page.dart:393-402 | bitwindow/lib/pages/wallet/denability_page.dart:406-415 | bitwindow/lib/pages/wallet/denability_page.dart:428-437 — 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 `bitwindow/lib/pages/wallet/denability_page.dart:393` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 3) sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:327 — sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:327-336 | truthcoin/lib/pages/tabs/portfolio_page.dart:279-288 | truthcoin/lib/pages/voting_dashboard_page.dart:426-435 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:327` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×3
  • Duplicated block (9 lines × 4) bitwindow/lib/dialogs/network_statistics_dialog.dart:191 — bitwindow/lib/dialogs/network_statistics_dialog.dart:191-199 | bitwindow/lib/widgets/network_stats_widget.dart:149-157 | bitwindow/lib/widgets/traffic_graph_widget.dart:223-231 | bitwindow/lib/widgets/traffic_graph_widget.dart:265-273 — before extracting anything, compare `bitwindow/lib/dialogs/network_statistics_dialog.dart` and `bitwindow/lib/widgets/traffic_graph_widget.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (9 lines × 4) bitwindow/lib/dialogs/paper_check_dialog.dart:481 — bitwindow/lib/dialogs/paper_check_dialog.dart:481-489 | bitwindow/lib/dialogs/paper_check_dialog.dart:578-586 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:259-267 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:356-364 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 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 `bitwindow/lib/dialogs/paper_check_dialog.dart:481` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) bitwindow/server/models/coinnews/store.go:331 — bitwindow/server/models/coinnews/store.go:331-339 | bitwindow/server/models/coinnews/store.go:353-361 | coinnews/server/store/store.go:280-288 | coinnews/server/store/store.go:302-310 — before extracting anything, compare `bitwindow/server/models/coinnews/store.go` and `coinnews/server/store/store.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 113 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `lang` in one and `replyQuote` 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 × 3) · ×3
  • Duplicated block (9 lines × 3) bitnames/lib/pages/tabs/reserve_register_page.dart:74 — bitnames/lib/pages/tabs/reserve_register_page.dart:74-82 | bitnames/lib/pages/tabs/reserve_register_page.dart:381-389 | truthcoin/lib/pages/tabs/portfolio_page.dart:210-218 — 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 `bitnames/lib/pages/tabs/reserve_register_page.dart:74` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 3) bitwindow/lib/pages/wallet/wallet_consolidate.dart:269 — bitwindow/lib/pages/wallet/wallet_consolidate.dart:269-277 | sail_ui/lib/pages/sidechains/bmm_tab.dart:539-547 | sail_ui/lib/pages/sidechains/bmm_tab.dart:636-644 — 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 `bitwindow/lib/pages/wallet/wallet_consolidate.dart:269` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bitwindow/lib/pages/wallet/wallet_consolidate.dart:278` calls `_isFrozen` and `sail_ui/lib/pages/sidechains/bmm_tab.dart:645` 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 × 3) sidechain_core/lib/providers/backend_sidechain_conf_provider.dart:62 — sidechain_core/lib/providers/backend_sidechain_conf_provider.dart:62-70 | sidechain_core/lib/providers/bitcoin_conf_provider.dart:113-121 | REDACTED:31-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×3
  • Duplicated block (8 lines × 4) sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:327 — sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:327-334 | truthcoin/lib/pages/tabs/portfolio_page.dart:279-286 | truthcoin/lib/pages/voting_dashboard_page.dart:426-433 | truthcoin/lib/widgets/trading_position_widget.dart:105-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:327` it does not close everything it opens, so those 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 × 4) sail_ui/lib/pages/sidechains/parent_chain_page.dart:145 — sail_ui/lib/pages/sidechains/parent_chain_page.dart:145-152 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:231-238 | zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:103-110 | zside/lib/widgets/homepage_widget_catalog.dart:350-357 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 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 `sail_ui/lib/pages/sidechains/parent_chain_page.dart:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 4) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:525 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:525-532 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:813-820 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:366-373 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:555-562 — before extracting anything, compare `zside/lib/pages/tabs/zside/zside_melt_cast_page.dart` and `zside/lib/pages/tabs/zside/zside_transfer_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 8) · ×3
  • Duplicated block (7 lines × 8) bbc/lib/bbc_module.dart:28 — bbc/lib/bbc_module.dart:28-34 | bitassets/lib/bitassets_module.dart:32-38 | bitnames/lib/bitnames_module.dart:29-35 | coinshift/lib/coinshift_module.dart:30-36 | photon/lib/photon_module.dart:25-31 | thunder/lib/thunder_module.dart:25-31 | truthcoin/lib/truthcoin_module.dart:34-40 | zside/lib/zside_module.dart:33-39 — before extracting anything, compare `bbc/lib/bbc_module.dart` and `coinshift/lib/coinshift_module.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 8) bbc/lib/bbc_module.dart:36 — bbc/lib/bbc_module.dart:36-42 | bitassets/lib/bitassets_module.dart:40-46 | bitnames/lib/bitnames_module.dart:37-43 | coinshift/lib/coinshift_module.dart:38-44 | photon/lib/photon_module.dart:33-39 | thunder/lib/thunder_module.dart:33-39 | truthcoin/lib/truthcoin_module.dart:42-48 | zside/lib/zside_module.dart:41-47 — before extracting anything, compare `bbc/lib/bbc_module.dart` and `coinshift/lib/coinshift_module.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 8) bbc/macos/Runner/AppDelegate.swift:6 — bbc/macos/Runner/AppDelegate.swift:6-12 | bitassets/macos/Runner/AppDelegate.swift:6-12 | bitnames/macos/Runner/AppDelegate.swift:6-12 | coinshift/macos/Runner/AppDelegate.swift:6-12 | photon/macos/Runner/AppDelegate.swift:6-12 | thunder/macos/Runner/AppDelegate.swift:6-12 | truthcoin/macos/Runner/AppDelegate.swift:6-12 | zside/macos/Runner/AppDelegate.swift:6-12 — before extracting anything, compare `bbc/macos/Runner/AppDelegate.swift` and `bitassets/macos/Runner/AppDelegate.swift` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 7) · ×3
  • Duplicated block (6 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:63 — sidechain-orchestrator/sidechain/bitassets/handler.go:63-68 | sidechain-orchestrator/sidechain/bitnames/handler.go:57-62 | sidechain-orchestrator/sidechain/coinshift/handler.go:56-61 | sidechain-orchestrator/sidechain/photon/handler.go:53-58 | sidechain-orchestrator/sidechain/thunder/handler.go:71-76 | sidechain-orchestrator/sidechain/truthcoin/handler.go:59-64 | sidechain-orchestrator/sidechain/zside/handler.go:56-61 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:181 — sidechain-orchestrator/sidechain/bitassets/handler.go:181-186 | sidechain-orchestrator/sidechain/bitnames/handler.go:169-174 | sidechain-orchestrator/sidechain/coinshift/handler.go:182-187 | sidechain-orchestrator/sidechain/photon/handler.go:181-186 | sidechain-orchestrator/sidechain/thunder/handler.go:184-191 | sidechain-orchestrator/sidechain/truthcoin/handler.go:187-192 | sidechain-orchestrator/sidechain/zside/handler.go:233-238 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:243 — sidechain-orchestrator/sidechain/bitassets/handler.go:243-248 | sidechain-orchestrator/sidechain/bitnames/handler.go:224-229 | sidechain-orchestrator/sidechain/coinshift/handler.go:142-147 | sidechain-orchestrator/sidechain/photon/handler.go:141-146 | sidechain-orchestrator/sidechain/thunder/handler.go:248-253 | sidechain-orchestrator/sidechain/truthcoin/handler.go:147-152 | sidechain-orchestrator/sidechain/zside/handler.go:193-198 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×3
  • Duplicated block (7 lines × 5) sidechain-orchestrator/sidechain/bitassets/handler.go:70 — sidechain-orchestrator/sidechain/bitassets/handler.go:70-76 | sidechain-orchestrator/sidechain/bitnames/handler.go:64-70 | sidechain-orchestrator/sidechain/coinshift/handler.go:63-69 | sidechain-orchestrator/sidechain/photon/handler.go:60-66 | sidechain-orchestrator/sidechain/truthcoin/handler.go:66-72 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 5) sidechain-orchestrator/sidechain/bitassets/handler.go:117 — sidechain-orchestrator/sidechain/bitassets/handler.go:117-123 | sidechain-orchestrator/sidechain/bitnames/handler.go:112-118 | sidechain-orchestrator/sidechain/coinshift/handler.go:103-109 | sidechain-orchestrator/sidechain/photon/handler.go:102-108 | sidechain-orchestrator/sidechain/truthcoin/handler.go:108-114 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 5) sidechain-orchestrator/sidechain/bitassets/handler.go:392 — sidechain-orchestrator/sidechain/bitassets/handler.go:392-398 | sidechain-orchestrator/sidechain/bitnames/handler.go:438-444 | sidechain-orchestrator/sidechain/coinshift/handler.go:236-242 | sidechain-orchestrator/sidechain/photon/handler.go:235-241 | sidechain-orchestrator/sidechain/truthcoin/handler.go:257-263 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D5 · Coupling · Off the main sequence · ×3
  • Off the main sequence: github.com/LayerTwo-Labs/sidesail/sqlitemigrate — github.com/LayerTwo-Labs/sidesail/sqlitemigrate: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: github.com/LayerTwo-Labs/sidesail/coinnews/codec — github.com/LayerTwo-Labs/sidesail/coinnews/codec: abstractness 0.14, instability 0.00, distance 0.86 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: sidechain_core — sidechain_core: abstractness 0.12, instability 0.17, distance 0.71 — zone of pain — concrete and depended on by 10 project(s), so it's rigid to change.
X28 · Index access outside its own emptiness guard · Index access outside its own emptiness guard · ×3
  • Index access outside its own emptiness guard REDACTED:3087 — `m[:strings.LastIndex(m, suffix)]` uses a search that answers -1 when nothing is found directly as a bound. When the search misses, the bound is -1 and the access panics with `slice bounds out of range`. Assign the result, test it for -1, then slice (or use `strings.Cut`).
  • Index access outside its own emptiness guard bitwindow/server/engines/utils_engine.go:38 — This slices the parameter `uri` with a constant bound, `uri[8:]`, and nothing in the function checks `len(uri)` first. The value is input the caller hands in: a shorter one panics with `slice bounds out of range`. Test `len(uri)` against the bound and return an error, or document and enforce the minimum length at the boundary.
  • Index access outside its own emptiness guard bitwindow/server/api/runtime.go:329 — `spec.Procedure[:strings.LastIndex(spec.Procedure, " ")]` uses a search that answers -1 when nothing is found directly as a bound. When the search misses, the bound is -1 and the access panics with `slice bounds out of range`. Assign the result, test it for -1, then slice (or use `strings.Cut`).
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: Orchestrator REDACTED:138 — TooManyFields — 71 stored fields beside 287 methods. The bar is 30 stored fields; this is 41 over it, 2.37× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: BinaryConfig sidechain-orchestrator/config.go:32 — TooManyFields — 33 stored fields beside 11 methods. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication · Members sharing a duplicated core (14 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (14 members, 50+ identical tokens) bitassets/lib/pages/tabs/dutch_auction_page.dart:12 — bitassets/lib/pages/tabs/dutch_auction_page.dart:12-226 | bitassets/lib/pages/tabs/reserve_register_page.dart:59-115 | bitassets/lib/pages/tabs/reserve_register_page.dart:313-369 | bitwindow/lib/pages/explorer/load_transaction_dialog.dart:267-310 | bitwindow/lib/pages/wallet/wallet_checks.dart:171-265 | bitwindow/lib/pages/wallet/wallet_consolidate.dart:234-310 | bitwindow/lib/pages/wallet/wallet_timestamps.dart:112-161 | sail_ui/lib/pages/sidechains/bmm_tab.dart:517-576 | sail_ui/lib/pages/sidechains/bmm_tab.dart:608-691 | sail_ui/lib/pages/sidechains/bmm_tab.dart:862-940 | sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:316-357 | truthcoin/lib/pages/tabs/portfolio_page.dart:263-318 | truthcoin/lib/pages/voting_dashboard_page.dart:413-449 | truthcoin/lib/widgets/trading_position_widget.dart:14-176 — 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.
  • Members sharing a duplicated core (14 members, 50+ identical tokens) sidechain_core/lib/config/binaries.dart:399 — sidechain_core/lib/config/binaries.dart:399-422 | sidechain_core/lib/config/binaries.dart:479-502 | sidechain_core/lib/config/binaries.dart:558-581 | sidechain_core/lib/config/binaries.dart:637-660 | sidechain_core/lib/config/binaries.dart:743-766 | sidechain_core/lib/config/binaries.dart:824-847 | sidechain_core/lib/config/sidechains.dart:228-249 | sidechain_core/lib/config/sidechains.dart:330-355 | sidechain_core/lib/config/sidechains.dart:429-454 | sidechain_core/lib/config/sidechains.dart:528-553 | sidechain_core/lib/config/sidechains.dart:627-652 | sidechain_core/lib/config/sidechains.dart:726-751 | sidechain_core/lib/config/sidechains.dart:825-850 | sidechain_core/lib/config/sidechains.dart:924-949 — 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 copy of a member (49 corresponding lines) · ×2
  • Edited copy of a member (49 corresponding lines) sail_ui/lib/style/color.dart:123 — sail_ui/lib/style/color.dart:123-171 | sail_ui/lib/style/color.dart:172-220 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (49 corresponding lines) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:247 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:247-299 | zside/lib/widgets/homepage_widget_catalog.dart:430-478 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×2
  • Edited copy of a member (50 corresponding lines) bitwindow/server/api/misc/misc.go:91 — bitwindow/server/api/misc/misc.go:91-143 | bitwindow/server/api/misc/misc.go:204-253 — 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.
  • Edited copy of a member (50 corresponding lines) REDACTED:1841 — REDACTED:1841-1906 | bitwindow/lib/widgets/draft_panel.dart:904-953 — 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 (52 corresponding lines) · ×2
  • Edited copy of a member (52 corresponding lines) sidechain-orchestrator/sidechain/corenode/client.go:97 — sidechain-orchestrator/sidechain/corenode/client.go:97-148 | sidechain-orchestrator/wallet/core_rpc.go:103-154 — 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.
  • Edited copy of a member (52 corresponding lines) bitwindow/lib/pages/wallet/cash_check_page.dart:29 — bitwindow/lib/pages/wallet/cash_check_page.dart:29-84 | bitwindow/lib/pages/wallet/create_check_page.dart:29-80 — 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 (42 corresponding lines) · ×2
  • Edited copy of a member (42 corresponding lines) sidechain-orchestrator/rpc/client.go:110 — sidechain-orchestrator/rpc/client.go:110-157 | sidechain-orchestrator/rpc/client.go:160-201 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) bitwindow/lib/widgets/import_descriptor_dialog.dart:80 — bitwindow/lib/widgets/import_descriptor_dialog.dart:80-131 | sail_ui/lib/widgets/containers/rename_wallet_dialog.dart:48-89 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×2
  • Edited copy of a member (33 corresponding lines) sail_ui/lib/widgets/config_editor/configurator_panel.dart:210 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:210-247 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:162-194 — 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.
  • Edited copy of a member (33 corresponding lines) sail_ui/lib/widgets/config_editor/configurator_panel.dart:263 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:263-308 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:208-240 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×2
  • Edited copy of a member (36 corresponding lines) bitwindow/server/api/wallet/wallet.go:742 — bitwindow/server/api/wallet/wallet.go:742-783 | REDACTED:818-853 — 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) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:482 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:482-522 | bitwindow/lib/pages/explorer/load_transaction_dialog.dart:53-88 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 32+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 32+ corresponding lines) sidechain-orchestrator/api/explorer_core.go:363 — sidechain-orchestrator/api/explorer_core.go:363-398 | sidechain-orchestrator/api/explorer_handler.go:475-506 | sidechain-orchestrator/api/explorer_handler.go:651-683 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 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, 32+ corresponding lines) bitwindow/lib/dialogs/remove_encryption_dialog.dart:34 — bitwindow/lib/dialogs/remove_encryption_dialog.dart:34-65 | bitwindow/lib/pages/remove_encryption_page.dart:27-58 | sail_ui/lib/pages/unlock_wallet_page.dart:99-140 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 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 (32 corresponding lines) · ×2
  • Edited copy of a member (32 corresponding lines) sidechain-orchestrator/reject_block.go:59 — sidechain-orchestrator/reject_block.go:59-96 | sidechain-orchestrator/reject_block.go:101-132 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) bitwindow/lib/pages/wallet/wallet_overview.dart:675 — bitwindow/lib/pages/wallet/wallet_overview.dart:675-710 | bitwindow/lib/widgets/address_list.dart:101-132 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×2
  • Edited copy of a member (30 corresponding lines) bitassets/lib/pages/tabs/reserve_register_page.dart:684 — bitassets/lib/pages/tabs/reserve_register_page.dart:684-713 | bitnames/lib/pages/tabs/reserve_register_page.dart:729-758 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) bitassets/lib/bitassets_module.dart:107 — bitassets/lib/bitassets_module.dart:107-137 | bitnames/lib/bitnames_module.dart:83-112 — 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, 17+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 17+ corresponding lines) bitwindow/server/api/multisig/multisig.go:34 — bitwindow/server/api/multisig/multisig.go:34-50 | bitwindow/server/api/multisig/multisig.go:179-195 | bitwindow/server/api/walletpsbt/walletpsbt.go:32-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) sidechain_core/lib/rpcs/bitassets_rpc.dart:431 — sidechain_core/lib/rpcs/bitassets_rpc.dart:431-447 | sidechain_core/lib/rpcs/bitassets_rpc.dart:626-642 | sidechain_core/lib/rpcs/orchestrator_wallet_rpc.dart:805-821 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 18+ corresponding lines) sidechain-orchestrator/engines/bmmstate/store.go:89 — sidechain-orchestrator/engines/bmmstate/store.go:89-106 | sidechain-orchestrator/wallet/bip47state/inbound.go:62-83 | sidechain-orchestrator/wallet/bip47state/store.go:53-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) bitwindow/server/dial/dial.go:98 — bitwindow/server/dial/dial.go:98-115 | bitwindow/server/dial/dial.go:122-139 | bitwindow/server/dial/dial.go:160-182 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 13+ corresponding lines) bitwindow/server/api/enforcer/enforcer.go:132 — bitwindow/server/api/enforcer/enforcer.go:132-145 | bitwindow/server/api/enforcer/enforcer.go:350-363 | dc-hub/server/api/validator/api_validator.go:124-136 | dc-hub/server/api/validator/api_validator.go:139-151 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 13+ corresponding lines) sail_ui/lib/shell/sidechain_conf_editor_page.dart:355 — sail_ui/lib/shell/sidechain_conf_editor_page.dart:355-370 | sail_ui/lib/shell/sidechain_conf_editor_page.dart:384-401 | sail_ui/lib/shell/sidechain_conf_editor_page.dart:501-514 | sail_ui/lib/widgets/components/setting_row.dart:116-128 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 14+ corresponding lines) sidechain-orchestrator/sqliteguard/sqliteguard.go:173 — sidechain-orchestrator/sqliteguard/sqliteguard.go:173-186 | sidechain-orchestrator/sqliteguard/sqliteguard.go:188-201 | sidechain-orchestrator/sqliteguard/sqliteguard.go:203-216 | sidechain-orchestrator/sqliteguard/sqliteguard.go:229-242 | sidechain-orchestrator/sqliteguard/sqliteguard.go:282-295 | sidechain-orchestrator/sqliteguard/sqliteguard.go:297-310 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 14+ corresponding lines) sidechain-orchestrator/orchestrator_settings.go:201 — sidechain-orchestrator/orchestrator_settings.go:201-215 | sidechain-orchestrator/orchestrator_settings.go:225-239 | sidechain-orchestrator/orchestrator_settings.go:275-289 | sidechain-orchestrator/orchestrator_settings.go:298-311 | sidechain-orchestrator/orchestrator_settings.go:340-353 | sidechain-orchestrator/orchestrator_settings.go:363-376 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 8+ corresponding lines) sidechain-orchestrator/sidechain/zside/handler.go:73 — sidechain-orchestrator/sidechain/zside/handler.go:73-80 | sidechain-orchestrator/sidechain/zside/handler.go:312-319 | sidechain-orchestrator/sidechain/zside/handler.go:321-328 | sidechain-orchestrator/sidechain/zside/handler.go:330-337 | sidechain-orchestrator/sidechain/zside/handler.go:339-346 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 8+ corresponding lines) sidechain-orchestrator/sidechain/bitnames/handler.go:72 — sidechain-orchestrator/sidechain/bitnames/handler.go:72-79 | sidechain-orchestrator/sidechain/photon/handler.go:68-75 | sidechain-orchestrator/sidechain/thunder/backend.go:44-51 | sidechain-orchestrator/sidechain/truthcoin/handler.go:74-81 | sidechain-orchestrator/sidechain/zside/handler.go:63-70 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 4+ corresponding lines) photon/lib/pages/tabs/mempool_explorer_page.dart:134 — photon/lib/pages/tabs/mempool_explorer_page.dart:134-137 | truthcoin/lib/pages/tabs/portfolio_page.dart:424-427 | truthcoin/lib/pages/voting_dashboard_page.dart:770-773 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:82 — zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:82-87 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:82-85 | zside/lib/widgets/homepage_widget_catalog.dart:279-282 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×2
  • Duplicated block (32 lines × 2) bitwindow/lib/pages/debug_window.dart:536 — bitwindow/lib/pages/debug_window.dart:536-567 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:321-352 — before extracting anything, compare `bitwindow/lib/pages/debug_window.dart` and `sail_ui/lib/widgets/debug/sidechain_debug_window.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 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 `bitwindow/lib/pages/debug_window.dart:536` 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 (32 lines × 2) zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1197 — zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1197-1228 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1316-1347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1197` 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 (30 lines × 2) · ×2
  • Duplicated block (30 lines × 2) bitwindow/lib/widgets/hash_calculator_modal.dart:609 — bitwindow/lib/widgets/hash_calculator_modal.dart:609-638 | bitwindow/lib/widgets/hash_calculator_modal.dart:642-671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/hash_calculator_modal.dart:609` it does not close everything it opens, so those 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 (30 lines × 2) sail_ui/lib/widgets/components/progress_step_tile.dart:34 — sail_ui/lib/widgets/components/progress_step_tile.dart:34-63 | sail_ui/lib/widgets/dialogs/network_swap_progress_dialog.dart:170-199 — 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 `sail_ui/lib/widgets/components/progress_step_tile.dart:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) sail_ui/lib/pages/bitcoin_conf_editor_page.dart:124 — sail_ui/lib/pages/bitcoin_conf_editor_page.dart:124-150 | sail_ui/lib/pages/enforcer_conf_editor_page.dart:150-176 — before extracting anything, compare `sail_ui/lib/pages/bitcoin_conf_editor_page.dart` and `sail_ui/lib/pages/enforcer_conf_editor_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 90 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 `sail_ui/lib/pages/bitcoin_conf_editor_page.dart:124` it does not close everything it opens, so those 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 (27 lines × 2) zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:210 — zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:210-236 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:306-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×2
  • Duplicated block (26 lines × 2) bitassets/lib/pages/tabs/auction_browser_page.dart:663 — bitassets/lib/pages/tabs/auction_browser_page.dart:663-688 | bitassets/lib/pages/tabs/auction_browser_page.dart:788-813 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitassets/lib/pages/tabs/auction_browser_page.dart:663` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) bitwindow/lib/utils/ur_key.dart:407 — bitwindow/lib/utils/ur_key.dart:407-432 | sidechain_core/lib/utils/ur_psbt.dart:282-307 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×2
  • Duplicated block (25 lines × 2) bitassets/lib/pages/tabs/asset_explorer_page.dart:332 — bitassets/lib/pages/tabs/asset_explorer_page.dart:332-356 | bitassets/lib/pages/tabs/auction_browser_page.dart:310-334 — before extracting anything, compare `bitassets/lib/pages/tabs/asset_explorer_page.dart` and `bitassets/lib/pages/tabs/auction_browser_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 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 `bitassets/lib/pages/tabs/asset_explorer_page.dart:332` 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, `bitassets/lib/pages/tabs/asset_explorer_page.dart:331` calls `withValues` and `bitassets/lib/pages/tabs/auction_browser_page.dart:309` 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 (25 lines × 2) sail_ui/lib/widgets/config_editor/actual_config_panel.dart:9 — sail_ui/lib/widgets/config_editor/actual_config_panel.dart:9-33 | sail_ui/lib/widgets/enforcer_config_editor/actual_config_panel.dart:9-33 — `sail_ui/lib/widgets/config_editor/actual_config_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/actual_config_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 75 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `BitcoinConfigEditorViewModel` in one and `EnforcerConfigEditorViewModel` 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 (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) bitwindow/lib/pages/settings/settings_reset.dart:82 — bitwindow/lib/pages/settings/settings_reset.dart:82-105 | sail_ui/lib/pages/settings_reset.dart:63-86 — before extracting anything, compare `bitwindow/lib/pages/settings/settings_reset.dart` and `sail_ui/lib/pages/settings_reset.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bitwindow/lib/pages/settings/settings_reset.dart:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) sail_ui/lib/pages/sidechains/bmm_tab.dart:530 — sail_ui/lib/pages/sidechains/bmm_tab.dart:530-553 | sail_ui/lib/pages/sidechains/bmm_tab.dart:889-912 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/pages/sidechains/bmm_tab.dart:530` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `BuildContext` in one and `context` 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 (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) bitwindow/lib/pages/root_page.dart:957 — bitwindow/lib/pages/root_page.dart:957-977 | sail_ui/lib/shell/sidechain_home_page.dart:370-389 — before extracting anything, compare `bitwindow/lib/pages/root_page.dart` and `sail_ui/lib/shell/sidechain_home_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/root_page.dart:957` 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 (20–21 lines × 2) sail_ui/lib/widgets/wallet_backup_restore.dart:167 — sail_ui/lib/widgets/wallet_backup_restore.dart:167-186 | sail_ui/lib/widgets/wallet_backup_restore.dart:1042-1062 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/wallet_backup_restore.dart:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17 lines × 6) · ×2
  • Duplicated block (17 lines × 6) bbc/lib/widgets/homepage_widget_catalog.dart:253 — bbc/lib/widgets/homepage_widget_catalog.dart:253-269 | coinshift/lib/widgets/homepage_widget_catalog.dart:396-412 | photon/lib/widgets/homepage_widget_catalog.dart:273-289 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:721-737 | thunder/lib/widgets/homepage_widget_catalog.dart:276-292 | truthcoin/lib/widgets/homepage_widget_catalog.dart:286-302 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 `bbc/lib/widgets/homepage_widget_catalog.dart:253` it does not close everything it opens, so those 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 (17 lines × 6) bitwindow/lib/widgets/hash_calculator_modal.dart:407 — bitwindow/lib/widgets/hash_calculator_modal.dart:407-423 | bitwindow/lib/widgets/hash_calculator_modal.dart:439-455 | bitwindow/lib/widgets/hash_calculator_modal.dart:471-487 | bitwindow/lib/widgets/hash_calculator_modal.dart:503-519 | bitwindow/lib/widgets/hash_calculator_modal.dart:535-551 | bitwindow/lib/widgets/hash_calculator_modal.dart:628-644 — 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 `bitwindow/lib/widgets/hash_calculator_modal.dart:407` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×2
  • Duplicated block (16 lines × 6) bitwindow/lib/pages/overview_page.dart:313 — bitwindow/lib/pages/overview_page.dart:313-328 | bitwindow/lib/pages/wallet/denability_page.dart:184-199 | bitwindow/lib/pages/wallet/wallet_overview.dart:291-306 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:447-462 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:768-783 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:439-454 — before extracting anything, compare `bitwindow/lib/pages/overview_page.dart` and `bitwindow/lib/pages/wallet/denability_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 × 6) sidechain-orchestrator/sidechain/bitassets/client.go:32 — sidechain-orchestrator/sidechain/bitassets/client.go:32-47 | sidechain-orchestrator/sidechain/bitnames/client.go:34-49 | sidechain-orchestrator/sidechain/coinshift/client.go:44-59 | sidechain-orchestrator/sidechain/photon/client.go:32-47 | sidechain-orchestrator/sidechain/thunder/client.go:32-47 | sidechain-orchestrator/sidechain/truthcoin/client.go:44-59 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) bitwindow/lib/dialogs/paper_check_dialog.dart:519 — bitwindow/lib/dialogs/paper_check_dialog.dart:519-533 | bitwindow/lib/dialogs/paper_check_dialog.dart:633-647 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:297-311 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:411-425 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 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 `bitwindow/lib/dialogs/paper_check_dialog.dart:519` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 4) bitwindow/lib/dialogs/paper_check_dialog.dart:535 — bitwindow/lib/dialogs/paper_check_dialog.dart:535-549 | bitwindow/lib/dialogs/paper_check_dialog.dart:649-663 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:313-327 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:427-441 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 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 `bitwindow/lib/dialogs/paper_check_dialog.dart:535` 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 (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) bitwindow/lib/pages/wallet/wallet_overview.dart:691 — bitwindow/lib/pages/wallet/wallet_overview.dart:691-704 | bitwindow/lib/widgets/address_list.dart:115-127 — 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 `bitwindow/lib/pages/wallet/wallet_overview.dart:691` 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, `bitwindow/lib/pages/wallet/wallet_overview.dart:689` calls `_generateCSV` and `bitwindow/lib/widgets/address_list.dart:114` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13–14 lines × 2) sail_ui/lib/pages/sidechains/bmm_tab.dart:536 — sail_ui/lib/pages/sidechains/bmm_tab.dart:536-548 | sail_ui/lib/pages/sidechains/bmm_tab.dart:633-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/pages/sidechains/bmm_tab.dart:536` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–13 lines × 2) · ×2
  • Duplicated block (10–13 lines × 2) sail_ui/lib/widgets/dialogs/network_swap_progress_dialog.dart:66 — sail_ui/lib/widgets/dialogs/network_swap_progress_dialog.dart:66-78 | sail_ui/lib/widgets/wallet_backup_restore.dart:512-521 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10–13 lines × 2) bitwindow/server/api/server.go:293 — bitwindow/server/api/server.go:293-302 | REDACTED:135-147 — 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 `bitwindow/server/api/server.go:293` it does not close everything it opens, so those 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 (12 lines × 7) · ×2
  • Duplicated block (12 lines × 7) bitwindow/lib/widgets/hash_calculator_modal.dart:407 — bitwindow/lib/widgets/hash_calculator_modal.dart:407-418 | bitwindow/lib/widgets/hash_calculator_modal.dart:439-450 | bitwindow/lib/widgets/hash_calculator_modal.dart:471-482 | bitwindow/lib/widgets/hash_calculator_modal.dart:503-514 | bitwindow/lib/widgets/hash_calculator_modal.dart:535-546 | bitwindow/lib/widgets/hash_calculator_modal.dart:628-639 | bitwindow/lib/widgets/hash_calculator_modal.dart:661-672 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/hash_calculator_modal.dart:407` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 7) sidechain-orchestrator/sidechain/bitassets/handler.go:149 — sidechain-orchestrator/sidechain/bitassets/handler.go:149-160 | sidechain-orchestrator/sidechain/bitnames/handler.go:137-148 | sidechain-orchestrator/sidechain/coinshift/handler.go:150-161 | sidechain-orchestrator/sidechain/photon/handler.go:149-160 | sidechain-orchestrator/sidechain/thunder/handler.go:148-159 | sidechain-orchestrator/sidechain/truthcoin/handler.go:155-166 | sidechain-orchestrator/sidechain/zside/handler.go:201-212 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) bitwindow/lib/pages/wallet/denability_page.dart:200 — bitwindow/lib/pages/wallet/denability_page.dart:200-211 | bitwindow/lib/pages/wallet/wallet_overview.dart:299-311 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:579-590 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:869-880 — before extracting anything, compare `bitwindow/lib/pages/wallet/denability_page.dart` and `bitwindow/lib/pages/wallet/wallet_overview.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 `bitwindow/lib/pages/wallet/wallet_overview.dart:299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 4) bitwindow/lib/widgets/create_multisig_modal.dart:978 — bitwindow/lib/widgets/create_multisig_modal.dart:978-989 | bitwindow/lib/widgets/fund_group_modal.dart:49-60 | bitwindow/lib/widgets/import_txid_modal.dart:21-32 | bitwindow/lib/widgets/multisig_key_modal.dart:22-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/widgets/create_multisig_modal.dart:978` it does not close everything it opens, so those 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 (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) bitwindow/lib/dialogs/encrypt_wallet_dialog.dart:100 — bitwindow/lib/dialogs/encrypt_wallet_dialog.dart:100-110 | bitwindow/lib/widgets/starters_tab.dart:86-96 | sail_ui/lib/widgets/wallet_backup_restore.dart:1174-1184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/dialogs/encrypt_wallet_dialog.dart:100` it does not close everything it opens, so those 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) coinshift/lib/pages/swap_analytics_page.dart:292 — coinshift/lib/pages/swap_analytics_page.dart:292-302 | coinshift/lib/widgets/swap_failure_recovery.dart:255-265 | sail_ui/lib/pages/sidechains/bmm_tab.dart:405-415 — 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. 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 (10 lines × 7) · ×2
  • Duplicated block (10 lines × 7) sidechain_core/lib/config/sidechains.dart:346 — sidechain_core/lib/config/sidechains.dart:346-355 | sidechain_core/lib/config/sidechains.dart:445-454 | sidechain_core/lib/config/sidechains.dart:544-553 | sidechain_core/lib/config/sidechains.dart:643-652 | sidechain_core/lib/config/sidechains.dart:742-751 | sidechain_core/lib/config/sidechains.dart:841-850 | sidechain_core/lib/config/sidechains.dart:940-949 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain_core/lib/config/sidechains.dart:346` 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 × 7) sidechain_core/lib/rpcs/bitassets_rpc.dart:826 — sidechain_core/lib/rpcs/bitassets_rpc.dart:826-835 | sidechain_core/lib/rpcs/bitnames_rpc.dart:403-412 | sidechain_core/lib/rpcs/coinshift_rpc.dart:242-251 | sidechain_core/lib/rpcs/photon_rpc.dart:200-209 | sidechain_core/lib/rpcs/thunder_rpc.dart:243-252 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:393-402 | sidechain_core/lib/rpcs/zside_rpc.dart:274-283 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 `sidechain_core/lib/rpcs/bitassets_rpc.dart:826` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 7) · ×2
  • Duplicated block (9 lines × 7) bitassets/lib/pages/tabs/dutch_auction_page.dart:64 — bitassets/lib/pages/tabs/dutch_auction_page.dart:64-72 | bitassets/lib/pages/tabs/reserve_register_page.dart:77-85 | bitassets/lib/pages/tabs/reserve_register_page.dart:331-339 | bitwindow/lib/pages/wallet/wallet_checks.dart:178-186 | bitwindow/lib/pages/wallet/wallet_timestamps.dart:119-127 | sail_ui/lib/pages/sidechains/bmm_tab.dart:538-546 | sail_ui/lib/pages/sidechains/bmm_tab.dart:635-643 — before extracting anything, compare `bitassets/lib/pages/tabs/dutch_auction_page.dart` and `bitassets/lib/pages/tabs/reserve_register_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 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 `bitassets/lib/pages/tabs/dutch_auction_page.dart:64` it does not close everything it opens, so those 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 × 7) sidechain_core/lib/rpcs/bbc_rpc.dart:54 — sidechain_core/lib/rpcs/bbc_rpc.dart:54-62 | sidechain_core/lib/rpcs/bitassets_rpc.dart:232-240 | sidechain_core/lib/rpcs/bitnames_rpc.dart:159-167 | sidechain_core/lib/rpcs/coinshift_rpc.dart:112-120 | sidechain_core/lib/rpcs/photon_rpc.dart:70-78 | sidechain_core/lib/rpcs/thunder_rpc.dart:64-72 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:263-271 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×2
  • Duplicated block (10 lines × 5) bitwindow/lib/pages/wallet/wallet_overview.dart:232 — bitwindow/lib/pages/wallet/wallet_overview.dart:232-241 | bitwindow/lib/pages/wallet/wallet_receive.dart:290-299 | coinshift/lib/widgets/swap/swap_list.dart:300-309 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:416-425 | zside/lib/widgets/homepage_widget_catalog.dart:575-584 — before extracting anything, compare `bitwindow/lib/pages/wallet/wallet_overview.dart` and `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 5) sidechain-orchestrator/sidechain/bitassets/handler.go:44 — sidechain-orchestrator/sidechain/bitassets/handler.go:44-53 | sidechain-orchestrator/sidechain/bitnames/handler.go:38-47 | sidechain-orchestrator/sidechain/coinshift/handler.go:37-46 | sidechain-orchestrator/sidechain/photon/handler.go:34-43 | sidechain-orchestrator/sidechain/truthcoin/handler.go:40-49 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/bitnames/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 29 separate duplicated blocks between them, totalling at least 216 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×2
  • Duplicated block (6 lines × 2 locations) coinnews/app/item/[id]/page.tsx:7 — coinnews/app/item/[id]/page.tsx:7 · coinnews/app/u/[xpk]/page.tsx:3 — 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.
  • Duplicated block (6 lines × 2 locations) dc-hub/app/info/page.tsx:79 — dc-hub/app/info/page.tsx:79 · dc-hub/app/info/page.tsx:100 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R8 · Dependency Hygiene · Unused dependency '@bufbuild/protoc-gen-es' · ×2
  • Unused dependency '@bufbuild/protoc-gen-es' REDACTED:3 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@bufbuild/protoc-gen-es' REDACTED:3 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@connectrpc/protoc-gen-connect-query' · ×2
  • Unused dependency '@connectrpc/protoc-gen-connect-query' REDACTED:8 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@connectrpc/protoc-gen-connect-query' REDACTED:8 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'client-only' · ×2
  • Unused dependency 'client-only' REDACTED:10 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency 'client-only' REDACTED:10 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
AC6 · Visual & motion safety · Low contrast Tailwind colour pair (3.1 · ×1
  • Low contrast Tailwind colour pair (3.1:1) dc-hub/app/page.tsx:198 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×1
  • Animation without a prefers-reduced-motion guard dc-hub/components/ui/button.tsx:44 — <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.3 · ×1
  • Low contrast colour pair in CSS (4.3:1) difficulty/index.html:102 — `.head .ico` sets color: #fff on background-color: #3773f5 — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · main.run (cyclomatic 87) · ×1
  • main.run (cyclomatic 87) sidechain-orchestrator/cmd/drivechaind/main.go:154 — main.run has cyclomatic complexity 87 (threshold 15). Of this number, 53 points are the body's own statements and 34 belong to 16 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.
D1 · Cyclomatic Complexity · commands.runWalletBurnECX (cyclomatic 60) · ×1
  • commands.runWalletBurnECX (cyclomatic 60) sidechain-orchestrator/commands/wallet_burn_ecx.go:137 — commands.runWalletBurnECX has cyclomatic complexity 60 (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 · Orchestrator.SetNodeMode (cyclomatic 48) · ×1
  • Orchestrator.SetNodeMode (cyclomatic 48) sidechain-orchestrator/node_mode.go:98 — Orchestrator.SetNodeMode has cyclomatic complexity 48 (threshold 15). Of this number, 46 points are the body's own statements and 2 belong 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 · ElectrumBackend.buildSendPSBT (cyclomatic 47) · ×1
  • ElectrumBackend.buildSendPSBT (cyclomatic 47) sidechain-orchestrator/wallet/electrum_backend.go:1061 — ElectrumBackend.buildSendPSBT has cyclomatic complexity 47 (threshold 15). Of this number, 39 points are the body's own statements and 8 belong to 2 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.
D1 · Cyclomatic Complexity · commands.runWalletSignPSBT (cyclomatic 44) · ×1
  • commands.runWalletSignPSBT (cyclomatic 44) sidechain-orchestrator/commands/wallet_sign_psbt.go:32 — commands.runWalletSignPSBT 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 · _DeniabilityTableState.sortEntries (cyclomatic 43) · ×1
  • _DeniabilityTableState.sortEntries (cyclomatic 43) bitwindow/lib/pages/wallet/denability_page.dart:375 — _DeniabilityTableState.sortEntries has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProcessManager.StartWithOptions (cyclomatic 43) · ×1
  • ProcessManager.StartWithOptions (cyclomatic 43) sidechain-orchestrator/process.go:325 — ProcessManager.StartWithOptions has cyclomatic complexity 43 (threshold 15). Of this number, 24 points are the body's own statements and 19 belong to 3 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.
D1 · Cyclomatic Complexity · commands.runECashMigrate (cyclomatic 38) · ×1
  • commands.runECashMigrate (cyclomatic 38) sidechain-orchestrator/commands/ecash.go:54 — commands.runECashMigrate has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Orchestrator.startTargetOnly (cyclomatic 36) · ×1
  • Orchestrator.startTargetOnly (cyclomatic 36) REDACTED:2045 — Orchestrator.startTargetOnly has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong 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 · Orchestrator.rewindMigration (cyclomatic 35) · ×1
  • Orchestrator.rewindMigration (cyclomatic 35) sidechain-orchestrator/ecash_migration.go:976 — Orchestrator.rewindMigration has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · commands.runStart (cyclomatic 33) · ×1
  • commands.runStart (cyclomatic 33) REDACTED:196 — commands.runStart has cyclomatic complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 belong 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 · ECashUpgradeWatcher._check (cyclomatic 32) · ×1
  • ECashUpgradeWatcher._check (cyclomatic 32) bitwindow/lib/widgets/ecash_upgrade_banner.dart:124 — ECashUpgradeWatcher._check has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · page.Home (cyclomatic 32) · ×1
  • page.Home (cyclomatic 32) dc-hub/app/page.tsx:24 — page.Home has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 7 function items inside it that branch. 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 · SailCard._build (cyclomatic 31) · ×1
  • SailCard._build (cyclomatic 31) sail_ui/lib/widgets/containers/sail_card.dart:79 — SailCard._build 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 · Orchestrator.ApplyECashSwitch (cyclomatic 31) · ×1
  • Orchestrator.ApplyECashSwitch (cyclomatic 31) sidechain-orchestrator/ecash_switch.go:291 — Orchestrator.ApplyECashSwitch 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 · Orchestrator.startEnforcerWhenReady (cyclomatic 31) · ×1
  • Orchestrator.startEnforcerWhenReady (cyclomatic 31) REDACTED:1847 — Orchestrator.startEnforcerWhenReady 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 · ChatProvider._processPaymailEntry (cyclomatic 30) · ×1
  • ChatProvider._processPaymailEntry (cyclomatic 30) bitwindow/lib/providers/chat_provider.dart:700 — ChatProvider._processPaymailEntry 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 · Parser.handleBlockTick (cyclomatic 30) · ×1
  • Parser.handleBlockTick (cyclomatic 30) bitwindow/server/engines/bitcoind_engine.go:293 — Parser.handleBlockTick has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 belong 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 · Parser.applyPendingM4 (cyclomatic 30) · ×1
  • Parser.applyPendingM4 (cyclomatic 30) bitwindow/server/engines/bitcoind_engine.go:573 — Parser.applyPendingM4 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 · Orchestrator.GetSyncStatus (cyclomatic 30) · ×1
  • Orchestrator.GetSyncStatus (cyclomatic 30) REDACTED:3763 — Orchestrator.GetSyncStatus has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 3868, 3804, 3828, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · wallet.buildPSBT (cyclomatic 30) · ×1
  • wallet.buildPSBT (cyclomatic 30) sidechain-orchestrator/wallet/psbt.go:107 — wallet.buildPSBT 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 · _ECashMigrationDialogState.build (cyclomatic 29) · ×1
  • _ECashMigrationDialogState.build (cyclomatic 29) bitwindow/lib/widgets/ecash_migration_dialog.dart:435 — _ECashMigrationDialogState.build 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 · MultisigLoungeHandler.ensureWatchWallet (cyclomatic 29) · ×1
  • MultisigLoungeHandler.ensureWatchWallet (cyclomatic 29) sidechain-orchestrator/api/multisiglounge_handler.go:535 — MultisigLoungeHandler.ensureWatchWallet 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 · StratumHandler.SetMiningSettings (cyclomatic 29) · ×1
  • StratumHandler.SetMiningSettings (cyclomatic 29) sidechain-orchestrator/api/stratum_handler.go:800 — StratumHandler.SetMiningSettings has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Orchestrator.StartWithL1 (cyclomatic 29) · ×1
  • Orchestrator.StartWithL1 (cyclomatic 29) REDACTED:958 — Orchestrator.StartWithL1 has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 6 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 984). 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.
D1 · Cyclomatic Complexity · nodeHistory.History (cyclomatic 29) · ×1
  • nodeHistory.History (cyclomatic 29) sidechain-orchestrator/sidechain/thunder/history.go:190 — nodeHistory.History has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong 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 · _RootPageState.build (cyclomatic 28) · ×1
  • _RootPageState.build (cyclomatic 28) bitwindow/lib/pages/root_page.dart:444 — _RootPageState.build has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _UTXOSnapshotPageState.build (cyclomatic 28) · ×1
  • _UTXOSnapshotPageState.build (cyclomatic 28) sail_ui/lib/pages/utxo_snapshot_page.dart:87 — _UTXOSnapshotPageState.build has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SyncProvider._fetch (cyclomatic 28) · ×1
  • SyncProvider._fetch (cyclomatic 28) sidechain_core/lib/providers/sync_provider.dart:319 — SyncProvider._fetch 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 · _ImportPSBTModalState._importPSBT (cyclomatic 28) · ×1
  • _ImportPSBTModalState._importPSBT (cyclomatic 28) bitwindow/lib/widgets/import_psbt_modal.dart:166 — _ImportPSBTModalState._importPSBT 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 · BottomNav.displayConnectionStatusDialog (cyclomatic 28) · ×1
  • BottomNav.displayConnectionStatusDialog (cyclomatic 28) sail_ui/lib/widgets/nav/bottom_nav.dart:232 — BottomNav.displayConnectionStatusDialog 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 · NotificationEngine.processWalletTransactions (cyclomatic 28) · ×1
  • NotificationEngine.processWalletTransactions (cyclomatic 28) bitwindow/server/engines/notification_engine.go:285 — NotificationEngine.processWalletTransactions 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 · burnWalletState.check (cyclomatic 28) · ×1
  • burnWalletState.check (cyclomatic 28) sidechain-orchestrator/commands/wallet_burn_ecx.go:66 — burnWalletState.check 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 · corewalletfile.discover (cyclomatic 28) · ×1
  • corewalletfile.discover (cyclomatic 28) sidechain-orchestrator/corewalletfile/convert.go:259 — corewalletfile.discover has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 276, 261). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · _BumpFeeDialogState.build (cyclomatic 27) · ×1
  • _BumpFeeDialogState.build (cyclomatic 27) bitwindow/lib/pages/wallet/bump_fee_dialog.dart:207 — _BumpFeeDialogState.build has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _SailDropdownButtonState.build (cyclomatic 27) · ×1
  • _SailDropdownButtonState.build (cyclomatic 27) sail_ui/lib/widgets/inputs/dropdown_menu.dart:64 — _SailDropdownButtonState.build 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 · DeniabilityEngine.CleanupDenials (cyclomatic 27) · ×1
  • DeniabilityEngine.CleanupDenials (cyclomatic 27) REDACTED:114 — DeniabilityEngine.CleanupDenials has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 belong to 3 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.
D1 · Cyclomatic Complexity · DownloadManager.DownloadWithOptions (cyclomatic 27) · ×1
  • DownloadManager.DownloadWithOptions (cyclomatic 27) REDACTED:149 — DownloadManager.DownloadWithOptions has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 199). 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.
D1 · Cyclomatic Complexity · CoreBackend.PreviewSend (cyclomatic 27) · ×1
  • CoreBackend.PreviewSend (cyclomatic 27) sidechain-orchestrator/wallet/send_preview.go:65 — CoreBackend.PreviewSend has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong 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 · _SidechainsTable.build (cyclomatic 26) · ×1
  • _SidechainsTable.build (cyclomatic 26) bitwindow/lib/pages/sidechains_page.dart:455 — _SidechainsTable.build has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FundGroupModalViewModel._generateMultisigAddress (cyclomatic 26) · ×1
  • FundGroupModalViewModel._generateMultisigAddress (cyclomatic 26) bitwindow/lib/widgets/fund_group_modal.dart:164 — FundGroupModalViewModel._generateMultisigAddress 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 · BackupEngine.RestoreBackup (cyclomatic 26) · ×1
  • BackupEngine.RestoreBackup (cyclomatic 26) bitwindow/server/engines/backup_engine.go:187 — BackupEngine.RestoreBackup 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 · multisig.importGroupsJSON (cyclomatic 26) · ×1
  • multisig.importGroupsJSON (cyclomatic 26) bitwindow/server/models/multisig/multisig.go:654 — multisig.importGroupsJSON 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 · blockfile.scanFile (cyclomatic 26) · ×1
  • blockfile.scanFile (cyclomatic 26) sidechain-orchestrator/blockfile/convert.go:316 — blockfile.scanFile 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 · Orchestrator.SwapNetwork (cyclomatic 26) · ×1
  • Orchestrator.SwapNetwork (cyclomatic 26) REDACTED:2776 — Orchestrator.SwapNetwork 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 · wallet.combinePSBT (cyclomatic 26) · ×1
  • wallet.combinePSBT (cyclomatic 26) sidechain-orchestrator/wallet/psbt.go:1061 — wallet.combinePSBT 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 · _ButtonContent.build (cyclomatic 25) · ×1
  • _ButtonContent.build (cyclomatic 25) sail_ui/lib/widgets/buttons/button.dart:203 — _ButtonContent.build 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 · api.nodeOverview (cyclomatic 25) · ×1
  • api.nodeOverview (cyclomatic 25) sidechain-orchestrator/api/explorer_handler.go:225 — api.nodeOverview 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 · _NetworkSwapPageState.build (cyclomatic 24) · ×1
  • _NetworkSwapPageState.build (cyclomatic 24) bitwindow/lib/pages/settings/network_swap_page.dart:98 — _NetworkSwapPageState.build 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 · SidechainsViewModel.sidechainWidget (cyclomatic 24) · ×1
  • SidechainsViewModel.sidechainWidget (cyclomatic 24) bitwindow/lib/pages/sidechains_page.dart:1446 — SidechainsViewModel.sidechainWidget 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 · ProgressBar.build (cyclomatic 24) · ×1
  • ProgressBar.build (cyclomatic 24) sail_ui/lib/widgets/loaders/progress.dart:25 — ProgressBar.build 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 · BottomNavViewModel._connectionStatusRaw (cyclomatic 24) · ×1
  • BottomNavViewModel._connectionStatusRaw (cyclomatic 24) sail_ui/lib/widgets/nav/bottom_nav.dart:628 — BottomNavViewModel._connectionStatusRaw 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 · Parser.handleTimestamp (cyclomatic 24) · ×1
  • Parser.handleTimestamp (cyclomatic 24) bitwindow/server/engines/bitcoind_engine.go:755 — Parser.handleTimestamp 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 · multisig.importTransactionsJSON (cyclomatic 24) · ×1
  • multisig.importTransactionsJSON (cyclomatic 24) bitwindow/server/models/multisig/multisig.go:815 — multisig.importTransactionsJSON 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 · CoreBackend.Send (cyclomatic 24) · ×1
  • CoreBackend.Send (cyclomatic 24) sidechain-orchestrator/wallet/core_backend.go:832 — CoreBackend.Send 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 · page.InfoPage (cyclomatic 24) · ×1
  • page.InfoPage (cyclomatic 24) dc-hub/app/info/page.tsx:23 — page.InfoPage has cyclomatic complexity 24 (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 · _TransactionFlowDiagramState._handleHover (cyclomatic 23) · ×1
  • _TransactionFlowDiagramState._handleHover (cyclomatic 23) bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:202 — _TransactionFlowDiagramState._handleHover 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 · SidechainsViewModel.rpcForSlot (cyclomatic 23) · ×1
  • SidechainsViewModel.rpcForSlot (cyclomatic 23) bitwindow/lib/pages/sidechains_page.dart:1331 — SidechainsViewModel.rpcForSlot 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 · _L1RestartPageState.build (cyclomatic 23) · ×1
  • _L1RestartPageState.build (cyclomatic 23) sail_ui/lib/pages/l1_restart_page.dart:65 — _L1RestartPageState.build has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DaemonConnectionCard._buildCard (cyclomatic 23) · ×1
  • DaemonConnectionCard._buildCard (cyclomatic 23) sail_ui/lib/widgets/components/daemon_connection_card.dart:80 — DaemonConnectionCard._buildCard 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 · BackupEngine.CreateBackup (cyclomatic 23) · ×1
  • BackupEngine.CreateBackup (cyclomatic 23) bitwindow/server/engines/backup_engine.go:55 — BackupEngine.CreateBackup has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · engines.DetectFileType (cyclomatic 23) · ×1
  • engines.DetectFileType (cyclomatic 23) bitwindow/server/engines/bitdrive_engine.go:151 — engines.DetectFileType has cyclomatic complexity 23 (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 · commands.checkBurnPreview (cyclomatic 23) · ×1
  • commands.checkBurnPreview (cyclomatic 23) sidechain-orchestrator/commands/wallet_burn_ecx.go:341 — commands.checkBurnPreview 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 · DownloadManager.extractZipPreservingTree (cyclomatic 23) · ×1
  • DownloadManager.extractZipPreservingTree (cyclomatic 23) REDACTED:672 — DownloadManager.extractZipPreservingTree 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 · BmmEngine.tick (cyclomatic 23) · ×1
  • BmmEngine.tick (cyclomatic 23) sidechain-orchestrator/engines/bmm_engine.go:604 — BmmEngine.tick 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 · ElectrumBackend.scan (cyclomatic 23) · ×1
  • ElectrumBackend.scan (cyclomatic 23) sidechain-orchestrator/wallet/electrum_backend.go:2511 — ElectrumBackend.scan 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 · _TransactionTableState.build (cyclomatic 22) · ×1
  • _TransactionTableState.build (cyclomatic 22) bitwindow/lib/pages/wallet/wallet_overview.dart:243 — _TransactionTableState.build has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TransactionProvider.fetch (cyclomatic 22) · ×1
  • TransactionProvider.fetch (cyclomatic 22) bitwindow/lib/providers/transactions_provider.dart:134 — TransactionProvider.fetch 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 · CreateMultisigModal.build (cyclomatic 22) · ×1
  • CreateMultisigModal.build (cyclomatic 22) bitwindow/lib/widgets/create_multisig_modal.dart:113 — CreateMultisigModal.build 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 · _SailTableState.build (cyclomatic 22) · ×1
  • _SailTableState.build (cyclomatic 22) sail_ui/lib/widgets/components/table.dart:206 — _SailTableState.build 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 · _SailSliderState.build (cyclomatic 22) · ×1
  • _SailSliderState.build (cyclomatic 22) sail_ui/lib/widgets/inputs/sail_slider.dart:112 — _SailSliderState.build 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 · Server.listTransactions (cyclomatic 22) · ×1
  • Server.listTransactions (cyclomatic 22) bitwindow/server/api/wallet/wallet.go:353 — Server.listTransactions 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 · Parser.handleOpReturns (cyclomatic 22) · ×1
  • Parser.handleOpReturns (cyclomatic 22) bitwindow/server/engines/bitcoind_engine.go:940 — Parser.handleOpReturns 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 · EnforcerConfManager.GetCliArgs (cyclomatic 22) · ×1
  • EnforcerConfManager.GetCliArgs (cyclomatic 22) sidechain-orchestrator/config/enforcer_conf.go:287 — EnforcerConfManager.GetCliArgs 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 · corewalletfile.convertWallet (cyclomatic 22) · ×1
  • corewalletfile.convertWallet (cyclomatic 22) sidechain-orchestrator/corewalletfile/convert.go:465 — corewalletfile.convertWallet has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs 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 · Orchestrator.applyDiskECashSwitch (cyclomatic 22) · ×1
  • Orchestrator.applyDiskECashSwitch (cyclomatic 22) sidechain-orchestrator/ecash_migration.go:1380 — Orchestrator.applyDiskECashSwitch 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 · Server.checkShareLocked (cyclomatic 22) · ×1
  • Server.checkShareLocked (cyclomatic 22) sidechain-orchestrator/stratum/server.go:784 — Server.checkShareLocked has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ChatPage.build (cyclomatic 21) · ×1
  • ChatPage.build (cyclomatic 21) bitwindow/lib/pages/chat_page.dart:17 — ChatPage.build 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 · _ReceiveAddressesTableState.sortedEntries (cyclomatic 21) · ×1
  • _ReceiveAddressesTableState.sortedEntries (cyclomatic 21) bitwindow/lib/pages/wallet/wallet_receive.dart:240 — _ReceiveAddressesTableState.sortedEntries 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 · ChatProvider.sendMessage (cyclomatic 21) · ×1
  • ChatProvider.sendMessage (cyclomatic 21) bitwindow/lib/providers/chat_provider.dart:825 — ChatProvider.sendMessage 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 · BitnamesSecureStore._loadSecure (cyclomatic 21) · ×1
  • BitnamesSecureStore._loadSecure (cyclomatic 21) bitwindow/lib/services/bitnames_secure_store.dart:341 — BitnamesSecureStore._loadSecure 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 · __SailScaleButtonState.build (cyclomatic 21) · ×1
  • __SailScaleButtonState.build (cyclomatic 21) sail_ui/lib/widgets/buttons/button.dart:571 — __SailScaleButtonState.build 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 · Server.ListWithdrawals (cyclomatic 21) · ×1
  • Server.ListWithdrawals (cyclomatic 21) bitwindow/server/api/drivechain/drivechain.go:321 — Server.ListWithdrawals has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs 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 · Server.GetTransactionDetails (cyclomatic 21) · ×1
  • Server.GetTransactionDetails (cyclomatic 21) bitwindow/server/api/wallet/wallet.go:1424 — Server.GetTransactionDetails 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 · main.realMain (cyclomatic 21) · ×1
  • main.realMain (cyclomatic 21) REDACTED:72 — main.realMain has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 8 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 · MultisigLoungeHandler.RestoreHistory (cyclomatic 21) · ×1
  • MultisigLoungeHandler.RestoreHistory (cyclomatic 21) sidechain-orchestrator/api/multisiglounge_handler.go:718 — MultisigLoungeHandler.RestoreHistory 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 · Orchestrator.GatherFilesToDelete (cyclomatic 21) · ×1
  • Orchestrator.GatherFilesToDelete (cyclomatic 21) sidechain-orchestrator/reset.go:173 — Orchestrator.GatherFilesToDelete has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong 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 · Orchestrator.DeleteFiles (cyclomatic 21) · ×1
  • Orchestrator.DeleteFiles (cyclomatic 21) sidechain-orchestrator/reset.go:257 — Orchestrator.DeleteFiles has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong 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 · wallet.ParseDescriptorAs (cyclomatic 21) · ×1
  • wallet.ParseDescriptorAs (cyclomatic 21) sidechain-orchestrator/wallet/descriptor.go:48 — wallet.ParseDescriptorAs 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 · CoreBackend.CreatePSBT (cyclomatic 21) · ×1
  • CoreBackend.CreatePSBT (cyclomatic 21) sidechain-orchestrator/wallet/core_backend.go:1179 — CoreBackend.CreatePSBT 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 · _DepositModalState._getSidechainRPC (cyclomatic 20) · ×1
  • _DepositModalState._getSidechainRPC (cyclomatic 20) bitwindow/lib/pages/sidechains_page.dart:2258 — _DepositModalState._getSidechainRPC 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 · _PriceCardState.build (cyclomatic 20) · ×1
  • _PriceCardState.build (cyclomatic 20) truthcoin/lib/pages/market_detail_page.dart:1111 — _PriceCardState.build 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 · BackendStateProvider._rpcForBinaryName (cyclomatic 20) · ×1
  • BackendStateProvider._rpcForBinaryName (cyclomatic 20) sidechain_core/lib/providers/backend_state_provider.dart:217 — BackendStateProvider._rpcForBinaryName 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 · _HardwareDevicePickerState._deviceTile (cyclomatic 20) · ×1
  • _HardwareDevicePickerState._deviceTile (cyclomatic 20) bitwindow/lib/widgets/hardware_device_picker.dart:331 — _HardwareDevicePickerState._deviceTile 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 · ChequeEngine.recoverChequesOnUnlock (cyclomatic 20) · ×1
  • ChequeEngine.recoverChequesOnUnlock (cyclomatic 20) REDACTED:409 — ChequeEngine.recoverChequesOnUnlock 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 · M4Engine.ApplyPendingM4 (cyclomatic 20) · ×1
  • M4Engine.ApplyPendingM4 (cyclomatic 20) bitwindow/server/engines/m4_engine.go:104 — M4Engine.ApplyPendingM4 has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong 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 · BitcoinConfHandler.SetBitcoinConfigNetwork (cyclomatic 20) · ×1
  • BitcoinConfHandler.SetBitcoinConfigNetwork (cyclomatic 20) sidechain-orchestrator/api/bitcoin_conf_handler.go:144 — BitcoinConfHandler.SetBitcoinConfigNetwork 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 · blockfile.run (cyclomatic 20) · ×1
  • blockfile.run (cyclomatic 20) sidechain-orchestrator/blockfile/convert.go:108 — blockfile.run 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 · ConnectionMonitor.testConnection (cyclomatic 20) · ×1
  • ConnectionMonitor.testConnection (cyclomatic 20) sidechain-orchestrator/connection_monitor.go:339 — ConnectionMonitor.testConnection 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 · Orchestrator.newMigration (cyclomatic 20) · ×1
  • Orchestrator.newMigration (cyclomatic 20) sidechain-orchestrator/ecash_migration.go:352 — Orchestrator.newMigration 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 · Orchestrator.StartECashMigration (cyclomatic 20) · ×1
  • Orchestrator.StartECashMigration (cyclomatic 20) sidechain-orchestrator/ecash_migration.go:480 — Orchestrator.StartECashMigration 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 · Orchestrator.RestartDaemon (cyclomatic 20) · ×1
  • Orchestrator.RestartDaemon (cyclomatic 20) REDACTED:1743 — Orchestrator.RestartDaemon has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 1762). 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.
D1 · Cyclomatic Complexity · wallet.verifyInputScript (cyclomatic 20) · ×1
  • wallet.verifyInputScript (cyclomatic 20) sidechain-orchestrator/wallet/multisiglounge.go:598 — wallet.verifyInputScript 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 · CoreBackend.BumpFee (cyclomatic 20) · ×1
  • CoreBackend.BumpFee (cyclomatic 20) sidechain-orchestrator/wallet/core_backend.go:1416 — CoreBackend.BumpFee 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 · Service.SyncBalance (cyclomatic 20) · ×1
  • Service.SyncBalance (cyclomatic 20) sidechain-orchestrator/wallet/metadata.go:87 — Service.SyncBalance 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 · explorer-client.BlockCard (cyclomatic 20) · ×1
  • explorer-client.BlockCard (cyclomatic 20) dc-hub/app/sidechains/explorer-client.tsx:292 — explorer-client.BlockCard 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 · _SettingsNetworkState.build (cyclomatic 19) · ×1
  • _SettingsNetworkState.build (cyclomatic 19) bitwindow/lib/pages/settings/settings_network.dart:343 — _SettingsNetworkState.build 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 · _DeniabilityTableState.build (cyclomatic 19) · ×1
  • _DeniabilityTableState.build (cyclomatic 19) bitwindow/lib/pages/wallet/denability_page.dart:163 — _DeniabilityTableState.build 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 · ConsolidationProvider.start (cyclomatic 19) · ×1
  • ConsolidationProvider.start (cyclomatic 19) bitwindow/lib/providers/consolidation_provider.dart:155 — ConsolidationProvider.start 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 · _HashCalculatorState._buildHashResults (cyclomatic 19) · ×1
  • _HashCalculatorState._buildHashResults (cyclomatic 19) bitwindow/lib/widgets/hash_calculator_modal.dart:385 — _HashCalculatorState._buildHashResults has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ImportPSBTModalState.build (cyclomatic 19) · ×1
  • _ImportPSBTModalState.build (cyclomatic 19) bitwindow/lib/widgets/import_psbt_modal.dart:363 — _ImportPSBTModalState.build 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 · SailTextField.build (cyclomatic 19) · ×1
  • SailTextField.build (cyclomatic 19) sail_ui/lib/widgets/inputs/text_field.dart:69 — SailTextField.build has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Server.ImportLabels (cyclomatic 19) · ×1
  • Server.ImportLabels (cyclomatic 19) bitwindow/server/api/bitwindowd/bitwindowd.go:669 — Server.ImportLabels 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 · Server.ListBlocks (cyclomatic 19) · ×1
  • Server.ListBlocks (cyclomatic 19) bitwindow/server/api/bitwindowd/bitwindowd.go:772 — Server.ListBlocks has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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 · Server.ListRecentTransactions (cyclomatic 19) · ×1
  • Server.ListRecentTransactions (cyclomatic 19) bitwindow/server/api/bitwindowd/bitwindowd.go:908 — Server.ListRecentTransactions 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 · BackupEngine.validateZIP (cyclomatic 19) · ×1
  • BackupEngine.validateZIP (cyclomatic 19) bitwindow/server/engines/backup_engine.go:671 — BackupEngine.validateZIP 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 · DeniabilityEngine.hopOutputsInHistory (cyclomatic 19) · ×1
  • DeniabilityEngine.hopOutputsInHistory (cyclomatic 19) REDACTED:501 — DeniabilityEngine.hopOutputsInHistory has cyclomatic complexity 19 (threshold 15). Of this number, 18 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 · Builder.build (cyclomatic 19) · ×1
  • Builder.build (cyclomatic 19) difficulty/state.go:141 — Builder.build 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 · api.nodeTransaction (cyclomatic 19) · ×1
  • api.nodeTransaction (cyclomatic 19) sidechain-orchestrator/api/explorer_core.go:187 — api.nodeTransaction 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 · BMMHandler.CreateBid (cyclomatic 19) · ×1
  • BMMHandler.CreateBid (cyclomatic 19) sidechain-orchestrator/api/bmm_handler.go:445 — BMMHandler.CreateBid has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WalletHandler.bip47NotificationCoin (cyclomatic 19) · ×1
  • WalletHandler.bip47NotificationCoin (cyclomatic 19) sidechain-orchestrator/api/bip47_send.go:210 — WalletHandler.bip47NotificationCoin 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 · WalletHandler.SendTransaction (cyclomatic 19) · ×1
  • WalletHandler.SendTransaction (cyclomatic 19) sidechain-orchestrator/api/wallet_handler.go:959 — WalletHandler.SendTransaction has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Orchestrator.ReadDatadirNetwork (cyclomatic 19) · ×1
  • Orchestrator.ReadDatadirNetwork (cyclomatic 19) sidechain-orchestrator/datadir_network.go:54 — Orchestrator.ReadDatadirNetwork has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Orchestrator.ReleaseStrandedTxs (cyclomatic 19) · ×1
  • Orchestrator.ReleaseStrandedTxs (cyclomatic 19) sidechain-orchestrator/stranded_release.go:37 — Orchestrator.ReleaseStrandedTxs has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Server.handle (cyclomatic 19) · ×1
  • Server.handle (cyclomatic 19) sidechain-orchestrator/stratum/server.go:476 — Server.handle 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 · wallet.StrandedTxIDs (cyclomatic 19) · ×1
  • wallet.StrandedTxIDs (cyclomatic 19) sidechain-orchestrator/wallet/core_stranded.go:50 — wallet.StrandedTxIDs has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong 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 · wallet.DeriveKeystore (cyclomatic 19) · ×1
  • wallet.DeriveKeystore (cyclomatic 19) sidechain-orchestrator/wallet/derive_keystore.go:35 — wallet.DeriveKeystore 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 · wallet.verifyTaprootSigs (cyclomatic 19) · ×1
  • wallet.verifyTaprootSigs (cyclomatic 19) sidechain-orchestrator/wallet/psbt.go:504 — wallet.verifyTaprootSigs 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 · CoreBackend.previewBumpFee (cyclomatic 19) · ×1
  • CoreBackend.previewBumpFee (cyclomatic 19) sidechain-orchestrator/wallet/core_backend.go:1289 — CoreBackend.previewBumpFee has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ElectrumBackend.DetectScriptKind (cyclomatic 19) · ×1
  • ElectrumBackend.DetectScriptKind (cyclomatic 19) sidechain-orchestrator/wallet/detect_script_kind.go:45 — ElectrumBackend.DetectScriptKind 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 · ElectrumBackend.BumpFee (cyclomatic 19) · ×1
  • ElectrumBackend.BumpFee (cyclomatic 19) sidechain-orchestrator/wallet/electrum_backend.go:1778 — ElectrumBackend.BumpFee 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 · EsploraClient.doWith (cyclomatic 19) · ×1
  • EsploraClient.doWith (cyclomatic 19) sidechain-orchestrator/wallet/esplora.go:286 — EsploraClient.doWith 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 · Service.loadWalletFile (cyclomatic 19) · ×1
  • Service.loadWalletFile (cyclomatic 19) sidechain-orchestrator/wallet/service.go:1880 — Service.loadWalletFile 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 · Binary._getPossibleBinaryPaths (cyclomatic 18) · ×1
  • Binary._getPossibleBinaryPaths (cyclomatic 18) sidechain_core/lib/config/binaries.dart:203 — Binary._getPossibleBinaryPaths 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 · Market.fromJson (cyclomatic 18) · ×1
  • Market.fromJson (cyclomatic 18) truthcoin/lib/models/market.dart:73 — Market.fromJson 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 · BitnamesViewModel._registerBitname (cyclomatic 18) · ×1
  • BitnamesViewModel._registerBitname (cyclomatic 18) bitnames/lib/pages/tabs/reserve_register_page.dart:785 — BitnamesViewModel._registerBitname 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 · CheckDetailPage.build (cyclomatic 18) · ×1
  • CheckDetailPage.build (cyclomatic 18) bitwindow/lib/pages/wallet/check_detail_page.dart:260 — CheckDetailPage.build 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 · _MultisigConfigStepState._onPathChanged (cyclomatic 18) · ×1
  • _MultisigConfigStepState._onPathChanged (cyclomatic 18) REDACTED:377 — _MultisigConfigStepState._onPathChanged has cyclomatic complexity 18 (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 · _UTXOsTableState.build (cyclomatic 18) · ×1
  • _UTXOsTableState.build (cyclomatic 18) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:858 — _UTXOsTableState.build 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 · BitnamesSecureStore._decryptSlot (cyclomatic 18) · ×1
  • BitnamesSecureStore._decryptSlot (cyclomatic 18) bitwindow/lib/services/bitnames_secure_store.dart:448 — BitnamesSecureStore._decryptSlot has cyclomatic complexity 18 (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 · _SailTableState._autoSizeColumns (cyclomatic 18) · ×1
  • _SailTableState._autoSizeColumns (cyclomatic 18) sail_ui/lib/widgets/components/table.dart:389 — _SailTableState._autoSizeColumns has cyclomatic complexity 18 (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 · BottomNavViewModel.connectionColor (cyclomatic 18) · ×1
  • BottomNavViewModel.connectionColor (cyclomatic 18) sail_ui/lib/widgets/nav/bottom_nav.dart:580 — BottomNavViewModel.connectionColor has cyclomatic complexity 18 (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 · ChainLoaders.build (cyclomatic 18) · ×1
  • ChainLoaders.build (cyclomatic 18) sail_ui/lib/widgets/nav/bottom_nav.dart:760 — ChainLoaders.build 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 · BackupEngine.exportMultisigJSON (cyclomatic 18) · ×1
  • BackupEngine.exportMultisigJSON (cyclomatic 18) bitwindow/server/engines/backup_engine.go:402 — BackupEngine.exportMultisigJSON 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 · engines.selectBranchAndBound (cyclomatic 18) · ×1
  • engines.selectBranchAndBound (cyclomatic 18) REDACTED:167 — engines.selectBranchAndBound has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 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 · engines.ParseBitcoinURI (cyclomatic 18) · ×1
  • engines.ParseBitcoinURI (cyclomatic 18) bitwindow/server/engines/utils_engine.go:31 — engines.ParseBitcoinURI 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 · DeniabilityEngine.ProcessUTXO (cyclomatic 18) · ×1
  • DeniabilityEngine.ProcessUTXO (cyclomatic 18) REDACTED:291 — DeniabilityEngine.ProcessUTXO 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 · MempoolWatcher.handle (cyclomatic 18) · ×1
  • MempoolWatcher.handle (cyclomatic 18) bitwindow/server/engines/mempool_watch_engine.go:382 — MempoolWatcher.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 · BMMHandler.readWalletCoins (cyclomatic 18) · ×1
  • BMMHandler.readWalletCoins (cyclomatic 18) sidechain-orchestrator/api/bmm_handler.go:939 — BMMHandler.readWalletCoins 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 · Orchestrator.checkMigration (cyclomatic 18) · ×1
  • Orchestrator.checkMigration (cyclomatic 18) sidechain-orchestrator/ecash_migration.go:1288 — Orchestrator.checkMigration 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 · Orchestrator.PlanNetworkChange (cyclomatic 18) · ×1
  • Orchestrator.PlanNetworkChange (cyclomatic 18) sidechain-orchestrator/network_change_plan.go:40 — Orchestrator.PlanNetworkChange 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 · Orchestrator.StatusWithOptions (cyclomatic 18) · ×1
  • Orchestrator.StatusWithOptions (cyclomatic 18) REDACTED:758 — Orchestrator.StatusWithOptions 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 · Orchestrator.AdoptOrphans (cyclomatic 18) · ×1
  • Orchestrator.AdoptOrphans (cyclomatic 18) REDACTED:2604 — Orchestrator.AdoptOrphans 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 · Orchestrator.ReloadSidechainWallets (cyclomatic 18) · ×1
  • Orchestrator.ReloadSidechainWallets (cyclomatic 18) sidechain-orchestrator/sidechain_wallet_state.go:323 — Orchestrator.ReloadSidechainWallets has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong 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 · testharness.findBitcoind (cyclomatic 18) · ×1
  • testharness.findBitcoind (cyclomatic 18) sidechain-orchestrator/testharness/bitcoind.go:46 — testharness.findBitcoind 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 · ElectrumBackend.CreateCpfp (cyclomatic 18) · ×1
  • ElectrumBackend.CreateCpfp (cyclomatic 18) sidechain-orchestrator/wallet/electrum_backend.go:1978 — ElectrumBackend.CreateCpfp 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 · Service.DeleteAllWallets (cyclomatic 18) · ×1
  • Service.DeleteAllWallets (cyclomatic 18) sidechain-orchestrator/wallet/service.go:1610 — Service.DeleteAllWallets 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 · SidechainsViewModel._sidechainRPC (cyclomatic 17) · ×1
  • SidechainsViewModel._sidechainRPC (cyclomatic 17) bitwindow/lib/pages/sidechains_page.dart:1408 — SidechainsViewModel._sidechainRPC 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 · MultisigLoungeViewModel._validateAndFixWalletFlags (cyclomatic 17) · ×1
  • MultisigLoungeViewModel._validateAndFixWalletFlags (cyclomatic 17) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1092 — MultisigLoungeViewModel._validateAndFixWalletFlags 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 · _FileLogsTabState._parseAnsiCodes (cyclomatic 17) · ×1
  • _FileLogsTabState._parseAnsiCodes (cyclomatic 17) sail_ui/lib/pages/log_page.dart:263 — _FileLogsTabState._parseAnsiCodes 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 · ChangeTrackingMixin._deepEquals (cyclomatic 17) · ×1
  • ChangeTrackingMixin._deepEquals (cyclomatic 17) sidechain_core/lib/utils/change_tracker.dart:79 — ChangeTrackingMixin._deepEquals 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 · _SailPopoverState._targetAnchor (cyclomatic 17) · ×1
  • _SailPopoverState._targetAnchor (cyclomatic 17) sail_ui/lib/widgets/containers/sail_popover.dart:131 — _SailPopoverState._targetAnchor 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. This shape REPEATS in the file: one other method here (_SailPopoverState._followerAnchor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · _SailPopoverState._followerAnchor (cyclomatic 17) · ×1
  • _SailPopoverState._followerAnchor (cyclomatic 17) sail_ui/lib/widgets/containers/sail_popover.dart:172 — _SailPopoverState._followerAnchor 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. This shape REPEATS in the file: one other method here (_SailPopoverState._targetAnchor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · _SailTooltipState._buildOverlay (cyclomatic 17) · ×1
  • _SailTooltipState._buildOverlay (cyclomatic 17) sail_ui/lib/widgets/feedback/sail_tooltip.dart:139 — _SailTooltipState._buildOverlay 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 · _SailCheckboxState.build (cyclomatic 17) · ×1
  • _SailCheckboxState.build (cyclomatic 17) sail_ui/lib/widgets/inputs/checkbox.dart:29 — _SailCheckboxState.build 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 · _ResetConfirmationPageState._startDeletion (cyclomatic 17) · ×1
  • _ResetConfirmationPageState._startDeletion (cyclomatic 17) sail_ui/lib/widgets/reset/reset_confirmation_page.dart:85 — _ResetConfirmationPageState._startDeletion 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 · _ResetConfirmationPageState._buildContent (cyclomatic 17) · ×1
  • _ResetConfirmationPageState._buildContent (cyclomatic 17) sail_ui/lib/widgets/reset/reset_confirmation_page.dart:205 — _ResetConfirmationPageState._buildContent 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 · MempoolWatcher.watch (cyclomatic 17) · ×1
  • MempoolWatcher.watch (cyclomatic 17) bitwindow/server/engines/mempool_watch_engine.go:191 — MempoolWatcher.watch 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 · TimestampEngine.checkConfirmations (cyclomatic 17) · ×1
  • TimestampEngine.checkConfirmations (cyclomatic 17) bitwindow/server/engines/timestamp_engine.go:106 — TimestampEngine.checkConfirmations 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 · cheques.ImportBackupTx (cyclomatic 17) · ×1
  • cheques.ImportBackupTx (cyclomatic 17) bitwindow/server/models/cheques/backup.go:70 — cheques.ImportBackupTx 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 · cheques.CreateOrUpdateFromRecoveryVersioned (cyclomatic 17) · ×1
  • cheques.CreateOrUpdateFromRecoveryVersioned (cyclomatic 17) bitwindow/server/models/cheques/cheques.go:387 — cheques.CreateOrUpdateFromRecoveryVersioned 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 · MultisigLoungeHandler.SignTransaction (cyclomatic 17) · ×1
  • MultisigLoungeHandler.SignTransaction (cyclomatic 17) sidechain-orchestrator/api/multisiglounge_handler.go:364 — MultisigLoungeHandler.SignTransaction 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 · WalletHandler.GetTransactionDetails (cyclomatic 17) · ×1
  • WalletHandler.GetTransactionDetails (cyclomatic 17) sidechain-orchestrator/api/wallet_handler.go:1392 — WalletHandler.GetTransactionDetails 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 · orchestrator.alignECashState (cyclomatic 17) · ×1
  • orchestrator.alignECashState (cyclomatic 17) sidechain-orchestrator/ecash_sidechain_state.go:65 — orchestrator.alignECashState 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 · config.ParseBitcoinConfig (cyclomatic 17) · ×1
  • config.ParseBitcoinConfig (cyclomatic 17) sidechain-orchestrator/config/bitcoin_config.go:66 — config.ParseBitcoinConfig 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 · Orchestrator.stopMigrationNodes (cyclomatic 17) · ×1
  • Orchestrator.stopMigrationNodes (cyclomatic 17) sidechain-orchestrator/ecash_migration.go:762 — Orchestrator.stopMigrationNodes 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 · Orchestrator.prepareRemoteSidechainArgs (cyclomatic 17) · ×1
  • Orchestrator.prepareRemoteSidechainArgs (cyclomatic 17) sidechain-orchestrator/remote_enforcer.go:197 — Orchestrator.prepareRemoteSidechainArgs 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 · wallet.createAndImport (cyclomatic 17) · ×1
  • wallet.createAndImport (cyclomatic 17) sidechain-orchestrator/wallet/core_backend.go:2024 — wallet.createAndImport 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 · wallet.KeystorePathScriptType (cyclomatic 17) · ×1
  • wallet.KeystorePathScriptType (cyclomatic 17) sidechain-orchestrator/wallet/derivation.go:157 — wallet.KeystorePathScriptType 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 · wallet.parseColdcardConfig (cyclomatic 17) · ×1
  • wallet.parseColdcardConfig (cyclomatic 17) sidechain-orchestrator/wallet/multisig_config_import.go:56 — wallet.parseColdcardConfig 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 · wallet.ValidateMultisigPsbt (cyclomatic 17) · ×1
  • wallet.ValidateMultisigPsbt (cyclomatic 17) sidechain-orchestrator/wallet/multisiglounge.go:247 — wallet.ValidateMultisigPsbt 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 · CoreBackend.CreateCpfp (cyclomatic 17) · ×1
  • CoreBackend.CreateCpfp (cyclomatic 17) sidechain-orchestrator/wallet/core_backend.go:1655 — CoreBackend.CreateCpfp has cyclomatic complexity 17 (threshold 15). Of this number, 15 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 · ElectrumBackend.ListReceivedByAddress (cyclomatic 17) · ×1
  • ElectrumBackend.ListReceivedByAddress (cyclomatic 17) sidechain-orchestrator/wallet/electrum_backend.go:457 — ElectrumBackend.ListReceivedByAddress 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 · ElectrumBackend.SignPSBTWithCosigner (cyclomatic 17) · ×1
  • ElectrumBackend.SignPSBTWithCosigner (cyclomatic 17) sidechain-orchestrator/wallet/electrum_backend.go:1346 — ElectrumBackend.SignPSBTWithCosigner 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 · ElectrumBackend.previewBumpFee (cyclomatic 17) · ×1
  • ElectrumBackend.previewBumpFee (cyclomatic 17) sidechain-orchestrator/wallet/electrum_backend.go:1686 — ElectrumBackend.previewBumpFee 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 · ElectrumBackend.hydrate (cyclomatic 17) · ×1
  • ElectrumBackend.hydrate (cyclomatic 17) sidechain-orchestrator/wallet/electrum_backend.go:3072 — ElectrumBackend.hydrate 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 · NetworkChainSource.current (cyclomatic 17) · ×1
  • NetworkChainSource.current (cyclomatic 17) sidechain-orchestrator/wallet/network_chain_source.go:76 — NetworkChainSource.current 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 · Service.restoreWalletBackup (cyclomatic 17) · ×1
  • Service.restoreWalletBackup (cyclomatic 17) sidechain-orchestrator/wallet/metadata.go:196 — Service.restoreWalletBackup has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 246, 222, 197, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Service.startWatcher (cyclomatic 17) · ×1
  • Service.startWatcher (cyclomatic 17) sidechain-orchestrator/wallet/service.go:2184 — Service.startWatcher has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 2198). 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.
D1 · Cyclomatic Complexity · walletfile.Write (cyclomatic 17) · ×1
  • walletfile.Write (cyclomatic 17) sidechain-orchestrator/walletfile/walletfile.go:168 — walletfile.Write 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 · _NetworkStatisticsPageState.build (cyclomatic 16) · ×1
  • _NetworkStatisticsPageState.build (cyclomatic 16) bitwindow/lib/dialogs/network_statistics_dialog.dart:43 — _NetworkStatisticsPageState.build 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 · NewDecisionDraft.error (cyclomatic 16) · ×1
  • NewDecisionDraft.error (cyclomatic 16) truthcoin/lib/models/market_creation.dart:85 — NewDecisionDraft.error 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 · _SettingsResetState._executeReset (cyclomatic 16) · ×1
  • _SettingsResetState._executeReset (cyclomatic 16) bitwindow/lib/pages/settings/settings_reset.dart:170 — _SettingsResetState._executeReset 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 · _MultisigTransactionsTableState._updateSortedTransactions (cyclomatic 16) · ×1
  • _MultisigTransactionsTableState._updateSortedTransactions (cyclomatic 16) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:571 — _MultisigTransactionsTableState._updateSortedTransactions has cyclomatic complexity 16 (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 · MultisigLoungeViewModel.signTransaction (cyclomatic 16) · ×1
  • MultisigLoungeViewModel.signTransaction (cyclomatic 16) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1611 — MultisigLoungeViewModel.signTransaction 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 · _UTXODistributionChartState.build (cyclomatic 16) · ×1
  • _UTXODistributionChartState.build (cyclomatic 16) bitwindow/lib/pages/wallet/widgets/utxo_distribution_chart.dart:70 — _UTXODistributionChartState.build 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 · _SailCreateWalletPageState._handleRestore (cyclomatic 16) · ×1
  • _SailCreateWalletPageState._handleRestore (cyclomatic 16) sail_ui/lib/pages/create_wallet_page.dart:725 — _SailCreateWalletPageState._handleRestore 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 · BlockchainProvider.fetch (cyclomatic 16) · ×1
  • BlockchainProvider.fetch (cyclomatic 16) bitwindow/lib/providers/blockchain_provider.dart:51 — BlockchainProvider.fetch 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 · MempoolProvider.fetch (cyclomatic 16) · ×1
  • MempoolProvider.fetch (cyclomatic 16) bitwindow/lib/providers/mempool_provider.dart:117 — MempoolProvider.fetch 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 · ProcessManager.start (cyclomatic 16) · ×1
  • ProcessManager.start (cyclomatic 16) sidechain_core/lib/providers/binaries/managers/process_manager.dart:141 — ProcessManager.start 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 · WindowProvider.open (cyclomatic 16) · ×1
  • WindowProvider.open (cyclomatic 16) sidechain_core/lib/providers/window_provider.dart:116 — WindowProvider.open 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 · _SailTableState.didUpdateWidget (cyclomatic 16) · ×1
  • _SailTableState.didUpdateWidget (cyclomatic 16) sail_ui/lib/widgets/components/table.dart:113 — _SailTableState.didUpdateWidget 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 · _SidechainRPCMethodsTabState._parseJsonArray (cyclomatic 16) · ×1
  • _SidechainRPCMethodsTabState._parseJsonArray (cyclomatic 16) sail_ui/lib/widgets/debug/sidechain_debug_window.dart:782 — _SidechainRPCMethodsTabState._parseJsonArray 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 · HomepageBuilder.build (cyclomatic 16) · ×1
  • HomepageBuilder.build (cyclomatic 16) sail_ui/lib/widgets/homepage/homepage_builder.dart:16 — HomepageBuilder.build 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 · Server.CreateDenial (cyclomatic 16) · ×1
  • Server.CreateDenial (cyclomatic 16) bitwindow/server/api/bitwindowd/bitwindowd.go:243 — Server.CreateDenial 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 · Server.CreateSidechainDeposit (cyclomatic 16) · ×1
  • Server.CreateSidechainDeposit (cyclomatic 16) bitwindow/server/api/wallet/wallet.go:555 — Server.CreateSidechainDeposit 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 · Handler.depositPendingSats (cyclomatic 16) · ×1
  • Handler.depositPendingSats (cyclomatic 16) sidechain-orchestrator/api/deposit_balance.go:20 — Handler.depositPendingSats 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 · orchestrator.New (cyclomatic 16) · ×1
  • orchestrator.New (cyclomatic 16) REDACTED:358 — orchestrator.New has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 406, 440, 392, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · orchestrator.alignWalletState (cyclomatic 16) · ×1
  • orchestrator.alignWalletState (cyclomatic 16) sidechain-orchestrator/sidechain_wallet_state.go:133 — orchestrator.alignWalletState 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 · blockfile.preflight (cyclomatic 16) · ×1
  • blockfile.preflight (cyclomatic 16) sidechain-orchestrator/blockfile/convert.go:261 — blockfile.preflight 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 · blockfile.convertFile (cyclomatic 16) · ×1
  • blockfile.convertFile (cyclomatic 16) sidechain-orchestrator/blockfile/convert.go:481 — blockfile.convertFile 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 · commands.printStratumStatus (cyclomatic 16) · ×1
  • commands.printStratumStatus (cyclomatic 16) sidechain-orchestrator/commands/mining.go:237 — commands.printStratumStatus 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 · corewalletfile.makeJournal (cyclomatic 16) · ×1
  • corewalletfile.makeJournal (cyclomatic 16) sidechain-orchestrator/corewalletfile/convert.go:576 — corewalletfile.makeJournal 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 · DownloadManager.downloadFile (cyclomatic 16) · ×1
  • DownloadManager.downloadFile (cyclomatic 16) REDACTED:537 — DownloadManager.downloadFile 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 · BIP47Engine.scanWallet (cyclomatic 16) · ×1
  • BIP47Engine.scanWallet (cyclomatic 16) sidechain-orchestrator/engines/bip47_engine.go:170 — BIP47Engine.scanWallet 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 · SplitEngine.tick (cyclomatic 16) · ×1
  • SplitEngine.tick (cyclomatic 16) sidechain-orchestrator/engines/split_engine.go:117 — SplitEngine.tick 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 · Orchestrator.checkECashMigrationStart (cyclomatic 16) · ×1
  • Orchestrator.checkECashMigrationStart (cyclomatic 16) sidechain-orchestrator/ecash_migration.go:236 — Orchestrator.checkECashMigrationStart 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 · Orchestrator.startMigrationCore (cyclomatic 16) · ×1
  • Orchestrator.startMigrationCore (cyclomatic 16) sidechain-orchestrator/ecash_migration.go:831 — Orchestrator.startMigrationCore 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 · Orchestrator.ConfirmPendingECashNetwork (cyclomatic 16) · ×1
  • Orchestrator.ConfirmPendingECashNetwork (cyclomatic 16) sidechain-orchestrator/network_catalog.go:104 — Orchestrator.ConfirmPendingECashNetwork 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 · testharness.newNode (cyclomatic 16) · ×1
  • testharness.newNode (cyclomatic 16) sidechain-orchestrator/testharness/node.go:88 — testharness.newNode has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 4 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 · wallet.decodePSBT (cyclomatic 16) · ×1
  • wallet.decodePSBT (cyclomatic 16) sidechain-orchestrator/wallet/decode.go:173 — wallet.decodePSBT 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 · wallet.MultisigPsbtSigningStatus (cyclomatic 16) · ×1
  • wallet.MultisigPsbtSigningStatus (cyclomatic 16) sidechain-orchestrator/wallet/multisiglounge.go:460 — wallet.MultisigPsbtSigningStatus 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 · wallet.partialSigHash (cyclomatic 16) · ×1
  • wallet.partialSigHash (cyclomatic 16) sidechain-orchestrator/wallet/psbt.go:930 — wallet.partialSigHash 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 · ElectrumBackend.applySpend (cyclomatic 16) · ×1
  • ElectrumBackend.applySpend (cyclomatic 16) sidechain-orchestrator/wallet/electrum_backend.go:916 — ElectrumBackend.applySpend 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.
D17 · Explicit Debt · TodoComment · ×1
  • TodoComment bitwindow/server/models/m4/parser.go:90 — // TODO: Implement version 0x03 logic when we have SCDB state — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · main.run (cognitive 110) · ×1
  • main.run (cognitive 110) sidechain-orchestrator/cmd/drivechaind/main.go:154 — main.run has cognitive complexity 110 (threshold 15). Drivers by points: if/else 61 (89 pts), boolean chains 11, loops 5 (7 pts), match/switch 2 (3 pts) (nesting depth added 31). Of this number, 57 points are the body's own statements and 53 belong to 16 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 · _DeniabilityTableState.sortEntries (cognitive 78) · ×1
  • _DeniabilityTableState.sortEntries (cognitive 78) bitwindow/lib/pages/wallet/denability_page.dart:375 — _DeniabilityTableState.sortEntries has cognitive complexity 78 (threshold 15). Drivers by points: ternaries 20 (48 pts), if/else 13 (25 pts), boolean chains 4, match/switch 1 (nesting depth added 40). 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 · commands.runWalletBurnECX (cognitive 78) · ×1
  • commands.runWalletBurnECX (cognitive 78) sidechain-orchestrator/commands/wallet_burn_ecx.go:137 — commands.runWalletBurnECX has cognitive complexity 78 (threshold 15). Drivers by points: if/else 52 (69 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 18). 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 · Orchestrator.SetNodeMode (cognitive 77) · ×1
  • Orchestrator.SetNodeMode (cognitive 77) sidechain-orchestrator/node_mode.go:98 — Orchestrator.SetNodeMode has cognitive complexity 77 (threshold 15). Drivers by points: if/else 27 (53 pts), loops 8 (13 pts), boolean chains 11 (nesting depth added 31). Of this number, 72 points are the body's own statements and 5 belong 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 · multisig.importGroupsJSON (cognitive 72) · ×1
  • multisig.importGroupsJSON (cognitive 72) bitwindow/server/models/multisig/multisig.go:654 — multisig.importGroupsJSON has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (56 pts), loops 6 (16 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.combinePSBT (cognitive 71) · ×1
  • wallet.combinePSBT (cognitive 71) sidechain-orchestrator/wallet/psbt.go:1061 — wallet.combinePSBT has cognitive complexity 71 (threshold 15). Drivers by points: if/else 17 (53 pts), loops 6 (16 pts), boolean chains 2 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.buildPSBT (cognitive 68) · ×1
  • wallet.buildPSBT (cognitive 68) sidechain-orchestrator/wallet/psbt.go:107 — wallet.buildPSBT has cognitive complexity 68 (threshold 15). Drivers by points: if/else 27 (64 pts), loops 4 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ImportPSBTModalState._importPSBT (cognitive 63) · ×1
  • _ImportPSBTModalState._importPSBT (cognitive 63) bitwindow/lib/widgets/import_psbt_modal.dart:166 — _ImportPSBTModalState._importPSBT has cognitive complexity 63 (threshold 15). Drivers by points: if/else 20 (45 pts), loops 2 (6 pts), ternaries 2 (6 pts), boolean chains 5, error handling 1 (nesting depth added 33). 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 · ElectrumBackend.buildSendPSBT (cognitive 62) · ×1
  • ElectrumBackend.buildSendPSBT (cognitive 62) sidechain-orchestrator/wallet/electrum_backend.go:1061 — ElectrumBackend.buildSendPSBT has cognitive complexity 62 (threshold 15). Drivers by points: if/else 32 (47 pts), boolean chains 8, loops 7 (nesting depth added 15). Of this number, 53 points are the body's own statements and 9 belong to 2 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 · multisig.importTransactionsJSON (cognitive 61) · ×1
  • multisig.importTransactionsJSON (cognitive 61) bitwindow/server/models/multisig/multisig.go:815 — multisig.importTransactionsJSON has cognitive complexity 61 (threshold 15). Drivers by points: if/else 20 (54 pts), loops 3 (7 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.applyPendingM4 (cognitive 60) · ×1
  • Parser.applyPendingM4 (cognitive 60) bitwindow/server/engines/bitcoind_engine.go:573 — Parser.applyPendingM4 has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (48 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProcessManager.StartWithOptions (cognitive 60) · ×1
  • ProcessManager.StartWithOptions (cognitive 60) sidechain-orchestrator/process.go:325 — ProcessManager.StartWithOptions has cognitive complexity 60 (threshold 15). Drivers by points: if/else 32 (49 pts), loops 4 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 20). Of this number, 28 points are the body's own statements and 32 belong to 3 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 · commands.runECashMigrate (cognitive 57) · ×1
  • commands.runECashMigrate (cognitive 57) sidechain-orchestrator/commands/ecash.go:54 — commands.runECashMigrate has cognitive complexity 57 (threshold 15). Drivers by points: if/else 26 (48 pts), boolean chains 6, match/switch 1 (2 pts), loops 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 · commands.runWalletSignPSBT (cognitive 57) · ×1
  • commands.runWalletSignPSBT (cognitive 57) sidechain-orchestrator/commands/wallet_sign_psbt.go:32 — commands.runWalletSignPSBT has cognitive complexity 57 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 9, 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 · commands.runStart (cognitive 56) · ×1
  • commands.runStart (cognitive 56) REDACTED:196 — commands.runStart has cognitive complexity 56 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 20). Of this number, 49 points are the body's own statements and 7 belong 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 · MultisigLoungeViewModel._validateAndFixWalletFlags (cognitive 55) · ×1
  • MultisigLoungeViewModel._validateAndFixWalletFlags (cognitive 55) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1092 — MultisigLoungeViewModel._validateAndFixWalletFlags has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (41 pts), loops 3 (8 pts), error handling 2 (6 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ECashMigrationDialogState.build (cognitive 55) · ×1
  • _ECashMigrationDialogState.build (cognitive 55) bitwindow/lib/widgets/ecash_migration_dialog.dart:435 — _ECashMigrationDialogState.build has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (37 pts), ternaries 8 (14 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.startTargetOnly (cognitive 54) · ×1
  • Orchestrator.startTargetOnly (cognitive 54) REDACTED:2045 — Orchestrator.startTargetOnly has cognitive complexity 54 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 5, loops 2, match/switch 1 (2 pts) (nesting depth added 21). Of this number, 52 points are the body's own statements and 2 belong 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 · Orchestrator.startEnforcerWhenReady (cognitive 53) · ×1
  • Orchestrator.startEnforcerWhenReady (cognitive 53) REDACTED:1847 — Orchestrator.startEnforcerWhenReady has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (43 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (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 · Orchestrator.rewindMigration (cognitive 51) · ×1
  • Orchestrator.rewindMigration (cognitive 51) sidechain-orchestrator/ecash_migration.go:976 — Orchestrator.rewindMigration has cognitive complexity 51 (threshold 15). Drivers by points: if/else 29 (46 pts), loops 3, boolean chains 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 · CreateMultisigModal.build (cognitive 49) · ×1
  • CreateMultisigModal.build (cognitive 49) bitwindow/lib/widgets/create_multisig_modal.dart:113 — CreateMultisigModal.build has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 10 (25 pts), if/else 15 (23 pts), boolean chains 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 · NotificationEngine.processWalletTransactions (cognitive 49) · ×1
  • NotificationEngine.processWalletTransactions (cognitive 49) bitwindow/server/engines/notification_engine.go:285 — NotificationEngine.processWalletTransactions has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (40 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · blockfile.scanFile (cognitive 49) · ×1
  • blockfile.scanFile (cognitive 49) sidechain-orchestrator/blockfile/convert.go:316 — blockfile.scanFile has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (38 pts), match/switch 2 (6 pts), boolean chains 4, loops 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 · _ButtonContent.build (cognitive 48) · ×1
  • _ButtonContent.build (cognitive 48) sail_ui/lib/widgets/buttons/button.dart:203 — _ButtonContent.build has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 8 (20 pts), boolean chains 6 (nesting depth added 23). 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 · _SailDropdownButtonState.build (cognitive 47) · ×1
  • _SailDropdownButtonState.build (cognitive 47) sail_ui/lib/widgets/inputs/dropdown_menu.dart:64 — _SailDropdownButtonState.build has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 14 (27 pts), if/else 15 (18 pts), boolean chains 2 (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 · SyncProvider._fetch (cognitive 46) · ×1
  • SyncProvider._fetch (cognitive 46) sidechain_core/lib/providers/sync_provider.dart:319 — SyncProvider._fetch has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 7, loops 2 (5 pts), 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 · DeniabilityEngine.CleanupDenials (cognitive 46) · ×1
  • DeniabilityEngine.CleanupDenials (cognitive 46) REDACTED:114 — DeniabilityEngine.CleanupDenials has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 4, loops 2 (nesting depth added 22). Of this number, 43 points are the body's own statements and 3 belong to 3 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 · FundGroupModalViewModel._generateMultisigAddress (cognitive 45) · ×1
  • FundGroupModalViewModel._generateMultisigAddress (cognitive 45) bitwindow/lib/widgets/fund_group_modal.dart:164 — FundGroupModalViewModel._generateMultisigAddress has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 11, ternaries 2 (4 pts), loops 1 (3 pts), error handling 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 · Parser.handleBlockTick (cognitive 45) · ×1
  • Parser.handleBlockTick (cognitive 45) bitwindow/server/engines/bitcoind_engine.go:293 — Parser.handleBlockTick has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 3 (6 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 20). Of this number, 32 points are the body's own statements and 13 belong 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 · DownloadManager.extractZipPreservingTree (cognitive 45) · ×1
  • DownloadManager.extractZipPreservingTree (cognitive 45) REDACTED:672 — DownloadManager.extractZipPreservingTree has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 2, loops 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 · nodeHistory.History (cognitive 44) · ×1
  • nodeHistory.History (cognitive 44) sidechain-orchestrator/sidechain/thunder/history.go:190 — nodeHistory.History has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 9 (12 pts), boolean chains 4 (nesting depth added 16). Of this number, 41 points are the body's own statements and 3 belong 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 · ECashUpgradeWatcher._check (cognitive 43) · ×1
  • ECashUpgradeWatcher._check (cognitive 43) bitwindow/lib/widgets/ecash_upgrade_banner.dart:124 — ECashUpgradeWatcher._check has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 10, if/else 8 (10 pts), loops 4 (7 pts), error handling 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.StartWithL1 (cognitive 43) · ×1
  • Orchestrator.StartWithL1 (cognitive 43) REDACTED:958 — Orchestrator.StartWithL1 has cognitive complexity 43 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 4 (nesting depth added 15). Most of this is not in the body itself: 5 of the 43 points are its own statements and the rest belongs to one function literal inside it that branches (line 984). 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 · _ImportPSBTModalState.build (cognitive 41) · ×1
  • _ImportPSBTModalState.build (cognitive 41) bitwindow/lib/widgets/import_psbt_modal.dart:363 — _ImportPSBTModalState.build has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 10 (22 pts), if/else 9 (18 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SailCard._build (cognitive 41) · ×1
  • SailCard._build (cognitive 41) sail_ui/lib/widgets/containers/sail_card.dart:79 — SailCard._build has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 10, ternaries 8 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionMonitor.testConnection (cognitive 41) · ×1
  • ConnectionMonitor.testConnection (cognitive 41) sidechain-orchestrator/connection_monitor.go:339 — ConnectionMonitor.testConnection has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 1 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 22). 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 · corewalletfile.discover (cognitive 41) · ×1
  • corewalletfile.discover (cognitive 41) sidechain-orchestrator/corewalletfile/convert.go:259 — corewalletfile.discover has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 2, loops 2 (nesting depth added 15). Most of this is not in the body itself: 11 of the 41 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 276, 261). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DownloadManager.DownloadWithOptions (cognitive 41) · ×1
  • DownloadManager.DownloadWithOptions (cognitive 41) REDACTED:149 — DownloadManager.DownloadWithOptions has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 4 (6 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 17). Of this number, 16 points are the body's own statements and 25 belong 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 · Orchestrator.ApplyECashSwitch (cognitive 41) · ×1
  • Orchestrator.ApplyECashSwitch (cognitive 41) sidechain-orchestrator/ecash_switch.go:291 — Orchestrator.ApplyECashSwitch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 3, match/switch 2 (3 pts), loops 2 (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 · TransactionProvider.fetch (cognitive 40) · ×1
  • TransactionProvider.fetch (cognitive 40) bitwindow/lib/providers/transactions_provider.dart:134 — TransactionProvider.fetch has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 8 (16 pts), boolean chains 2, error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.listTransactions (cognitive 40) · ×1
  • Server.listTransactions (cognitive 40) bitwindow/server/api/wallet/wallet.go:353 — Server.listTransactions has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (35 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.checkMigration (cognitive 40) · ×1
  • Orchestrator.checkMigration (cognitive 40) sidechain-orchestrator/ecash_migration.go:1288 — Orchestrator.checkMigration has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (35 pts), loops 2 (5 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 · Orchestrator.GetSyncStatus (cognitive 40) · ×1
  • Orchestrator.GetSyncStatus (cognitive 40) REDACTED:3763 — Orchestrator.GetSyncStatus has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 6, loops 4 (nesting depth added 10). Of this number, 17 points are the body's own statements and 23 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 · ChatProvider._processPaymailEntry (cognitive 39) · ×1
  • ChatProvider._processPaymailEntry (cognitive 39) bitwindow/lib/providers/chat_provider.dart:700 — ChatProvider._processPaymailEntry has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 8, ternaries 2 (3 pts), error handling 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 · ChatProvider.sendMessage (cognitive 39) · ×1
  • ChatProvider.sendMessage (cognitive 39) bitwindow/lib/providers/chat_provider.dart:825 — ChatProvider.sendMessage has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (34 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChequeEngine.recoverChequesOnUnlock (cognitive 39) · ×1
  • ChequeEngine.recoverChequesOnUnlock (cognitive 39) REDACTED:409 — ChequeEngine.recoverChequesOnUnlock has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (7 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultisigLoungeHandler.ensureWatchWallet (cognitive 38) · ×1
  • MultisigLoungeHandler.ensureWatchWallet (cognitive 38) sidechain-orchestrator/api/multisiglounge_handler.go:535 — MultisigLoungeHandler.ensureWatchWallet has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 5, loops 4 (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 · Orchestrator.DeleteFiles (cognitive 38) · ×1
  • Orchestrator.DeleteFiles (cognitive 38) sidechain-orchestrator/reset.go:257 — Orchestrator.DeleteFiles has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (32 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 16). Of this number, 17 points are the body's own statements and 21 belong 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 · ElectrumBackend.DetectScriptKind (cognitive 38) · ×1
  • ElectrumBackend.DetectScriptKind (cognitive 38) sidechain-orchestrator/wallet/detect_script_kind.go:45 — ElectrumBackend.DetectScriptKind has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 5 (8 pts), boolean chains 3 (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 · Server.ImportLabels (cognitive 37) · ×1
  • Server.ImportLabels (cognitive 37) bitwindow/server/api/bitwindowd/bitwindowd.go:669 — Server.ImportLabels has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SidechainsViewModel.sidechainWidget (cognitive 36) · ×1
  • SidechainsViewModel.sidechainWidget (cognitive 36) bitwindow/lib/pages/sidechains_page.dart:1446 — SidechainsViewModel.sidechainWidget has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 11 (15 pts), boolean chains 3 (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 · MempoolProvider.fetch (cognitive 36) · ×1
  • MempoolProvider.fetch (cognitive 36) bitwindow/lib/providers/mempool_provider.dart:117 — MempoolProvider.fetch has cognitive complexity 36 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (9 pts), ternaries 3 (9 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomepageBuilder.build (cognitive 36) · ×1
  • HomepageBuilder.build (cognitive 36) sail_ui/lib/widgets/homepage/homepage_builder.dart:16 — HomepageBuilder.build has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (27 pts), ternaries 3 (7 pts), boolean chains 1, 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 · _ResetConfirmationPageState._startDeletion (cognitive 36) · ×1
  • _ResetConfirmationPageState._startDeletion (cognitive 36) sail_ui/lib/widgets/reset/reset_confirmation_page.dart:85 — _ResetConfirmationPageState._startDeletion has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 4 (8 pts), ternaries 1 (4 pts), boolean chains 2, error handling 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 · BackupEngine.exportMultisigJSON (cognitive 36) · ×1
  • BackupEngine.exportMultisigJSON (cognitive 36) bitwindow/server/engines/backup_engine.go:402 — BackupEngine.exportMultisigJSON has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 5 (9 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · engines.ParseBitcoinURI (cognitive 36) · ×1
  • engines.ParseBitcoinURI (cognitive 36) bitwindow/server/engines/utils_engine.go:31 — engines.ParseBitcoinURI has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (6 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · M4Engine.ApplyPendingM4 (cognitive 36) · ×1
  • M4Engine.ApplyPendingM4 (cognitive 36) bitwindow/server/engines/m4_engine.go:104 — M4Engine.ApplyPendingM4 has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 2, boolean chains 1 (nesting depth added 17). Of this number, 32 points are the body's own statements and 4 belong 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 · api.nodeOverview (cognitive 36) · ×1
  • api.nodeOverview (cognitive 36) sidechain-orchestrator/api/explorer_handler.go:225 — api.nodeOverview has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 4 (7 pts), boolean chains 4 (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 · Orchestrator.GatherFilesToDelete (cognitive 36) · ×1
  • Orchestrator.GatherFilesToDelete (cognitive 36) sidechain-orchestrator/reset.go:173 — Orchestrator.GatherFilesToDelete has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 20). Of this number, 27 points are the body's own statements and 9 belong 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 · MempoolWatcher.watch (cognitive 35) · ×1
  • MempoolWatcher.watch (cognitive 35) bitwindow/server/engines/mempool_watch_engine.go:191 — MempoolWatcher.watch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 2, 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 · TimestampEngine.checkConfirmations (cognitive 35) · ×1
  • TimestampEngine.checkConfirmations (cognitive 35) bitwindow/server/engines/timestamp_engine.go:106 — TimestampEngine.checkConfirmations has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 1, loops 1 (nesting depth added 19). 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 · config.ParseBitcoinConfig (cognitive 35) · ×1
  • config.ParseBitcoinConfig (cognitive 35) sidechain-orchestrator/config/bitcoin_config.go:66 — config.ParseBitcoinConfig has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 4, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnforcerConfManager.GetCliArgs (cognitive 35) · ×1
  • EnforcerConfManager.GetCliArgs (cognitive 35) sidechain-orchestrator/config/enforcer_conf.go:287 — EnforcerConfManager.GetCliArgs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadManager.downloadFile (cognitive 35) · ×1
  • DownloadManager.downloadFile (cognitive 35) REDACTED:537 — DownloadManager.downloadFile has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoreBackend.PreviewSend (cognitive 35) · ×1
  • CoreBackend.PreviewSend (cognitive 35) sidechain-orchestrator/wallet/send_preview.go:65 — CoreBackend.PreviewSend has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21 (30 pts), loops 3, boolean chains 2 (nesting depth added 9). Of this number, 32 points are the body's own statements and 3 belong 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 · _TransactionFlowDiagramState._handleHover (cognitive 34) · ×1
  • _TransactionFlowDiagramState._handleHover (cognitive 34) bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:202 — _TransactionFlowDiagramState._handleHover has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 13, loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultisigLoungeHandler.RestoreHistory (cognitive 34) · ×1
  • MultisigLoungeHandler.RestoreHistory (cognitive 34) sidechain-orchestrator/api/multisiglounge_handler.go:718 — MultisigLoungeHandler.RestoreHistory has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 4 (7 pts), boolean chains 4 (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 · burnWalletState.check (cognitive 34) · ×1
  • burnWalletState.check (cognitive 34) sidechain-orchestrator/commands/wallet_burn_ecx.go:66 — burnWalletState.check has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 6, loops 2, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElectrumBackend.scan (cognitive 34) · ×1
  • ElectrumBackend.scan (cognitive 34) sidechain-orchestrator/wallet/electrum_backend.go:2511 — ElectrumBackend.scan has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (29 pts), loops 3 (4 pts), boolean chains 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 · EsploraClient.doWith (cognitive 34) · ×1
  • EsploraClient.doWith (cognitive 34) sidechain-orchestrator/wallet/esplora.go:286 — EsploraClient.doWith has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 2, 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 · _SidechainRPCMethodsTabState._parseJsonArray (cognitive 33) · ×1
  • _SidechainRPCMethodsTabState._parseJsonArray (cognitive 33) sail_ui/lib/widgets/debug/sidechain_debug_window.dart:782 — _SidechainRPCMethodsTabState._parseJsonArray has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 2, 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 · BottomNav.displayConnectionStatusDialog (cognitive 33) · ×1
  • BottomNav.displayConnectionStatusDialog (cognitive 33) sail_ui/lib/widgets/nav/bottom_nav.dart:232 — BottomNav.displayConnectionStatusDialog has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 15, ternaries 5 (10 pts), if/else 7 (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 · StratumHandler.SetMiningSettings (cognitive 33) · ×1
  • StratumHandler.SetMiningSettings (cognitive 33) sidechain-orchestrator/api/stratum_handler.go:800 — StratumHandler.SetMiningSettings has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _RootPageState.build (cognitive 32) · ×1
  • _RootPageState.build (cognitive 32) bitwindow/lib/pages/root_page.dart:444 — _RootPageState.build has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (18 pts), error handling 4 (6 pts), loops 3, ternaries 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _NetworkSwapPageState.build (cognitive 32) · ×1
  • _NetworkSwapPageState.build (cognitive 32) bitwindow/lib/pages/settings/network_swap_page.dart:98 — _NetworkSwapPageState.build has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 9, ternaries 7 (8 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _UTXOSnapshotPageState.build (cognitive 32) · ×1
  • _UTXOSnapshotPageState.build (cognitive 32) sail_ui/lib/pages/utxo_snapshot_page.dart:87 — _UTXOSnapshotPageState.build has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 13, if/else 10 (12 pts), ternaries 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BottomNavViewModel._connectionStatusRaw (cognitive 32) · ×1
  • BottomNavViewModel._connectionStatusRaw (cognitive 32) sail_ui/lib/widgets/nav/bottom_nav.dart:628 — BottomNavViewModel._connectionStatusRaw has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 5 (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 · Server.GetTransactionDetails (cognitive 32) · ×1
  • Server.GetTransactionDetails (cognitive 32) bitwindow/server/api/wallet/wallet.go:1424 — Server.GetTransactionDetails has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.handleOpReturns (cognitive 32) · ×1
  • Parser.handleOpReturns (cognitive 32) bitwindow/server/engines/bitcoind_engine.go:940 — Parser.handleOpReturns has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, match/switch 1 (3 pts), loops 2 (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 · Handler.StartWithL1 (cognitive 32) · ×1
  • Handler.StartWithL1 (cognitive 32) sidechain-orchestrator/api/orchestrator_handler.go:285 — Handler.StartWithL1 has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 20). Of this number, 31 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 · Orchestrator.SwapNetwork (cognitive 32) · ×1
  • Orchestrator.SwapNetwork (cognitive 32) REDACTED:2776 — Orchestrator.SwapNetwork has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 2, loops 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 · NetworkChainSource.current (cognitive 32) · ×1
  • NetworkChainSource.current (cognitive 32) sidechain-orchestrator/wallet/network_chain_source.go:76 — NetworkChainSource.current has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 2, loops 1 (nesting depth added 15). 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 · Binary._getPossibleBinaryPaths (cognitive 31) · ×1
  • Binary._getPossibleBinaryPaths (cognitive 31) sidechain_core/lib/config/binaries.dart:203 — Binary._getPossibleBinaryPaths has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultisigLoungeViewModel.signTransaction (cognitive 31) · ×1
  • MultisigLoungeViewModel.signTransaction (cognitive 31) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1611 — MultisigLoungeViewModel.signTransaction has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, ternaries 1 (4 pts), loops 1 (2 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConsolidationProvider.start (cognitive 31) · ×1
  • ConsolidationProvider.start (cognitive 31) bitwindow/lib/providers/consolidation_provider.dart:155 — ConsolidationProvider.start has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (7 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowProvider.open (cognitive 31) · ×1
  • WindowProvider.open (cognitive 31) sidechain_core/lib/providers/window_provider.dart:116 — WindowProvider.open has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 4, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SailTableState.build (cognitive 31) · ×1
  • _SailTableState.build (cognitive 31) sail_ui/lib/widgets/components/table.dart:206 — _SailTableState.build has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 9 (11 pts), boolean chains 7, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FileInputState._selectPath (cognitive 31) · ×1
  • _FileInputState._selectPath (cognitive 31) sail_ui/lib/widgets/config_editor/configurator_panel.dart:670 — _FileInputState._selectPath has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 3 (9 pts), error handling 2 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeniabilityEngine.hopOutputsInHistory (cognitive 31) · ×1
  • DeniabilityEngine.hopOutputsInHistory (cognitive 31) REDACTED:501 — DeniabilityEngine.hopOutputsInHistory has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 14). Of this number, 30 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 · BmmEngine.tick (cognitive 31) · ×1
  • BmmEngine.tick (cognitive 31) sidechain-orchestrator/engines/bmm_engine.go:604 — BmmEngine.tick has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 4, boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElectrumBackend.addOwnOutputs (cognitive 31) · ×1
  • ElectrumBackend.addOwnOutputs (cognitive 31) sidechain-orchestrator/wallet/electrum_own_outputs.go:168 — ElectrumBackend.addOwnOutputs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 2 (3 pts) (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 · page.Home (cognitive 31) · ×1
  • page.Home (cognitive 31) dc-hub/app/page.tsx:24 — page.Home has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 11, error handling 4, if/else 4 (nesting depth added 6). Of this number, 16 points are the body's own statements and 15 belong to 7 function items 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 · _L1RestartPageState.build (cognitive 30) · ×1
  • _L1RestartPageState.build (cognitive 30) sail_ui/lib/pages/l1_restart_page.dart:65 — _L1RestartPageState.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 9, ternaries 6 (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 · DaemonConnectionCard._buildCard (cognitive 30) · ×1
  • DaemonConnectionCard._buildCard (cognitive 30) sail_ui/lib/widgets/components/daemon_connection_card.dart:80 — DaemonConnectionCard._buildCard has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 8 (9 pts), boolean chains 6, error handling 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 · _SailCheckboxState.build (cognitive 30) · ×1
  • _SailCheckboxState.build (cognitive 30) sail_ui/lib/widgets/inputs/checkbox.dart:29 — _SailCheckboxState.build has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 8 (12 pts), boolean chains 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 · Server.ListRecentTransactions (cognitive 30) · ×1
  • Server.ListRecentTransactions (cognitive 30) bitwindow/server/api/bitwindowd/bitwindowd.go:908 — Server.ListRecentTransactions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 3 (4 pts), boolean chains 2, jumps 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 · BMMHandler.readWalletCoins (cognitive 30) · ×1
  • BMMHandler.readWalletCoins (cognitive 30) sidechain-orchestrator/api/bmm_handler.go:939 — BMMHandler.readWalletCoins has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (29 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 · Orchestrator.ReloadSidechainWallets (cognitive 30) · ×1
  • Orchestrator.ReloadSidechainWallets (cognitive 30) sidechain-orchestrator/sidechain_wallet_state.go:323 — Orchestrator.ReloadSidechainWallets has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 13). Of this number, 25 points are the body's own statements and 5 belong 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 · ElectrumBackend.ListReceivedByAddress (cognitive 30) · ×1
  • ElectrumBackend.ListReceivedByAddress (cognitive 30) sidechain-orchestrator/wallet/electrum_backend.go:457 — ElectrumBackend.ListReceivedByAddress has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (4 pts), boolean chains 3 (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 · SendPageViewModel.onUseAvailableBalance (cognitive 29) · ×1
  • SendPageViewModel.onUseAvailableBalance (cognitive 29) bitwindow/lib/pages/wallet/wallet_send.dart:1135 — SendPageViewModel.onUseAvailableBalance has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _NotificationBannerState._openPendingModal (cognitive 29) · ×1
  • _NotificationBannerState._openPendingModal (cognitive 29) sail_ui/lib/widgets/containers/notification_banner.dart:71 — _NotificationBannerState._openPendingModal has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupEngine.RestoreBackup (cognitive 29) · ×1
  • BackupEngine.RestoreBackup (cognitive 29) bitwindow/server/engines/backup_engine.go:187 — BackupEngine.RestoreBackup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 3, 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 · cheques.ImportBackupTx (cognitive 29) · ×1
  • cheques.ImportBackupTx (cognitive 29) bitwindow/server/models/cheques/backup.go:70 — cheques.ImportBackupTx has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitcoinConfig.Serialize (cognitive 29) · ×1
  • BitcoinConfig.Serialize (cognitive 29) sidechain-orchestrator/config/bitcoin_config.go:160 — BitcoinConfig.Serialize has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 7 (13 pts), boolean chains 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · BIP47Engine.scanWallet (cognitive 29) · ×1
  • BIP47Engine.scanWallet (cognitive 29) sidechain-orchestrator/engines/bip47_engine.go:170 — BIP47Engine.scanWallet has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.RestartDaemon (cognitive 29) · ×1
  • Orchestrator.RestartDaemon (cognitive 29) REDACTED:1743 — Orchestrator.RestartDaemon has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 2, match/switch 1 (nesting depth added 11). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 1762). 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 · wallet.verifyTaprootSigs (cognitive 29) · ×1
  • wallet.verifyTaprootSigs (cognitive 29) sidechain-orchestrator/wallet/psbt.go:504 — wallet.verifyTaprootSigs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 2, 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 · _BumpFeeDialogState.build (cognitive 28) · ×1
  • _BumpFeeDialogState.build (cognitive 28) bitwindow/lib/pages/wallet/bump_fee_dialog.dart:207 — _BumpFeeDialogState.build has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 7, ternaries 5 (7 pts) (nesting depth added 2). 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 · _CashCheckPageState._cashCheck (cognitive 28) · ×1
  • _CashCheckPageState._cashCheck (cognitive 28) bitwindow/lib/pages/wallet/cash_check_page.dart:86 — _CashCheckPageState._cashCheck has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (27 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CheckDetailViewModel._sweepOnce (cognitive 28) · ×1
  • CheckDetailViewModel._sweepOnce (cognitive 28) bitwindow/lib/pages/wallet/check_detail_page.dart:132 — CheckDetailViewModel._sweepOnce has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 2, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CreateCheckPageState._createCheck (cognitive 28) · ×1
  • _CreateCheckPageState._createCheck (cognitive 28) bitwindow/lib/pages/wallet/create_check_page.dart:82 — _CreateCheckPageState._createCheck has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 1, error handling 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 · ProofOfFundsViewModel.verifyProofOfFunds (cognitive 28) · ×1
  • ProofOfFundsViewModel.verifyProofOfFunds (cognitive 28) bitwindow/lib/widgets/proof_of_funds_modal.dart:829 — ProofOfFundsViewModel.verifyProofOfFunds has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SailTableState._autoSizeColumns (cognitive 28) · ×1
  • _SailTableState._autoSizeColumns (cognitive 28) sail_ui/lib/widgets/components/table.dart:389 — _SailTableState._autoSizeColumns has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 6 (10 pts), boolean chains 6 (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 · _SailSliderState.build (cognitive 28) · ×1
  • _SailSliderState.build (cognitive 28) sail_ui/lib/widgets/inputs/sail_slider.dart:112 — _SailSliderState.build has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 13 (19 pts), if/else 4, boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.MultisigPsbtSigningStatus (cognitive 28) · ×1
  • wallet.MultisigPsbtSigningStatus (cognitive 28) sidechain-orchestrator/wallet/multisiglounge.go:460 — wallet.MultisigPsbtSigningStatus has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 5 (8 pts), boolean chains 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 · _SettingsNetworkState.build (cognitive 27) · ×1
  • _SettingsNetworkState.build (cognitive 27) bitwindow/lib/pages/settings/settings_network.dart:343 — _SettingsNetworkState.build has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 7 (9 pts), boolean chains 3 (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 · _ReceiveAddressesTableState.sortedEntries (cognitive 27) · ×1
  • _ReceiveAddressesTableState.sortedEntries (cognitive 27) bitwindow/lib/pages/wallet/wallet_receive.dart:240 — _ReceiveAddressesTableState.sortedEntries has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (19 pts), if/else 4 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SailCreateWalletPageState._handleRestore (cognitive 27) · ×1
  • _SailCreateWalletPageState._handleRestore (cognitive 27) sail_ui/lib/pages/create_wallet_page.dart:725 — _SailCreateWalletPageState._handleRestore has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 3 (4 pts), ternaries 1 (2 pts), boolean chains 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 · BinaryProvider.update (cognitive 27) · ×1
  • BinaryProvider.update (cognitive 27) sidechain_core/lib/providers/binaries/binary_provider.dart:269 — BinaryProvider.update has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 3 (7 pts), boolean chains 3, loops 2 (3 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 · _SailRadioButtonState.build (cognitive 27) · ×1
  • _SailRadioButtonState.build (cognitive 27) sail_ui/lib/widgets/inputs/radio_button.dart:29 — _SailRadioButtonState.build has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 3 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupEngine.CreateBackup (cognitive 27) · ×1
  • BackupEngine.CreateBackup (cognitive 27) bitwindow/server/engines/backup_engine.go:55 — BackupEngine.CreateBackup has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Parser.handleTimestamp (cognitive 27) · ×1
  • Parser.handleTimestamp (cognitive 27) bitwindow/server/engines/bitcoind_engine.go:755 — Parser.handleTimestamp has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5, 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 · NotificationEngine.checkTimestampConfirmations (cognitive 27) · ×1
  • NotificationEngine.checkTimestampConfirmations (cognitive 27) bitwindow/server/engines/notification_engine.go:95 — NotificationEngine.checkTimestampConfirmations has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 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 · Builder.build (cognitive 27) · ×1
  • Builder.build (cognitive 27) difficulty/state.go:141 — Builder.build has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 5 (7 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 · WalletHandler.bip47NotificationCoin (cognitive 27) · ×1
  • WalletHandler.bip47NotificationCoin (cognitive 27) sidechain-orchestrator/api/bip47_send.go:210 — WalletHandler.bip47NotificationCoin has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 3, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · orchestrator.alignECashState (cognitive 27) · ×1
  • orchestrator.alignECashState (cognitive 27) sidechain-orchestrator/ecash_sidechain_state.go:65 — orchestrator.alignECashState has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 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 · blockfile.convertFile (cognitive 27) · ×1
  • blockfile.convertFile (cognitive 27) sidechain-orchestrator/blockfile/convert.go:481 — blockfile.convertFile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 2, boolean chains 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 · Orchestrator.StartECashMigration (cognitive 27) · ×1
  • Orchestrator.StartECashMigration (cognitive 27) sidechain-orchestrator/ecash_migration.go:480 — Orchestrator.StartECashMigration has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (23 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 · Orchestrator.applyDiskECashSwitch (cognitive 27) · ×1
  • Orchestrator.applyDiskECashSwitch (cognitive 27) sidechain-orchestrator/ecash_migration.go:1380 — Orchestrator.applyDiskECashSwitch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, 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 · Orchestrator.AdoptOrphans (cognitive 27) · ×1
  • Orchestrator.AdoptOrphans (cognitive 27) REDACTED:2604 — Orchestrator.AdoptOrphans has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 2, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.ValidateMultisigPsbt (cognitive 27) · ×1
  • wallet.ValidateMultisigPsbt (cognitive 27) sidechain-orchestrator/wallet/multisiglounge.go:247 — wallet.ValidateMultisigPsbt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 3 (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 · wallet.verifyInputOrigins (cognitive 27) · ×1
  • wallet.verifyInputOrigins (cognitive 27) sidechain-orchestrator/wallet/multisiglounge.go:679 — wallet.verifyInputOrigins has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 2 (3 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 · wallet.taprootMultisigStatus (cognitive 27) · ×1
  • wallet.taprootMultisigStatus (cognitive 27) REDACTED:344 — wallet.taprootMultisigStatus has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 5 (8 pts), boolean chains 2 (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 · Service.loadWalletFile (cognitive 27) · ×1
  • Service.loadWalletFile (cognitive 27) sidechain-orchestrator/wallet/service.go:1880 — Service.loadWalletFile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (26 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AssetAnalyticsProvider._fetchPools (cognitive 26) · ×1
  • AssetAnalyticsProvider._fetchPools (cognitive 26) bitassets/lib/providers/asset_analytics_provider.dart:224 — AssetAnalyticsProvider._fetchPools has cognitive complexity 26 (threshold 15). Drivers by points: if/else 2 (9 pts), error handling 3 (8 pts), loops 3 (7 pts), boolean chains 2 (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 · ImportTxidModalViewModel.importFromTxid (cognitive 26) · ×1
  • ImportTxidModalViewModel.importFromTxid (cognitive 26) bitwindow/lib/widgets/import_txid_modal.dart:170 — ImportTxidModalViewModel.importFromTxid has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 2 (3 pts), ternaries 1 (2 pts), boolean chains 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 · _VerifyReportTabState.build (cognitive 26) · ×1
  • _VerifyReportTabState.build (cognitive 26) bitwindow/lib/widgets/proof_of_funds_modal.dart:409 — _VerifyReportTabState.build has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (19 pts), if/else 5 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SailTableState.didUpdateWidget (cognitive 26) · ×1
  • _SailTableState.didUpdateWidget (cognitive 26) sail_ui/lib/widgets/components/table.dart:113 — _SailTableState.didUpdateWidget has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 5 (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 · ProgressBar.build (cognitive 26) · ×1
  • ProgressBar.build (cognitive 26) sail_ui/lib/widgets/loaders/progress.dart:25 — ProgressBar.build has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 16 (19 pts), if/else 4, boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · BackupEngine.exportTransactionsJSON (cognitive 26) · ×1
  • BackupEngine.exportTransactionsJSON (cognitive 26) bitwindow/server/engines/backup_engine.go:546 — BackupEngine.exportTransactionsJSON has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (9 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 · engines.FormatMerkleTree (cognitive 26) · ×1
  • engines.FormatMerkleTree (cognitive 26) bitwindow/server/engines/utils_engine.go:280 — engines.FormatMerkleTree has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (6 pts), boolean chains 2, match/switch 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 · BitcoinConfHandler.SetBitcoinConfigNetwork (cognitive 26) · ×1
  • BitcoinConfHandler.SetBitcoinConfigNetwork (cognitive 26) sidechain-orchestrator/api/bitcoin_conf_handler.go:144 — BitcoinConfHandler.SetBitcoinConfigNetwork has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · orchestrator.WatchConfigFile (cognitive 26) · ×1
  • orchestrator.WatchConfigFile (cognitive 26) sidechain-orchestrator/config_loader.go:167 — orchestrator.WatchConfigFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 180). 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 · wallet.verifyInputScript (cognitive 26) · ×1
  • wallet.verifyInputScript (cognitive 26) sidechain-orchestrator/wallet/multisiglounge.go:598 — wallet.verifyInputScript has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 3 (5 pts), boolean chains 2, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoreBackend.BumpFee (cognitive 26) · ×1
  • CoreBackend.BumpFee (cognitive 26) sidechain-orchestrator/wallet/core_backend.go:1416 — CoreBackend.BumpFee has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 2, loops 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 · ElectrumBackend.BumpFee (cognitive 26) · ×1
  • ElectrumBackend.BumpFee (cognitive 26) sidechain-orchestrator/wallet/electrum_backend.go:1778 — ElectrumBackend.BumpFee has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 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 · _TreeTab.build (cognitive 25) · ×1
  • _TreeTab.build (cognitive 25) bitwindow/lib/dialogs/merkle_tree_dialog.dart:248 — _TreeTab.build has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 4 (7 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 · MultisigLoungeViewModel._checkIfKeyBelongsToWallet (cognitive 25) · ×1
  • MultisigLoungeViewModel._checkIfKeyBelongsToWallet (cognitive 25) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1176 — MultisigLoungeViewModel._checkIfKeyBelongsToWallet has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 1 (2 pts), error handling 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · corewalletfile.convertWallet (cognitive 25) · ×1
  • corewalletfile.convertWallet (cognitive 25) sidechain-orchestrator/corewalletfile/convert.go:465 — corewalletfile.convertWallet has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (23 pts), loops 2 (nesting depth added 4). Of this number, 24 points are the body's own statements and 1 belongs 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 · Server.handle (cognitive 25) · ×1
  • Server.handle (cognitive 25) sidechain-orchestrator/stratum/server.go:476 — Server.handle has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 12). 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 · testharness.findBitcoind (cognitive 25) · ×1
  • testharness.findBitcoind (cognitive 25) sidechain-orchestrator/testharness/bitcoind.go:46 — testharness.findBitcoind has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElectrumBackend.deriveAddr (cognitive 25) · ×1
  • ElectrumBackend.deriveAddr (cognitive 25) sidechain-orchestrator/wallet/electrum_backend.go:2389 — ElectrumBackend.deriveAddr has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (4 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 · Service.DeleteAllWallets (cognitive 25) · ×1
  • Service.DeleteAllWallets (cognitive 25) sidechain-orchestrator/wallet/service.go:1610 — Service.DeleteAllWallets has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsResetState._executeReset (cognitive 24) · ×1
  • _SettingsResetState._executeReset (cognitive 24) bitwindow/lib/pages/settings/settings_reset.dart:170 — _SettingsResetState._executeReset has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DeniabilityTableState.build (cognitive 24) · ×1
  • _DeniabilityTableState.build (cognitive 24) bitwindow/lib/pages/wallet/denability_page.dart:163 — _DeniabilityTableState.build has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12 (16 pts), if/else 4 (6 pts), boolean chains 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 · PriceAlertProvider._checkAlerts (cognitive 24) · ×1
  • PriceAlertProvider._checkAlerts (cognitive 24) bitassets/lib/providers/price_alert_provider.dart:81 — PriceAlertProvider._checkAlerts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2, 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 · BalanceProvider.fetch (cognitive 24) · ×1
  • BalanceProvider.fetch (cognitive 24) sidechain_core/lib/providers/balance_provider.dart:119 — BalanceProvider.fetch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitnamesSecureStore._loadSecure (cognitive 24) · ×1
  • BitnamesSecureStore._loadSecure (cognitive 24) bitwindow/lib/services/bitnames_secure_store.dart:341 — BitnamesSecureStore._loadSecure has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 3 (4 pts), error handling 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChangeTrackingMixin._deepEquals (cognitive 24) · ×1
  • ChangeTrackingMixin._deepEquals (cognitive 24) sidechain_core/lib/utils/change_tracker.dart:79 — ChangeTrackingMixin._deepEquals has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, loops 2 (4 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 · _HardwareDevicePickerState._unlock (cognitive 24) · ×1
  • _HardwareDevicePickerState._unlock (cognitive 24) bitwindow/lib/widgets/hardware_device_picker.dart:211 — _HardwareDevicePickerState._unlock has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 3 (7 pts), boolean chains 1, 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 · ImportTxidModalViewModel._updateWalletKeyStates (cognitive 24) · ×1
  • ImportTxidModalViewModel._updateWalletKeyStates (cognitive 24) bitwindow/lib/widgets/import_txid_modal.dart:310 — ImportTxidModalViewModel._updateWalletKeyStates has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (15 pts), error handling 2 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ResetConfirmationPageState._buildContent (cognitive 24) · ×1
  • _ResetConfirmationPageState._buildContent (cognitive 24) sail_ui/lib/widgets/reset/reset_confirmation_page.dart:205 — _ResetConfirmationPageState._buildContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (9 pts), match/switch 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MempoolWatcher.handle (cognitive 24) · ×1
  • MempoolWatcher.handle (cognitive 24) bitwindow/server/engines/mempool_watch_engine.go:382 — MempoolWatcher.handle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · api.nodeTransaction (cognitive 24) · ×1
  • api.nodeTransaction (cognitive 24) sidechain-orchestrator/api/explorer_core.go:187 — api.nodeTransaction has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExplorerHandler.GetBlock (cognitive 24) · ×1
  • ExplorerHandler.GetBlock (cognitive 24) sidechain-orchestrator/api/explorer_handler.go:358 — ExplorerHandler.GetBlock has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (24 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 · orchestrator.followLogFile (cognitive 24) · ×1
  • orchestrator.followLogFile (cognitive 24) sidechain-orchestrator/logtail.go:77 — orchestrator.followLogFile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 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 · blockfile.preflight (cognitive 24) · ×1
  • blockfile.preflight (cognitive 24) sidechain-orchestrator/blockfile/convert.go:261 — blockfile.preflight has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · commands.printStratumStatus (cognitive 24) · ×1
  • commands.printStratumStatus (cognitive 24) sidechain-orchestrator/commands/mining.go:237 — commands.printStratumStatus has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 2 (4 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 · corewalletfile.makeJournal (cognitive 24) · ×1
  • corewalletfile.makeJournal (cognitive 24) sidechain-orchestrator/corewalletfile/convert.go:576 — corewalletfile.makeJournal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.stopMigrationNodes (cognitive 24) · ×1
  • Orchestrator.stopMigrationNodes (cognitive 24) sidechain-orchestrator/ecash_migration.go:762 — Orchestrator.stopMigrationNodes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (4 pts), boolean chains 3 (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 · ElectrumBackend.SignPSBTWithCosigner (cognitive 24) · ×1
  • ElectrumBackend.SignPSBTWithCosigner (cognitive 24) sidechain-orchestrator/wallet/electrum_backend.go:1346 — ElectrumBackend.SignPSBTWithCosigner has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitnamesViewModel._registerBitname (cognitive 23) · ×1
  • BitnamesViewModel._registerBitname (cognitive 23) bitnames/lib/pages/tabs/reserve_register_page.dart:785 — BitnamesViewModel._registerBitname has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 5 (7 pts), boolean chains 3, 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 · ChatPage.build (cognitive 23) · ×1
  • ChatPage.build (cognitive 23) bitwindow/lib/pages/chat_page.dart:17 — ChatPage.build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 9 (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 · _SidechainsTable.build (cognitive 23) · ×1
  • _SidechainsTable.build (cognitive 23) bitwindow/lib/pages/sidechains_page.dart:455 — _SidechainsTable.build has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9, if/else 7, boolean chains 5, match/switch 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _FileLogsTabState._readLastNLines (cognitive 23) · ×1
  • _FileLogsTabState._readLastNLines (cognitive 23) sail_ui/lib/pages/log_page.dart:177 — _FileLogsTabState._readLastNLines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), error handling 1 (3 pts), ternaries 1 (3 pts), boolean chains 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 · _HashCalculatorState._buildHashResults (cognitive 23) · ×1
  • _HashCalculatorState._buildHashResults (cognitive 23) bitwindow/lib/widgets/hash_calculator_modal.dart:385 — _HashCalculatorState._buildHashResults has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (23 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _TableRowState.build (cognitive 23) · ×1
  • _TableRowState.build (cognitive 23) sail_ui/lib/widgets/components/table.dart:677 — _TableRowState.build has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupEngine.validateZIP (cognitive 23) · ×1
  • BackupEngine.validateZIP (cognitive 23) bitwindow/server/engines/backup_engine.go:671 — BackupEngine.validateZIP has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.realMain (cognitive 23) · ×1
  • main.realMain (cognitive 23) REDACTED:72 — main.realMain has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (22 pts), match/switch 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 9 belong to 8 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 · BMMHandler.CreateBid (cognitive 23) · ×1
  • BMMHandler.CreateBid (cognitive 23) sidechain-orchestrator/api/bmm_handler.go:445 — BMMHandler.CreateBid has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BmmEngine.recordWinner (cognitive 23) · ×1
  • BmmEngine.recordWinner (cognitive 23) sidechain-orchestrator/engines/bmm_engine.go:1197 — BmmEngine.recordWinner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SplitEngine.tick (cognitive 23) · ×1
  • SplitEngine.tick (cognitive 23) sidechain-orchestrator/engines/split_engine.go:117 — SplitEngine.tick has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidechain.DeltaFor (cognitive 23) · ×1
  • sidechain.DeltaFor (cognitive 23) sidechain-orchestrator/sidechain/mempool.go:67 — sidechain.DeltaFor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.checkShareLocked (cognitive 23) · ×1
  • Server.checkShareLocked (cognitive 23) sidechain-orchestrator/stratum/server.go:784 — Server.checkShareLocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 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.
D2 · Cognitive Complexity · wallet.createAndImport (cognitive 23) · ×1
  • wallet.createAndImport (cognitive 23) sidechain-orchestrator/wallet/core_backend.go:2024 — wallet.createAndImport has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.parseColdcardConfig (cognitive 23) · ×1
  • wallet.parseColdcardConfig (cognitive 23) sidechain-orchestrator/wallet/multisig_config_import.go:56 — wallet.parseColdcardConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.SignTransactionLocal (cognitive 23) · ×1
  • wallet.SignTransactionLocal (cognitive 23) sidechain-orchestrator/wallet/signer.go:30 — wallet.SignTransactionLocal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoreBackend.Send (cognitive 23) · ×1
  • CoreBackend.Send (cognitive 23) sidechain-orchestrator/wallet/core_backend.go:832 — CoreBackend.Send has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 3 (5 pts), boolean chains 3 (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 · CoreBackend.CreatePSBT (cognitive 23) · ×1
  • CoreBackend.CreatePSBT (cognitive 23) sidechain-orchestrator/wallet/core_backend.go:1179 — CoreBackend.CreatePSBT has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CoreBackend.previewBumpFee (cognitive 23) · ×1
  • CoreBackend.previewBumpFee (cognitive 23) sidechain-orchestrator/wallet/core_backend.go:1289 — CoreBackend.previewBumpFee has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BitcoinConfig.parse (cognitive 22) · ×1
  • BitcoinConfig.parse (cognitive 22) sidechain_core/lib/models/bitcoin_config.dart:30 — BitcoinConfig.parse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SidechainsViewModel.rpcForSlot (cognitive 22) · ×1
  • SidechainsViewModel.rpcForSlot (cognitive 22) bitwindow/lib/pages/sidechains_page.dart:1331 — SidechainsViewModel.rpcForSlot has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FileLogsTabState._startTailing (cognitive 22) · ×1
  • _FileLogsTabState._startTailing (cognitive 22) sail_ui/lib/pages/log_page.dart:334 — _FileLogsTabState._startTailing has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PriceCardState.build (cognitive 22) · ×1
  • _PriceCardState.build (cognitive 22) truthcoin/lib/pages/market_detail_page.dart:1111 — _PriceCardState.build has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 11 (13 pts), if/else 5, boolean chains 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ProcessManager.start (cognitive 22) · ×1
  • ProcessManager.start (cognitive 22) sidechain_core/lib/providers/binaries/managers/process_manager.dart:141 — ProcessManager.start has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2, loops 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 · _ClaimEcashCardState._claim (cognitive 22) · ×1
  • _ClaimEcashCardState._claim (cognitive 22) bitwindow/lib/widgets/fork_mode_banner.dart:450 — _ClaimEcashCardState._claim has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TreeNode.fromPaths (cognitive 22) · ×1
  • TreeNode.fromPaths (cognitive 22) sail_ui/lib/widgets/reset/path_tree_view.dart:21 — TreeNode.fromPaths has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (5 pts), loops 2 (3 pts), boolean chains 2 (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 · Server.ListWithdrawals (cognitive 22) · ×1
  • Server.ListWithdrawals (cognitive 22) bitwindow/server/api/drivechain/drivechain.go:321 — Server.ListWithdrawals has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5 (nesting depth added 4). Of this number, 21 points are the body's own statements and 1 belongs 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, 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 · Parser.Run (cognitive 22) · ×1
  • Parser.Run (cognitive 22) bitwindow/server/engines/bitcoind_engine.go:83 — Parser.Run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (19 pts), match/switch 1 (2 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 · cheques.attachFundingOutputs (cognitive 22) · ×1
  • cheques.attachFundingOutputs (cognitive 22) bitwindow/server/models/cheques/cheques.go:198 — cheques.attachFundingOutputs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · opreturns.listCoinNewsNewFormat (cognitive 22) · ×1
  • opreturns.listCoinNewsNewFormat (cognitive 22) bitwindow/server/models/opreturns/opreturns.go:455 — opreturns.listCoinNewsNewFormat has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · orchestrator.New (cognitive 22) · ×1
  • orchestrator.New (cognitive 22) REDACTED:358 — orchestrator.New has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 5). Of this number, 13 points are the body's own statements and 9 belong to 4 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 · commands.binaryVersion (cognitive 22) · ×1
  • commands.binaryVersion (cognitive 22) REDACTED:744 — commands.binaryVersion has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BmmEngine.strandedBid (cognitive 22) · ×1
  • BmmEngine.strandedBid (cognitive 22) sidechain-orchestrator/engines/bmm_engine.go:793 — BmmEngine.strandedBid has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), boolean chains 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 · Orchestrator.StatusWithOptions (cognitive 22) · ×1
  • Orchestrator.StatusWithOptions (cognitive 22) REDACTED:758 — Orchestrator.StatusWithOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.serveConn (cognitive 22) · ×1
  • Server.serveConn (cognitive 22) sidechain-orchestrator/stratum/server.go:404 — Server.serveConn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2, boolean chains 1 (nesting depth added 8). Of this number, 15 points are the body's own statements and 7 belong to 2 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 · wallet.StrandedTxIDs (cognitive 22) · ×1
  • wallet.StrandedTxIDs (cognitive 22) sidechain-orchestrator/wallet/core_stranded.go:50 — wallet.StrandedTxIDs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 4 (5 pts) (nesting depth added 8). Of this number, 21 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 · wallet.partialSigHash (cognitive 22) · ×1
  • wallet.partialSigHash (cognitive 22) sidechain-orchestrator/wallet/psbt.go:930 — wallet.partialSigHash has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 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 · wallet.requireSigHashAll (cognitive 22) · ×1
  • wallet.requireSigHashAll (cognitive 22) sidechain-orchestrator/wallet/psbt.go:1201 — wallet.requireSigHashAll has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TransactionTableState.build (cognitive 21) · ×1
  • _TransactionTableState.build (cognitive 21) bitwindow/lib/pages/wallet/wallet_overview.dart:243 — _TransactionTableState.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 11, if/else 7, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ChatProvider.fetchPaymail (cognitive 21) · ×1
  • ChatProvider.fetchPaymail (cognitive 21) bitwindow/lib/providers/chat_provider.dart:618 — ChatProvider.fetchPaymail has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 3, boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionStorage.cleanupPSBTFromGroup (cognitive 21) · ×1
  • TransactionStorage.cleanupPSBTFromGroup (cognitive 21) bitwindow/lib/providers/multisig_provider.dart:544 — TransactionStorage.cleanupPSBTFromGroup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (8 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SailTabItem.build (cognitive 21) · ×1
  • SailTabItem.build (cognitive 21) sail_ui/lib/widgets/containers/tab_bar.dart:226 — SailTabItem.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 8 (9 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 · Server.ListBlocks (cognitive 21) · ×1
  • Server.ListBlocks (cognitive 21) bitwindow/server/api/bitwindowd/bitwindowd.go:772 — Server.ListBlocks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 7 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 · config.RunBitcoinConfMigrations (cognitive 21) · ×1
  • config.RunBitcoinConfMigrations (cognitive 21) sidechain-orchestrator/config/bitcoin_config_syncer.go:231 — config.RunBitcoinConfMigrations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts), boolean chains 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 · Orchestrator.discoverPid (cognitive 21) · ×1
  • Orchestrator.discoverPid (cognitive 21) REDACTED:555 — Orchestrator.discoverPid has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4 (nesting depth added 9). 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 · Orchestrator.ShutdownAll (cognitive 21) · ×1
  • Orchestrator.ShutdownAll (cognitive 21) REDACTED:2406 — Orchestrator.ShutdownAll has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 2417). 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 · Server.publish (cognitive 21) · ×1
  • Server.publish (cognitive 21) sidechain-orchestrator/stratum/server.go:262 — Server.publish has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.DeriveKeystore (cognitive 21) · ×1
  • wallet.DeriveKeystore (cognitive 21) sidechain-orchestrator/wallet/derive_keystore.go:35 — wallet.DeriveKeystore has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.walletRowsForTx (cognitive 21) · ×1
  • wallet.walletRowsForTx (cognitive 21) sidechain-orchestrator/wallet/electrum_backend.go:3415 — wallet.walletRowsForTx has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.SigningKey (cognitive 21) · ×1
  • wallet.SigningKey (cognitive 21) sidechain-orchestrator/wallet/wallet_descriptors.go:63 — wallet.SigningKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 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 · CoreBackend.lastUsedTimes (cognitive 21) · ×1
  • CoreBackend.lastUsedTimes (cognitive 21) sidechain-orchestrator/wallet/core_backend.go:383 — CoreBackend.lastUsedTimes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 7 (10 pts), boolean chains 1 (nesting depth added 8). Of this number, 19 points are the body's own statements and 2 belong 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 · ElectrumBackend.scanChain (cognitive 21) · ×1
  • ElectrumBackend.scanChain (cognitive 21) sidechain-orchestrator/wallet/electrum_backend.go:3020 — ElectrumBackend.scanChain has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElectrumBackend.hydrate (cognitive 21) · ×1
  • ElectrumBackend.hydrate (cognitive 21) sidechain-orchestrator/wallet/electrum_backend.go:3072 — ElectrumBackend.hydrate 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 · EsploraClient.AddressTxsFrom (cognitive 21) · ×1
  • EsploraClient.AddressTxsFrom (cognitive 21) sidechain-orchestrator/wallet/esplora.go:466 — EsploraClient.AddressTxsFrom has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), boolean chains 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 · Service.restoreWalletBackup (cognitive 21) · ×1
  • Service.restoreWalletBackup (cognitive 21) sidechain-orchestrator/wallet/metadata.go:196 — Service.restoreWalletBackup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (21 pts) (nesting depth added 5). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 246, 222, 197, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Service.startWatcher (cognitive 21) · ×1
  • Service.startWatcher (cognitive 21) sidechain-orchestrator/wallet/service.go:2184 — Service.startWatcher has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 2198). 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 · _BowtiePainter.paint (cognitive 20) · ×1
  • _BowtiePainter.paint (cognitive 20) bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:503 — _BowtiePainter.paint has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 3 (5 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsWalletState.build (cognitive 20) · ×1
  • _SettingsWalletState.build (cognitive 20) bitwindow/lib/pages/settings/settings_wallet.dart:57 — _SettingsWalletState.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatProvider.claimIdentity (cognitive 20) · ×1
  • ChatProvider.claimIdentity (cognitive 20) bitwindow/lib/providers/chat_provider.dart:335 — ChatProvider.claimIdentity has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), loops 2 (4 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 · NewsProvider.fetch (cognitive 20) · ×1
  • NewsProvider.fetch (cognitive 20) bitwindow/lib/providers/news_provider.dart:34 — NewsProvider.fetch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PidFileManager.getProcessName (cognitive 20) · ×1
  • PidFileManager.getProcessName (cognitive 20) sidechain_core/lib/providers/binaries/managers/pid_file_manager.dart:148 — PidFileManager.getProcessName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 1 (2 pts), boolean chains 1, error handling 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 · BitcoinConfProvider.loadConfig (cognitive 20) · ×1
  • BitcoinConfProvider.loadConfig (cognitive 20) sidechain_core/lib/providers/bitcoin_conf_provider.dart:138 — BitcoinConfProvider.loadConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 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 · BitnamesSecureStore._decryptSlot (cognitive 20) · ×1
  • BitnamesSecureStore._decryptSlot (cognitive 20) bitwindow/lib/services/bitnames_secure_store.dart:448 — BitnamesSecureStore._decryptSlot has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (6 pts), error handling 2 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _SidechainHomePageState._handleGlobalKeyEvent (cognitive 20) · ×1
  • _SidechainHomePageState._handleGlobalKeyEvent (cognitive 20) sail_ui/lib/shell/sidechain_home_page.dart:45 — _SidechainHomePageState._handleGlobalKeyEvent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AssetIssuanceWizard.build (cognitive 20) · ×1
  • AssetIssuanceWizard.build (cognitive 20) bitassets/lib/widgets/asset_issuance_wizard.dart:10 — AssetIssuanceWizard.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 6, 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 · _CombineBroadcastModalState.build (cognitive 20) · ×1
  • _CombineBroadcastModalState.build (cognitive 20) bitwindow/lib/widgets/combine_broadcast_modal.dart:154 — _CombineBroadcastModalState.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 6 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportMultisigModal.build (cognitive 20) · ×1
  • ImportMultisigModal.build (cognitive 20) bitwindow/lib/widgets/create_multisig_modal.dart:973 — ImportMultisigModal.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 7 (9 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 · __SailScaleButtonState.build (cognitive 20) · ×1
  • __SailScaleButtonState.build (cognitive 20) sail_ui/lib/widgets/buttons/button.dart:571 — __SailScaleButtonState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 15, boolean chains 4, if/else 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 · ChainLoaders.build (cognitive 20) · ×1
  • ChainLoaders.build (cognitive 20) sail_ui/lib/widgets/nav/bottom_nav.dart:760 — ChainLoaders.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9, 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 · Server.processPegDataBlocks (cognitive 20) · ×1
  • Server.processPegDataBlocks (cognitive 20) bitwindow/server/api/drivechain/drivechain.go:483 — Server.processPegDataBlocks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 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 · Server.Watch (cognitive 20) · ×1
  • Server.Watch (cognitive 20) bitwindow/server/api/health/health.go:65 — Server.Watch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (7 pts), loops 2 (nesting depth added 10). Of this number, 11 points are the body's own statements and 9 belong 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 · engines.selectBranchAndBound (cognitive 20) · ×1
  • engines.selectBranchAndBound (cognitive 20) REDACTED:167 — engines.selectBranchAndBound has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 5, boolean chains 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 7 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 · WalletHandler.SendTransaction (cognitive 20) · ×1
  • WalletHandler.SendTransaction (cognitive 20) sidechain-orchestrator/api/wallet_handler.go:959 — WalletHandler.SendTransaction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · blockfile.magicAt (cognitive 20) · ×1
  • blockfile.magicAt (cognitive 20) sidechain-orchestrator/blockfile/detect.go:114 — blockfile.magicAt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitcoinConfManager.loadOrCreateConfigContent (cognitive 20) · ×1
  • BitcoinConfManager.loadOrCreateConfigContent (cognitive 20) sidechain-orchestrator/config/bitcoin_conf.go:437 — BitcoinConfManager.loadOrCreateConfigContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (20 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 · Orchestrator.restartResetPlan (cognitive 20) · ×1
  • Orchestrator.restartResetPlan (cognitive 20) sidechain-orchestrator/reset.go:549 — Orchestrator.restartResetPlan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), 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 · wallet.coreReceiveList (cognitive 20) · ×1
  • wallet.coreReceiveList (cognitive 20) sidechain-orchestrator/wallet/core_backend.go:519 — wallet.coreReceiveList has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.decodePSBT (cognitive 20) · ×1
  • wallet.decodePSBT (cognitive 20) sidechain-orchestrator/wallet/decode.go:173 — wallet.decodePSBT has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 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 · wallet.ParseDescriptorAs (cognitive 20) · ×1
  • wallet.ParseDescriptorAs (cognitive 20) sidechain-orchestrator/wallet/descriptor.go:48 — wallet.ParseDescriptorAs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, 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 · ElectrumBackend.previewBumpFee (cognitive 20) · ×1
  • ElectrumBackend.previewBumpFee (cognitive 20) sidechain-orchestrator/wallet/electrum_backend.go:1686 — ElectrumBackend.previewBumpFee has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElectrumClient.call (cognitive 20) · ×1
  • ElectrumClient.call (cognitive 20) REDACTED:205 — ElectrumClient.call has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 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 · walletfile.Write (cognitive 20) · ×1
  • walletfile.Write (cognitive 20) sidechain-orchestrator/walletfile/walletfile.go:168 — walletfile.Write has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, 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 · _DepositModalState._getSidechainRPC (cognitive 19) · ×1
  • _DepositModalState._getSidechainRPC (cognitive 19) bitwindow/lib/pages/sidechains_page.dart:2258 — _DepositModalState._getSidechainRPC has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 2, if/else 2, 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 · _DenialDialogState.startDenial (cognitive 19) · ×1
  • _DenialDialogState.startDenial (cognitive 19) bitwindow/lib/pages/wallet/denial_dialog.dart:147 — _DenialDialogState.startDenial has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _GetCoinsButtonState._claimFaucet (cognitive 19) · ×1
  • _GetCoinsButtonState._claimFaucet (cognitive 19) bitwindow/lib/pages/wallet/wallet_page.dart:298 — _GetCoinsButtonState._claimFaucet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, 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 · _ExplorerDetailState.build (cognitive 19) · ×1
  • _ExplorerDetailState.build (cognitive 19) sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:118 — _ExplorerDetailState.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (19 pts) (nesting depth added 10). 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 · BlockchainProvider.fetch (cognitive 19) · ×1
  • BlockchainProvider.fetch (cognitive 19) bitwindow/lib/providers/blockchain_provider.dart:51 — BlockchainProvider.fetch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, 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 · ChatProvider._loadMessages (cognitive 19) · ×1
  • ChatProvider._loadMessages (cognitive 19) bitwindow/lib/providers/chat_provider.dart:457 — ChatProvider._loadMessages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackendStateProvider._rpcForBinaryName (cognitive 19) · ×1
  • BackendStateProvider._rpcForBinaryName (cognitive 19) sidechain_core/lib/providers/backend_state_provider.dart:217 — BackendStateProvider._rpcForBinaryName has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (18 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _ClaimEcxCardState._check (cognitive 19) · ×1
  • _ClaimEcxCardState._check (cognitive 19) bitwindow/lib/widgets/claim_ecx_card.dart:79 — _ClaimEcxCardState._check has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, ternaries 1 (2 pts), error handling 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 · _CombineBroadcastModalState._combineAndBroadcast (cognitive 19) · ×1
  • _CombineBroadcastModalState._combineAndBroadcast (cognitive 19) bitwindow/lib/widgets/combine_broadcast_modal.dart:66 — _CombineBroadcastModalState._combineAndBroadcast has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (2 pts), error handling 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 · _HardwareDevicePickerState._deviceTile (cognitive 19) · ×1
  • _HardwareDevicePickerState._deviceTile (cognitive 19) bitwindow/lib/widgets/hardware_device_picker.dart:331 — _HardwareDevicePickerState._deviceTile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _URQrScannerState._onDetect (cognitive 19) · ×1
  • _URQrScannerState._onDetect (cognitive 19) bitwindow/lib/widgets/ur_qr_scanner.dart:51 — _URQrScannerState._onDetect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SailTextField.build (cognitive 19) · ×1
  • SailTextField.build (cognitive 19) sail_ui/lib/widgets/inputs/text_field.dart:69 — SailTextField.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 13, if/else 5, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Server.UpdateNetwork (cognitive 19) · ×1
  • Server.UpdateNetwork (cognitive 19) bitwindow/server/api/bitwindowd/bitwindowd.go:142 — Server.UpdateNetwork has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 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 · engines.SelectCoins (cognitive 19) · ×1
  • engines.SelectCoins (cognitive 19) REDACTED:39 — engines.SelectCoins has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4, boolean chains 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 · engines.indexCoinNewsPayload (cognitive 19) · ×1
  • engines.indexCoinNewsPayload (cognitive 19) bitwindow/server/engines/coinnews.go:75 — engines.indexCoinNewsPayload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, 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 · DeniabilityEngine.ProcessUTXO (cognitive 19) · ×1
  • DeniabilityEngine.ProcessUTXO (cognitive 19) REDACTED:291 — DeniabilityEngine.ProcessUTXO has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Scanner.indexHeight (cognitive 19) · ×1
  • Scanner.indexHeight (cognitive 19) coinnews/server/scanner/scanner.go:125 — Scanner.indexHeight has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · coreBids.frozenCoins (cognitive 19) · ×1
  • coreBids.frozenCoins (cognitive 19) sidechain-orchestrator/api/bmm_frozen.go:27 — coreBids.frozenCoins has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · walletBids.frozenCoins (cognitive 19) · ×1
  • walletBids.frozenCoins (cognitive 19) sidechain-orchestrator/api/bid_source_wallet.go:215 — walletBids.frozenCoins has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 5 belong 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 · ExplorerHandler.anchorFromEnforcer (cognitive 19) · ×1
  • ExplorerHandler.anchorFromEnforcer (cognitive 19) sidechain-orchestrator/api/explorer_cache.go:179 — ExplorerHandler.anchorFromEnforcer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultisigLoungeHandler.SignTransaction (cognitive 19) · ×1
  • MultisigLoungeHandler.SignTransaction (cognitive 19) sidechain-orchestrator/api/multisiglounge_handler.go:364 — MultisigLoungeHandler.SignTransaction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · MultisigLoungeHandler.CombineAndBroadcast (cognitive 19) · ×1
  • MultisigLoungeHandler.CombineAndBroadcast (cognitive 19) sidechain-orchestrator/api/multisiglounge_handler.go:455 — MultisigLoungeHandler.CombineAndBroadcast has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Handler.StreamLogs (cognitive 19) · ×1
  • Handler.StreamLogs (cognitive 19) sidechain-orchestrator/api/orchestrator_handler.go:128 — Handler.StreamLogs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). Of this number, 17 points are the body's own statements and 2 belong 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 · WalletHandler.PreviewSend (cognitive 19) · ×1
  • WalletHandler.PreviewSend (cognitive 19) sidechain-orchestrator/api/wallet_handler.go:1066 — WalletHandler.PreviewSend has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (19 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WalletHandler.GetTransactionDetails (cognitive 19) · ×1
  • WalletHandler.GetTransactionDetails (cognitive 19) sidechain-orchestrator/api/wallet_handler.go:1392 — WalletHandler.GetTransactionDetails has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · orchestrator.alignWalletState (cognitive 19) · ×1
  • orchestrator.alignWalletState (cognitive 19) sidechain-orchestrator/sidechain_wallet_state.go:133 — orchestrator.alignWalletState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · commands.checkBurnPreview (cognitive 19) · ×1
  • commands.checkBurnPreview (cognitive 19) sidechain-orchestrator/commands/wallet_burn_ecx.go:341 — commands.checkBurnPreview has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, loops 2, match/switch 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 · config.WipeEnforcerChainDataSync (cognitive 19) · ×1
  • config.WipeEnforcerChainDataSync (cognitive 19) sidechain-orchestrator/config/binaries.go:434 — config.WipeEnforcerChainDataSync has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BIP47Engine.decodeNotificationTx (cognitive 19) · ×1
  • BIP47Engine.decodeNotificationTx (cognitive 19) sidechain-orchestrator/engines/bip47_engine.go:257 — BIP47Engine.decodeNotificationTx has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 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 · Orchestrator.checkECashMigrationStart (cognitive 19) · ×1
  • Orchestrator.checkECashMigrationStart (cognitive 19) sidechain-orchestrator/ecash_migration.go:236 — Orchestrator.checkECashMigrationStart has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5 (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 · Orchestrator.startMigrationCore (cognitive 19) · ×1
  • Orchestrator.startMigrationCore (cognitive 19) sidechain-orchestrator/ecash_migration.go:831 — Orchestrator.startMigrationCore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 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 · Orchestrator.ConfirmPendingECashNetwork (cognitive 19) · ×1
  • Orchestrator.ConfirmPendingECashNetwork (cognitive 19) sidechain-orchestrator/network_catalog.go:104 — Orchestrator.ConfirmPendingECashNetwork has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Handler.GetWalletUtxos (cognitive 19) · ×1
  • Handler.GetWalletUtxos (cognitive 19) sidechain-orchestrator/sidechain/zside/handler.go:101 — Handler.GetWalletUtxos has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (4 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 · Handler.listWalletTransactions (cognitive 19) · ×1
  • Handler.listWalletTransactions (cognitive 19) sidechain-orchestrator/sidechain/zside/history.go:169 — Handler.listWalletTransactions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (7 pts) (nesting depth added 9). Of this number, 18 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 · wallet.verifySignatures (cognitive 19) · ×1
  • wallet.verifySignatures (cognitive 19) sidechain-orchestrator/wallet/psbt.go:398 — wallet.verifySignatures has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.insertScanRows (cognitive 19) · ×1
  • wallet.insertScanRows (cognitive 19) REDACTED:271 — wallet.insertScanRows has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (5 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 · wallet.multisigOutput (cognitive 19) · ×1
  • wallet.multisigOutput (cognitive 19) sidechain-orchestrator/wallet/scripttype.go:223 — wallet.multisigOutput has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), 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 · wallet.finalizeTaprootMultisigInput (cognitive 19) · ×1
  • wallet.finalizeTaprootMultisigInput (cognitive 19) REDACTED:254 — wallet.finalizeTaprootMultisigInput has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4, boolean chains 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 · ElectrumBackend.applySpend (cognitive 19) · ×1
  • ElectrumBackend.applySpend (cognitive 19) sidechain-orchestrator/wallet/electrum_backend.go:916 — ElectrumBackend.applySpend has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 6 (7 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EsploraClient.Outspend (cognitive 19) · ×1
  • EsploraClient.Outspend (cognitive 19) sidechain-orchestrator/wallet/esplora.go:545 — EsploraClient.Outspend has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NewDecisionDraft.error (cognitive 18) · ×1
  • NewDecisionDraft.error (cognitive 18) truthcoin/lib/models/market_creation.dart:85 — NewDecisionDraft.error has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, 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 · AmmSwapViewModel._updatePrice (cognitive 18) · ×1
  • AmmSwapViewModel._updatePrice (cognitive 18) bitassets/lib/pages/tabs/amm_page.dart:401 — AmmSwapViewModel._updatePrice has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 8). 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 · _TooltipContent.build (cognitive 18) · ×1
  • _TooltipContent.build (cognitive 18) bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:366 — _TooltipContent.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 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 · ManageNewsSubscriptionsViewModel.importTopics (cognitive 18) · ×1
  • ManageNewsSubscriptionsViewModel.importTopics (cognitive 18) bitwindow/lib/pages/overview_page.dart:1144 — ManageNewsSubscriptionsViewModel.importTopics has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 1 (3 pts), ternaries 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 · _MultisigConfigStepState._onPathChanged (cognitive 18) · ×1
  • _MultisigConfigStepState._onPathChanged (cognitive 18) REDACTED:377 — _MultisigConfigStepState._onPathChanged has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), error handling 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 · _UTXOsTableState.build (cognitive 18) · ×1
  • _UTXOsTableState.build (cognitive 18) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:858 — _UTXOsTableState.build has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 16, if/else 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SidechainProvider.fetch (cognitive 18) · ×1
  • SidechainProvider.fetch (cognitive 18) bitwindow/lib/providers/sidechain_provider.dart:108 — SidechainProvider.fetch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitwindowRPCLive.startNotificationStream (cognitive 18) · ×1
  • BitwindowRPCLive.startNotificationStream (cognitive 18) sidechain_core/lib/rpcs/bitwindow_api.dart:285 — BitwindowRPCLive.startNotificationStream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, 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 · _BurnEcxCardState._prepare (cognitive 18) · ×1
  • _BurnEcxCardState._prepare (cognitive 18) bitwindow/lib/widgets/burn_ecx_card.dart:153 — _BurnEcxCardState._prepare has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, 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 · _ChainSettingsModalState._loadBinaryVersion (cognitive 18) · ×1
  • _ChainSettingsModalState._loadBinaryVersion (cognitive 18) sail_ui/lib/widgets/modals/chain_settings_modal.dart:76 — _ChainSettingsModalState._loadBinaryVersion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (8 pts), error handling 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 · Server.GetNetworkStats (cognitive 18) · ×1
  • Server.GetNetworkStats (cognitive 18) bitwindow/server/api/bitwindowd/bitwindowd.go:1038 — Server.GetNetworkStats has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · Server.GetUTXODistribution (cognitive 18) · ×1
  • Server.GetUTXODistribution (cognitive 18) bitwindow/server/api/wallet/wallet.go:1564 — Server.GetUTXODistribution has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · engines.parseOPReturnData (cognitive 18) · ×1
  • engines.parseOPReturnData (cognitive 18) bitwindow/server/engines/bitcoind_engine.go:1144 — engines.parseOPReturnData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, 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 · engines.ReadCoreTransactions (cognitive 18) · ×1
  • engines.ReadCoreTransactions (cognitive 18) bitwindow/server/engines/core_transactions.go:13 — engines.ReadCoreTransactions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 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 · DeniabilityEngine.resolveDenialWallet (cognitive 18) · ×1
  • DeniabilityEngine.resolveDenialWallet (cognitive 18) REDACTED:729 — DeniabilityEngine.resolveDenialWallet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 1 (nesting depth added 4). Of this number, 17 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 · BMMHandler.PrepareBMM (cognitive 18) · ×1
  • BMMHandler.PrepareBMM (cognitive 18) sidechain-orchestrator/api/bmm_handler.go:810 — BMMHandler.PrepareBMM has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 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 · StratumHandler.GetStratumStatus (cognitive 18) · ×1
  • StratumHandler.GetStratumStatus (cognitive 18) sidechain-orchestrator/api/stratum_handler.go:558 — StratumHandler.GetStratumStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (5 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 · WalletHandler.CreateElectrumWallet (cognitive 18) · ×1
  • WalletHandler.CreateElectrumWallet (cognitive 18) sidechain-orchestrator/api/wallet_handler.go:427 — WalletHandler.CreateElectrumWallet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · orchestrator.parseBinaryVersion (cognitive 18) · ×1
  • orchestrator.parseBinaryVersion (cognitive 18) sidechain-orchestrator/version.go:53 — orchestrator.parseBinaryVersion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · blockfile.run (cognitive 18) · ×1
  • blockfile.run (cognitive 18) sidechain-orchestrator/blockfile/convert.go:108 — blockfile.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BitcoinConfManager.watchLoop (cognitive 18) · ×1
  • BitcoinConfManager.watchLoop (cognitive 18) sidechain-orchestrator/config/bitcoin_config_syncer.go:683 — BitcoinConfManager.watchLoop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 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 · EnforcerConfManager.watchLoop (cognitive 18) · ×1
  • EnforcerConfManager.watchLoop (cognitive 18) sidechain-orchestrator/config/enforcer_conf.go:542 — EnforcerConfManager.watchLoop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 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 · SidechainConfManager.watchLoop (cognitive 18) · ×1
  • SidechainConfManager.watchLoop (cognitive 18) sidechain-orchestrator/config/sidechain_conf.go:562 — SidechainConfManager.watchLoop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 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 · corewalletfile.Preview (cognitive 18) · ×1
  • corewalletfile.Preview (cognitive 18) sidechain-orchestrator/corewalletfile/convert.go:89 — corewalletfile.Preview has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · corewalletfile.Convert (cognitive 18) · ×1
  • corewalletfile.Convert (cognitive 18) sidechain-orchestrator/corewalletfile/convert.go:137 — corewalletfile.Convert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · corewalletfile.inspect (cognitive 18) · ×1
  • corewalletfile.inspect (cognitive 18) sidechain-orchestrator/corewalletfile/convert.go:417 — corewalletfile.inspect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · corewalletfile.checkPlan (cognitive 18) · ×1
  • corewalletfile.checkPlan (cognitive 18) sidechain-orchestrator/corewalletfile/convert.go:643 — corewalletfile.checkPlan has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (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 · BIP47Engine.extendImportsForSender (cognitive 18) · ×1
  • BIP47Engine.extendImportsForSender (cognitive 18) sidechain-orchestrator/engines/bip47_engine.go:348 — BIP47Engine.extendImportsForSender has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.newMigration (cognitive 18) · ×1
  • Orchestrator.newMigration (cognitive 18) sidechain-orchestrator/ecash_migration.go:352 — Orchestrator.newMigration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Orchestrator.PlanNetworkChange (cognitive 18) · ×1
  • Orchestrator.PlanNetworkChange (cognitive 18) sidechain-orchestrator/network_change_plan.go:40 — Orchestrator.PlanNetworkChange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Orchestrator.EnforcerURL (cognitive 18) · ×1
  • Orchestrator.EnforcerURL (cognitive 18) sidechain-orchestrator/remote_enforcer.go:20 — Orchestrator.EnforcerURL has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.signPSBTInput (cognitive 18) · ×1
  • wallet.signPSBTInput (cognitive 18) sidechain-orchestrator/wallet/psbt.go:250 — wallet.signPSBTInput has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), 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 · wallet.CheckPSBTInputs (cognitive 18) · ×1
  • wallet.CheckPSBTInputs (cognitive 18) sidechain-orchestrator/wallet/psbt.go:325 — wallet.CheckPSBTInputs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.signedInstead (cognitive 18) · ×1
  • wallet.signedInstead (cognitive 18) sidechain-orchestrator/wallet/psbt.go:714 — wallet.signedInstead has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3, boolean chains 1 (nesting depth added 5). Of this number, 17 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 · CoreBackend.Ensure (cognitive 18) · ×1
  • CoreBackend.Ensure (cognitive 18) sidechain-orchestrator/wallet/core_backend.go:168 — CoreBackend.Ensure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, 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 · ElectrumClient.buildTx (cognitive 18) · ×1
  • ElectrumClient.buildTx (cognitive 18) REDACTED:633 — ElectrumClient.buildTx has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _NetworkStatisticsPageState.build (cognitive 17) · ×1
  • _NetworkStatisticsPageState.build (cognitive 17) bitwindow/lib/dialogs/network_statistics_dialog.dart:43 — _NetworkStatisticsPageState.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8, if/else 5 (7 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Market.fromJson (cognitive 17) · ×1
  • Market.fromJson (cognitive 17) truthcoin/lib/models/market.dart:73 — Market.fromJson has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BitAssetsViewModel.registerBitAsset (cognitive 17) · ×1
  • BitAssetsViewModel.registerBitAsset (cognitive 17) bitassets/lib/pages/tabs/reserve_register_page.dart:715 — BitAssetsViewModel.registerBitAsset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 5 (7 pts), error handling 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 · CheckDetailPage.build (cognitive 17) · ×1
  • CheckDetailPage.build (cognitive 17) bitwindow/lib/pages/wallet/check_detail_page.dart:260 — CheckDetailPage.build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, ternaries 6, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _DenialDialogState.build (cognitive 17) · ×1
  • _DenialDialogState.build (cognitive 17) bitwindow/lib/pages/wallet/denial_dialog.dart:241 — _DenialDialogState.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 6 (7 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.
D2 · Cognitive Complexity · ChecksTable.build (cognitive 17) · ×1
  • ChecksTable.build (cognitive 17) bitwindow/lib/pages/wallet/wallet_checks.dart:171 — ChecksTable.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 4, if/else 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SidechainConfEditorViewModel.getDiff (cognitive 17) · ×1
  • SidechainConfEditorViewModel.getDiff (cognitive 17) sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:137 — SidechainConfEditorViewModel.getDiff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 2, 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 · BitcoinConfigEditorViewModel.getDiff (cognitive 17) · ×1
  • BitcoinConfigEditorViewModel.getDiff (cognitive 17) sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart:249 — BitcoinConfigEditorViewModel.getDiff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 2, 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 · EnforcerConfigEditorViewModel.getDiff (cognitive 17) · ×1
  • EnforcerConfigEditorViewModel.getDiff (cognitive 17) sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart:157 — EnforcerConfigEditorViewModel.getDiff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 2, 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 · _StepIndicator.build (cognitive 17) · ×1
  • _StepIndicator.build (cognitive 17) bitassets/lib/widgets/asset_issuance_wizard.dart:100 — _StepIndicator.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatadirNetworkWatcher._checkUntilAnswered (cognitive 17) · ×1
  • DatadirNetworkWatcher._checkUntilAnswered (cognitive 17) bitwindow/lib/widgets/datadir_network_notice.dart:88 — DatadirNetworkWatcher._checkUntilAnswered has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SailColumn.build (cognitive 17) · ×1
  • SailColumn.build (cognitive 17) sail_ui/lib/widgets/containers/sail_column.dart:36 — SailColumn.build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, 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 · BottomNavViewModel.connectionColor (cognitive 17) · ×1
  • BottomNavViewModel.connectionColor (cognitive 17) sail_ui/lib/widgets/nav/bottom_nav.dart:580 — BottomNavViewModel.connectionColor has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, 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 · Server.SetBundleUpvote (cognitive 17) · ×1
  • Server.SetBundleUpvote (cognitive 17) bitwindow/server/api/m4/m4.go:101 — Server.SetBundleUpvote has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.groupToProto (cognitive 17) · ×1
  • Server.groupToProto (cognitive 17) bitwindow/server/api/multisig/multisig.go:392 — Server.groupToProto has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeniabilityEngine.waitForUTXOsToAppear (cognitive 17) · ×1
  • DeniabilityEngine.waitForUTXOsToAppear (cognitive 17) REDACTED:432 — DeniabilityEngine.waitForUTXOsToAppear has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SidechainMonitorEngine.parseWithdrawalBundle (cognitive 17) · ×1
  • SidechainMonitorEngine.parseWithdrawalBundle (cognitive 17) bitwindow/server/engines/sidechain_monitor_engine.go:260 — SidechainMonitorEngine.parseWithdrawalBundle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.startDrivechaind (cognitive 17) · ×1
  • main.startDrivechaind (cognitive 17) REDACTED:391 — main.startDrivechaind has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · cheques.CreateOrUpdateFromRecoveryVersioned (cognitive 17) · ×1
  • cheques.CreateOrUpdateFromRecoveryVersioned (cognitive 17) bitwindow/server/models/cheques/cheques.go:387 — cheques.CreateOrUpdateFromRecoveryVersioned has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bidSource.Replacement (cognitive 17) · ×1
  • bidSource.Replacement (cognitive 17) sidechain-orchestrator/api/bid_source.go:140 — bidSource.Replacement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 151). 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 · api.nodeBlocksBefore (cognitive 17) · ×1
  • api.nodeBlocksBefore (cognitive 17) sidechain-orchestrator/api/explorer_blocks.go:54 — api.nodeBlocksBefore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api.coreOverview (cognitive 17) · ×1
  • api.coreOverview (cognitive 17) sidechain-orchestrator/api/explorer_core.go:30 — api.coreOverview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BMMHandler.ConnectBid (cognitive 17) · ×1
  • BMMHandler.ConnectBid (cognitive 17) sidechain-orchestrator/api/bmm_handler.go:577 — BMMHandler.ConnectBid has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · orchestrator.resolveResetTarget (cognitive 17) · ×1
  • orchestrator.resolveResetTarget (cognitive 17) sidechain-orchestrator/reset_to_block.go:59 — orchestrator.resolveResetTarget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BinaryDirConfig.GetWalletPaths (cognitive 17) · ×1
  • BinaryDirConfig.GetWalletPaths (cognitive 17) sidechain-orchestrator/config/binaries.go:524 — BinaryDirConfig.GetWalletPaths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DownloadManager.extractTarGz (cognitive 17) · ×1
  • DownloadManager.extractTarGz (cognitive 17) REDACTED:839 — DownloadManager.extractTarGz has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 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 · BmmEngine.rebuildStaleBid (cognitive 17) · ×1
  • BmmEngine.rebuildStaleBid (cognitive 17) sidechain-orchestrator/engines/bmm_engine.go:1121 — BmmEngine.rebuildStaleBid has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 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 · Orchestrator.PreviewECashMigration (cognitive 17) · ×1
  • Orchestrator.PreviewECashMigration (cognitive 17) sidechain-orchestrator/ecash_migration.go:445 — Orchestrator.PreviewECashMigration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.convertMigration (cognitive 17) · ×1
  • Orchestrator.convertMigration (cognitive 17) sidechain-orchestrator/ecash_migration.go:1177 — Orchestrator.convertMigration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 1 (nesting depth added 3). Of this number, 15 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 · Orchestrator.SetCoreVariant (cognitive 17) · ×1
  • Orchestrator.SetCoreVariant (cognitive 17) REDACTED:2713 — Orchestrator.SetCoreVariant has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Orchestrator.restartRemoteOrphans (cognitive 17) · ×1
  • Orchestrator.restartRemoteOrphans (cognitive 17) sidechain-orchestrator/remote_enforcer.go:169 — Orchestrator.restartRemoteOrphans has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.prepareRemoteSidechainArgs (cognitive 17) · ×1
  • Orchestrator.prepareRemoteSidechainArgs (cognitive 17) sidechain-orchestrator/remote_enforcer.go:197 — Orchestrator.prepareRemoteSidechainArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2 (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 · Orchestrator.ReleaseStrandedTxs (cognitive 17) · ×1
  • Orchestrator.ReleaseStrandedTxs (cognitive 17) sidechain-orchestrator/stranded_release.go:37 — Orchestrator.ReleaseStrandedTxs 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 · wallet.SanityCheck (cognitive 17) · ×1
  • wallet.SanityCheck (cognitive 17) sidechain-orchestrator/wallet/entropy.go:77 — wallet.SanityCheck has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 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 · wallet.CountMultisigSignatures (cognitive 17) · ×1
  • wallet.CountMultisigSignatures (cognitive 17) sidechain-orchestrator/wallet/multisiglounge_sync.go:16 — wallet.CountMultisigSignatures has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wallet.BuildUnsignedTransaction (cognitive 17) · ×1
  • wallet.BuildUnsignedTransaction (cognitive 17) sidechain-orchestrator/wallet/tx.go:55 — wallet.BuildUnsignedTransaction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElectrumBackend.CreateCpfp (cognitive 17) · ×1
  • ElectrumBackend.CreateCpfp (cognitive 17) sidechain-orchestrator/wallet/electrum_backend.go:1978 — ElectrumBackend.CreateCpfp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ElectrumBackend.immatureCoinbase (cognitive 17) · ×1
  • ElectrumBackend.immatureCoinbase (cognitive 17) sidechain-orchestrator/wallet/electrum_backend.go:3320 — ElectrumBackend.immatureCoinbase has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Service.RemoveEncryption (cognitive 17) · ×1
  • Service.RemoveEncryption (cognitive 17) sidechain-orchestrator/wallet/service.go:1412 — Service.RemoveEncryption has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 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 · page.InfoPage (cognitive 17) · ×1
  • page.InfoPage (cognitive 17) dc-hub/app/info/page.tsx:23 — page.InfoPage has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. 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 · _AuctionRow.build (cognitive 16) · ×1
  • _AuctionRow.build (cognitive 16) bitassets/lib/pages/tabs/auction_browser_page.dart:298 — _AuctionRow.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 6 (7 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsNodeModeState._switchTo (cognitive 16) · ×1
  • _SettingsNodeModeState._switchTo (cognitive 16) bitwindow/lib/pages/settings/settings_node_mode.dart:38 — _SettingsNodeModeState._switchTo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, error handling 1 (nesting depth added 7). 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 · SidechainsViewModel._sidechainRPC (cognitive 16) · ×1
  • SidechainsViewModel._sidechainRPC (cognitive 16) bitwindow/lib/pages/sidechains_page.dart:1408 — SidechainsViewModel._sidechainRPC has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 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 · _UTXOSnapshotPageState._start (cognitive 16) · ×1
  • _UTXOSnapshotPageState._start (cognitive 16) sail_ui/lib/pages/utxo_snapshot_page.dart:36 — _UTXOSnapshotPageState._start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 pts), 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 · AssetAnalyticsProvider._updatePortfolioValues (cognitive 16) · ×1
  • AssetAnalyticsProvider._updatePortfolioValues (cognitive 16) bitassets/lib/providers/asset_analytics_provider.dart:147 — AssetAnalyticsProvider._updatePortfolioValues has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConsolidationProvider._syncConfirmations (cognitive 16) · ×1
  • ConsolidationProvider._syncConfirmations (cognitive 16) bitwindow/lib/providers/consolidation_provider.dart:488 — ConsolidationProvider._syncConfirmations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 2 (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 · WalletReaderProvider._applyState (cognitive 16) · ×1
  • WalletReaderProvider._applyState (cognitive 16) sidechain_core/lib/providers/wallet_reader_provider.dart:112 — WalletReaderProvider._applyState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 2 (4 pts), boolean chains 2, match/switch 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ChatFileStorage._save (cognitive 16) · ×1
  • ChatFileStorage._save (cognitive 16) bitwindow/lib/services/chat_file_storage.dart:101 — ChatFileStorage._save has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, error handling 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 · _ECashMigrationDialogState._progress (cognitive 16) · ×1
  • _ECashMigrationDialogState._progress (cognitive 16) bitwindow/lib/widgets/ecash_migration_dialog.dart:371 — _ECashMigrationDialogState._progress has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ConsoleViewState._parseArgs (cognitive 16) · ×1
  • _ConsoleViewState._parseArgs (cognitive 16) sail_ui/lib/widgets/console/console_view.dart:365 — _ConsoleViewState._parseArgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 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 · _SidechainRPCMethodsTabState._executeMethod (cognitive 16) · ×1
  • _SidechainRPCMethodsTabState._executeMethod (cognitive 16) sail_ui/lib/widgets/debug/sidechain_debug_window.dart:736 — _SidechainRPCMethodsTabState._executeMethod has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (5 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 · _SailTooltipState._buildOverlay (cognitive 16) · ×1
  • _SailTooltipState._buildOverlay (cognitive 16) sail_ui/lib/widgets/feedback/sail_tooltip.dart:139 — _SailTooltipState._buildOverlay has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 14, if/else 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _SailComboboxState._onKey (cognitive 16) · ×1
  • _SailComboboxState._onKey (cognitive 16) sail_ui/lib/widgets/inputs/sail_combobox.dart:125 — _SailComboboxState._onKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WalletBackupRestoreOptionsState._startRestore (cognitive 16) · ×1
  • _WalletBackupRestoreOptionsState._startRestore (cognitive 16) sail_ui/lib/widgets/wallet_backup_restore.dart:523 — _WalletBackupRestoreOptionsState._startRestore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 1 (3 pts), loops 1 (2 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 · _WalletBackupRestoreOptionsState._applyBackendRestoreStatus (cognitive 16) · ×1
  • _WalletBackupRestoreOptionsState._applyBackendRestoreStatus (cognitive 16) sail_ui/lib/widgets/wallet_backup_restore.dart:684 — _WalletBackupRestoreOptionsState._applyBackendRestoreStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 1 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.CreateDenial (cognitive 16) · ×1
  • Server.CreateDenial (cognitive 16) bitwindow/server/api/bitwindowd/bitwindowd.go:243 — Server.CreateDenial has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · api.errorInterceptor (cognitive 16) · ×1
  • api.errorInterceptor (cognitive 16) bitwindow/server/api/server.go:431 — api.errorInterceptor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 pts) (nesting depth added 8). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 432). 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 · Server.GetBalance (cognitive 16) · ×1
  • Server.GetBalance (cognitive 16) bitwindow/server/api/wallet/wallet.go:260 — Server.GetBalance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), 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 · Server.GetStats (cognitive 16) · ×1
  • Server.GetStats (cognitive 16) bitwindow/server/api/wallet/wallet.go:906 — Server.GetStats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, 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 · drivechain.DecodeDepositAddress (cognitive 16) · ×1
  • drivechain.DecodeDepositAddress (cognitive 16) bitwindow/server/drivechain/utils.go:20 — drivechain.DecodeDepositAddress has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drivechaindSupervisor.run (cognitive 16) · ×1
  • drivechaindSupervisor.run (cognitive 16) REDACTED:553 — drivechaindSupervisor.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, match/switch 1 (2 pts), 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 · Scanner.catchUp (cognitive 16) · ×1
  • Scanner.catchUp (cognitive 16) coinnews/server/scanner/scanner.go:54 — Scanner.catchUp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · Core.batch (cognitive 16) · ×1
  • Core.batch (cognitive 16) difficulty/rpc.go:39 — Core.batch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 2, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · orchestrator.jsonToBinaryConfig (cognitive 16) · ×1
  • orchestrator.jsonToBinaryConfig (cognitive 16) sidechain-orchestrator/config_loader.go:257 — orchestrator.jsonToBinaryConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · commands.ensureSidechainDownloaded (cognitive 16) · ×1
  • commands.ensureSidechainDownloaded (cognitive 16) REDACTED:1319 — commands.ensureSidechainDownloaded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.ReadDatadirNetwork (cognitive 16) · ×1
  • Orchestrator.ReadDatadirNetwork (cognitive 16) sidechain-orchestrator/datadir_network.go:54 — Orchestrator.ReadDatadirNetwork has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, 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 · Orchestrator.rejectSourceHeaders (cognitive 16) · ×1
  • Orchestrator.rejectSourceHeaders (cognitive 16) sidechain-orchestrator/ecash_migration.go:1113 — Orchestrator.rejectSourceHeaders has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Orchestrator.selectMigration (cognitive 16) · ×1
  • Orchestrator.selectMigration (cognitive 16) sidechain-orchestrator/ecash_migration.go:1237 — Orchestrator.selectMigration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Orchestrator.restartResetBinary (cognitive 16) · ×1
  • Orchestrator.restartResetBinary (cognitive 16) sidechain-orchestrator/reset.go:603 — Orchestrator.restartResetBinary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong 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 · Orchestrator.applySnapshot (cognitive 16) · ×1
  • Orchestrator.applySnapshot (cognitive 16) sidechain-orchestrator/snapshot.go:308 — Orchestrator.applySnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 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 · stratum.parseNotify (cognitive 16) · ×1
  • stratum.parseNotify (cognitive 16) sidechain-orchestrator/stratum/cpu.go:297 — stratum.parseNotify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · stratum.NewSoloWork (cognitive 16) · ×1
  • stratum.NewSoloWork (cognitive 16) sidechain-orchestrator/stratum/solo.go:107 — stratum.NewSoloWork has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 2, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · upstreamConn.parseNotify (cognitive 16) · ×1
  • upstreamConn.parseNotify (cognitive 16) sidechain-orchestrator/stratum/pool.go:401 — upstreamConn.parseNotify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Server.configure (cognitive 16) · ×1
  • Server.configure (cognitive 16) sidechain-orchestrator/stratum/server.go:557 — Server.configure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 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 · testharness.newNode (cognitive 16) · ×1
  • testharness.newNode (cognitive 16) sidechain-orchestrator/testharness/node.go:88 — testharness.newNode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3, match/switch 1 (nesting depth added 2). Of this number, 10 points are the body's own statements and 6 belong to 4 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.
D2 · Cognitive Complexity · wallet.ParseKeystorePath (cognitive 16) · ×1
  • wallet.ParseKeystorePath (cognitive 16) sidechain-orchestrator/wallet/derivation.go:116 — wallet.ParseKeystorePath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, 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 · CoreBackend.spentFrom (cognitive 16) · ×1
  • CoreBackend.spentFrom (cognitive 16) sidechain-orchestrator/wallet/core_backend.go:439 — CoreBackend.spentFrom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HWIRunner.findKeyOnDevice (cognitive 16) · ×1
  • HWIRunner.findKeyOnDevice (cognitive 16) sidechain-orchestrator/wallet/hwi_paths.go:134 — HWIRunner.findKeyOnDevice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Service.SyncBalance (cognitive 16) · ×1
  • Service.SyncBalance (cognitive 16) sidechain-orchestrator/wallet/metadata.go:87 — Service.SyncBalance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D22 · Internal API Consistency · `database.CheckOne` takes no context.Context; its 3 sibling operations take one · ×1
  • `database.CheckOne` takes no context.Context; its 3 sibling operations take one bitwindow/server/database/db.go:166 — 3 of 4 fallible operations of `package database` take a `ctx context.Context` (3 of 4). Siblings: database.New (bitwindow/server/database/db.go:19); database.Get (bitwindow/server/database/db.go:65); database.Select (bitwindow/server/database/db.go:82). Take `ctx context.Context` as the first parameter, like its siblings, and pass it on. [rule A1]
D22 · Internal API Consistency · `addressbook.DirectionFromProto` takes no context.Context; its 6 sibling operations take one · ×1
  • `addressbook.DirectionFromProto` takes no context.Context; its 6 sibling operations take one bitwindow/server/models/addressbook/addressbook.go:91 — 6 of 7 fallible operations of `package addressbook` take a `ctx context.Context` (6 of 7). Siblings: addressbook.Create (bitwindow/server/models/addressbook/addressbook.go:36); addressbook.Upsert (bitwindow/server/models/addressbook/addressbook.go:49); addressbook.List (bitwindow/server/models/addressbook/addressbook.go:60); addressbook.LabelsByAddress (bitwindow/server/models/addressbook/addressbook.go:65); addressbook.UpdateLabel (bitwindow/server/models/addressbook/addressbook.go:79). Take `ctx context.Context` as the first parameter, like its siblings, and pass it on. [rule A1]
D22 · Internal API Consistency · `coinnews.CommentSigHash` returns an array (`[N]T`) where its 7 siblings return a slice (`[]T`) · ×1
  • `coinnews.CommentSigHash` returns an array (`[N]T`) where its 7 siblings return a slice (`[]T`) coinnews/codec/sign.go:32 — 7 of 8 collection-returning members of `package coinnews` return a slice (`[]T`) (7 of 8). Siblings: coinnews.EncodeTopicCreation (coinnews/codec/encode.go:12); coinnews.EncodeStory (coinnews/codec/encode.go:33); coinnews.EncodeComment (coinnews/codec/encode.go:52); coinnews.EncodeContinuation (coinnews/codec/encode.go:71); coinnews.DecodeTLVs (coinnews/codec/tlv.go:36). Return a slice (`[]T`). [rule A4]
D22 · Internal API Consistency · `blockfile.ParseMagic` takes no context.Context; its 4 sibling operations take one · ×1
  • `blockfile.ParseMagic` takes no context.Context; its 4 sibling operations take one sidechain-orchestrator/blockfile/convert.go:24 — 4 of 5 fallible operations of `package blockfile` take a `ctx context.Context` (4 of 5). Siblings: blockfile.Preview (sidechain-orchestrator/blockfile/convert.go:99); blockfile.Convert (sidechain-orchestrator/blockfile/convert.go:104); blockfile.Detect (sidechain-orchestrator/blockfile/detect.go:31); blockfile.ReadEnds (sidechain-orchestrator/blockfile/detect.go:42). Take `ctx context.Context` as the first parameter, like its siblings, and pass it on. [rule A1]
D22 · Internal API Consistency · `cgminer.ReplyError` takes no context.Context; its 3 sibling operations take one · ×1
  • `cgminer.ReplyError` takes no context.Context; its 3 sibling operations take one sidechain-orchestrator/cgminer/cgminer.go:66 — 3 of 4 fallible operations of `package cgminer` take a `ctx context.Context` (3 of 4). Siblings: cgminer.Command (sidechain-orchestrator/cgminer/cgminer.go:40); cgminer.ReadDevice (sidechain-orchestrator/cgminer/cgminer.go:142); cgminer.SetWorkMode (sidechain-orchestrator/cgminer/cgminer.go:163). Take `ctx context.Context` as the first parameter, like its siblings, and pass it on. [rule A1]
D22 · Internal API Consistency · `BinaryDirConfig.RootDirNetwork` signals absence with a bare `T` (the zero value when absent) where its 3 sibling single-key reads use `(T, error)` (an error when absent) · ×1
  • `BinaryDirConfig.RootDirNetwork` signals absence with a bare `T` (the zero value when absent) where its 3 sibling single-key reads use `(T, error)` (an error when absent) sidechain-orchestrator/config/binaries.go:87 — 3 of 4 single-key reads of `BinaryDirConfig` return `(T, error)` (an error when absent) (3 of 4). Siblings: BinaryDirConfig.ResolveBinaryPath (sidechain-orchestrator/config/binaries.go:857); BinaryDirConfig.BinaryVersion (sidechain-orchestrator/config/binaries.go:917); BinaryDirConfig.CalculateHash (sidechain-orchestrator/config/binaries.go:938). Return `(T, error)` (an error when absent) like its siblings. [rule A5]
D22 · Internal API Consistency · `config.AllDirConfigs` returns a map (`map[K]V`) where its 7 siblings return a slice (`[]T`) · ×1
  • `config.AllDirConfigs` returns a map (`map[K]V`) where its 7 siblings return a slice (`[]T`) sidechain-orchestrator/config/binaries.go:259 — 7 of 8 collection-returning members of `package config` return a slice (`[]T`) (7 of 8). Siblings: config.GetMatchingFilesInDir (sidechain-orchestrator/config/binaries.go:317); config.GetExistingFilesInDir (sidechain-orchestrator/config/binaries.go:334); config.WithElectrumFallback (sidechain-orchestrator/config/enforcer_conf.go:480); config.MainchainReaderArgs (sidechain-orchestrator/config/mainchain_reader.go:59); config.AllNetworks (sidechain-orchestrator/config/network.go:36). Return a slice (`[]T`). [rule A4]
D22 · Internal API Consistency · `ElectrumBackend.DetectScriptKind` signals absence with comma-ok `(T, bool)` where its 5 sibling single-key reads use `(T, error)` (an error when absent) · ×1
  • `ElectrumBackend.DetectScriptKind` signals absence with comma-ok `(T, bool)` where its 5 sibling single-key reads use `(T, error)` (an error when absent) sidechain-orchestrator/wallet/detect_script_kind.go:45 — 5 of 6 single-key reads of `ElectrumBackend` return `(T, error)` (an error when absent) (5 of 6). Siblings: ElectrumBackend.BroadcastRaw (sidechain-orchestrator/wallet/address_reads.go:83); ElectrumBackend.FeeRateForTarget (sidechain-orchestrator/wallet/electrum_backend.go:236); ElectrumBackend.FinalizePSBT (sidechain-orchestrator/wallet/electrum_backend.go:1470); ElectrumBackend.TxStatus (sidechain-orchestrator/wallet/electrum_backend.go:2064); ElectrumBackend.SetServerURL (sidechain-orchestrator/wallet/electrum_backend.go:2116). Return `(T, error)` (an error when absent) like its siblings. [rule A5]
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: combine_broadcast_modal.dart, create_multisig_modal.dart, fund_group_modal.dart, import_psbt_modal.dart, import_txid_modal.dart, multisig_key_modal.dart, psbt_coordinator_modal.dart bitwindow/lib/widgets/combine_broadcast_modal.dart — 7 files — `bitwindow/lib/widgets/combine_broadcast_modal.dart`, `bitwindow/lib/widgets/create_multisig_modal.dart`, `bitwindow/lib/widgets/fund_group_modal.dart`, `bitwindow/lib/widgets/import_psbt_modal.dart`, `bitwindow/lib/widgets/import_txid_modal.dart`, `bitwindow/lib/widgets/multisig_key_modal.dart`, `bitwindow/lib/widgets/psbt_coordinator_modal.dart` — all change together with no explicit dependency: a fully-connected co-change clique, not 21 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (6 members, 26 shared lines) · ×1
  • Near-duplicate member family (6 members, 26 shared lines) sidechain-orchestrator/sidechain/bitassets/client.go:55 — sidechain-orchestrator/sidechain/bitassets/client.go:55-93 | sidechain-orchestrator/sidechain/bitnames/client.go:57-103 | sidechain-orchestrator/sidechain/coinshift/client.go:67-108 | sidechain-orchestrator/sidechain/photon/client.go:55-93 | sidechain-orchestrator/sidechain/thunder/client.go:55-93 | sidechain-orchestrator/sidechain/truthcoin/client.go:67-108 — These 6 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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 · Near-duplicate member family (4 members, 40 shared lines) · ×1
  • Near-duplicate member family (4 members, 40 shared lines) bitwindow/lib/pages/wallet/cash_check_page.dart:157 — bitwindow/lib/pages/wallet/cash_check_page.dart:157-211 | bitwindow/lib/pages/wallet/check_detail_page.dart:194-248 | bitwindow/lib/pages/wallet/create_check_page.dart:141-195 | bitwindow/lib/widgets/claim_ecx_card.dart:216-272 — These 4 members are variants of one another: a block of 40 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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 · Near-duplicate member family (4 members, 39 shared lines) · ×1
  • Near-duplicate member family (4 members, 39 shared lines) bitwindow/lib/dialogs/paper_check_dialog.dart:481 — bitwindow/lib/dialogs/paper_check_dialog.dart:481-561 | bitwindow/lib/dialogs/paper_check_dialog.dart:578-689 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:259-339 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:356-467 — These 4 members are variants of one another: a block of 39 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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 · Near-duplicate member pair (84 shared lines) · ×1
  • Near-duplicate member pair (84 shared lines) bitwindow/lib/dialogs/paper_check_dialog.dart:171 — bitwindow/lib/dialogs/paper_check_dialog.dart:171-466 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:86-244 — These two members are variants of one another: 84 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 (31 shared lines) · ×1
  • Near-duplicate member pair (31 shared lines) bitassets/lib/pages/tabs/reserve_register_page.dart:623 — bitassets/lib/pages/tabs/reserve_register_page.dart:623-673 | bitnames/lib/pages/tabs/reserve_register_page.dart:679-720 — These two members are variants of one another: 31 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 (21 shared lines) · ×1
  • Near-duplicate member pair (21 shared lines) sidechain-orchestrator/stratum/cpu.go:297 — sidechain-orchestrator/stratum/cpu.go:297-357 | sidechain-orchestrator/stratum/pool.go:401-468 — These two members are variants of one another: 21 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×1
  • Edited copy of a member (54 corresponding lines) bitwindow/lib/pages/explorer/m4_explorer_page.dart:25 — bitwindow/lib/pages/explorer/m4_explorer_page.dart:25-278 | bitwindow/lib/pages/sidechain_activation_management_page.dart:14-72 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (17 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (17 members, 50+ identical tokens) sidechain-orchestrator/api/deposit.go:28 — sidechain-orchestrator/api/deposit.go:28-89 | sidechain-orchestrator/api/wallet_handler.go:627-640 | sidechain-orchestrator/api/wallet_handler.go:662-684 | sidechain-orchestrator/api/wallet_handler.go:686-698 | sidechain-orchestrator/api/wallet_handler.go:800-826 | sidechain-orchestrator/api/wallet_handler.go:828-858 | sidechain-orchestrator/api/wallet_handler.go:959-1058 | sidechain-orchestrator/api/wallet_handler.go:1066-1142 | sidechain-orchestrator/api/wallet_handler.go:1144-1207 | sidechain-orchestrator/api/wallet_handler.go:1253-1311 | sidechain-orchestrator/api/wallet_handler.go:1353-1390 | sidechain-orchestrator/api/wallet_handler.go:1392-1506 | sidechain-orchestrator/api/wallet_handler.go:1705-1735 | sidechain-orchestrator/api/wallet_handler.go:1737-1796 | sidechain-orchestrator/api/wallet_handler.go:1845-1878 | sidechain-orchestrator/api/wallet_handler.go:2421-2452 | sidechain-orchestrator/api/wallet_handler.go:2454-2467 — These 17 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 17 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 17 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) bbc/macos/Runner/MainFlutterWindow.swift:6 — bbc/macos/Runner/MainFlutterWindow.swift:6-20 | bitassets/macos/Runner/MainFlutterWindow.swift:6-20 | bitnames/macos/Runner/MainFlutterWindow.swift:6-20 | coinshift/macos/Runner/MainFlutterWindow.swift:6-20 | photon/macos/Runner/MainFlutterWindow.swift:6-20 | thunder/macos/Runner/MainFlutterWindow.swift:6-20 | truthcoin/macos/Runner/MainFlutterWindow.swift:6-20 | zside/macos/Runner/MainFlutterWindow.swift:6-20 — These 8 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 8 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 8 times.
D4 · Code Duplication · Edited copies of one member (5 members, 55+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 55+ corresponding lines) bbc/lib/widgets/homepage_widget_catalog.dart:281 — bbc/lib/widgets/homepage_widget_catalog.dart:281-335 | coinshift/lib/widgets/homepage_widget_catalog.dart:424-478 | photon/lib/widgets/homepage_widget_catalog.dart:301-355 | thunder/lib/widgets/homepage_widget_catalog.dart:304-358 | truthcoin/lib/widgets/homepage_widget_catalog.dart:314-368 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (93 corresponding lines) · ×1
  • Edited copy of a member (93 corresponding lines) sail_ui/lib/pages/enforcer_conf_editor_page.dart:25 — sail_ui/lib/pages/enforcer_conf_editor_page.dart:25-117 | sail_ui/lib/shell/sidechain_conf_editor_page.dart:26-123 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (101 corresponding lines) · ×1
  • Edited copy of a member (101 corresponding lines) sail_ui/lib/pages/datadir_setup_page.dart:117 — sail_ui/lib/pages/datadir_setup_page.dart:117-217 | sail_ui/lib/pages/network_switch_page.dart:70-173 — These two members are one piece of code written twice and then edited apart: 101 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (87 corresponding lines) · ×1
  • Edited copy of a member (87 corresponding lines) bitwindow/lib/pages/settings/settings_reset.dart:62 — bitwindow/lib/pages/settings/settings_reset.dart:62-168 | sail_ui/lib/pages/settings_reset.dart:52-138 — These two members are one piece of code written twice and then edited apart: 87 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) bitwindow/lib/providers/multisig_provider.dart:968 — bitwindow/lib/providers/multisig_provider.dart:968-1035 | bitwindow/lib/providers/multisig_provider.dart:1037-1102 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 79+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 79+ corresponding lines) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:427 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:427-515 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:415-501 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:600-679 | zside/lib/widgets/homepage_widget_catalog.dart:605-683 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 79 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (74 corresponding lines) · ×1
  • Edited copy of a member (74 corresponding lines) bitassets/lib/pages/tabs/reserve_register_page.dart:715 — bitassets/lib/pages/tabs/reserve_register_page.dart:715-788 | bitnames/lib/pages/tabs/reserve_register_page.dart:785-864 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (75 corresponding lines) · ×1
  • Edited copy of a member (75 corresponding lines) bitwindow/lib/dialogs/change_password_dialog.dart:93 — bitwindow/lib/dialogs/change_password_dialog.dart:93-167 | bitwindow/lib/dialogs/encrypt_wallet_dialog.dart:75-159 — These two members are one piece of code written twice and then edited apart: 75 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (71 corresponding lines) · ×1
  • Edited copy of a member (71 corresponding lines) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:120 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:120-192 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:200-270 — These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) sail_ui/lib/widgets/components/progress_step_tile.dart:18 — sail_ui/lib/widgets/components/progress_step_tile.dart:18-75 | sail_ui/lib/widgets/dialogs/network_swap_progress_dialog.dart:155-211 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×1
  • Edited copy of a member (58 corresponding lines) bitwindow/lib/pages/wallet/cash_check_page.dart:86 — bitwindow/lib/pages/wallet/cash_check_page.dart:86-155 | bitwindow/lib/pages/wallet/create_check_page.dart:82-139 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) bitwindow/lib/pages/wallet/denability_page.dart:77 — bitwindow/lib/pages/wallet/denability_page.dart:77-130 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:683-730 — 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 (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) sail_ui/lib/widgets/config_editor/configurator_panel.dart:94 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:94-144 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:68-114 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 45+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 45+ corresponding lines) sail_ui/lib/pages/bitcoin_conf_editor_page.dart:124 — sail_ui/lib/pages/bitcoin_conf_editor_page.dart:124-168 | sail_ui/lib/pages/enforcer_conf_editor_page.dart:150-194 | sail_ui/lib/shell/sidechain_conf_editor_page.dart:131-183 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 45 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) bitwindow/lib/pages/overview_page.dart:1296 — bitwindow/lib/pages/overview_page.dart:1296-1333 | bitwindow/lib/pages/wallet/check_detail_page.dart:74-112 — 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 (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) sail_ui/lib/widgets/containers/sail_popover.dart:131 — sail_ui/lib/widgets/containers/sail_popover.dart:131-170 | sail_ui/lib/widgets/containers/sail_popover.dart:172-211 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) bitwindow/lib/signing/psbt_signer.dart:73 — bitwindow/lib/signing/psbt_signer.dart:73-103 | bitwindow/lib/widgets/draft_panel.dart:192-220 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 43+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 43+ corresponding lines) zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:187 — zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:187-235 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:356-401 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:511-568 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:670-714 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:792-840 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1122-1164 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1241-1283 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 43 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) bitwindow/lib/widgets/proof_of_funds_modal.dart:92 — bitwindow/lib/widgets/proof_of_funds_modal.dart:92-145 | bitwindow/lib/widgets/proof_of_funds_modal.dart:365-407 — 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 copies of one member (3 members, 36+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 36+ corresponding lines) sidechain-orchestrator/config/bitcoin_config_syncer.go:683 — sidechain-orchestrator/config/bitcoin_config_syncer.go:683-718 | sidechain-orchestrator/config/enforcer_conf.go:542-579 | sidechain-orchestrator/config/sidechain_conf.go:562-597 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 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 (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) bitwindow/lib/main.dart:654 — bitwindow/lib/main.dart:654-698 | sail_ui/lib/pages/shutdown_page.dart:127-180 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 29+ corresponding lines) sail_ui/lib/widgets/core/sail_text.dart:127 — sail_ui/lib/widgets/core/sail_text.dart:127-155 | sail_ui/lib/widgets/core/sail_text.dart:210-238 | sail_ui/lib/widgets/core/sail_text.dart:283-313 | sail_ui/lib/widgets/core/sail_text.dart:389-417 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) sidechain-orchestrator/config/bitcoin_config_syncer.go:647 — sidechain-orchestrator/config/bitcoin_config_syncer.go:647-671 | sidechain-orchestrator/config/enforcer_conf.go:506-530 | sidechain-orchestrator/config/sidechain_conf.go:527-551 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) bitassets/lib/bitassets_module.dart:48 — bitassets/lib/bitassets_module.dart:48-74 | truthcoin/lib/truthcoin_module.dart:50-65 | zside/lib/zside_module.dart:49-63 — 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, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) bitwindow/lib/pages/chat_page.dart:445 — bitwindow/lib/pages/chat_page.dart:445-474 | bitwindow/lib/pages/sidechains_page.dart:234-265 | coinshift/lib/widgets/swap/swap_list.dart:213-232 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) bitwindow/lib/pages/debug_window.dart:167 — bitwindow/lib/pages/debug_window.dart:167-197 | bitwindow/lib/pages/debug_window.dart:484-515 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:279-299 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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, 19+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 19+ corresponding lines) bitwindow/server/models/bip47/store.go:62 — bitwindow/server/models/bip47/store.go:62-93 | bitwindow/server/models/cheques/cheques.go:247-273 | bitwindow/server/models/cheques/cheques.go:339-361 | bitwindow/server/models/cheques/cheques.go:367-385 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 23+ corresponding lines) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:546 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:546-568 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:387-413 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:576-598 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 19+ corresponding lines) sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:48 — sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:48-66 | sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart:56-75 | sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart:94-123 | sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart:48-66 | sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart:84-109 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 14+ corresponding lines) sidechain-orchestrator/config/enforcer_conf.go:170 — sidechain-orchestrator/config/enforcer_conf.go:170-184 | sidechain-orchestrator/config/enforcer_conf.go:264-277 | sidechain-orchestrator/config/sidechain_conf.go:351-364 | sidechain-orchestrator/config/sidechain_conf.go:475-488 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 19+ corresponding lines) sail_ui/lib/widgets/core/sail_text.dart:42 — sail_ui/lib/widgets/core/sail_text.dart:42-62 | sail_ui/lib/widgets/core/sail_text.dart:64-83 | sail_ui/lib/widgets/core/sail_text.dart:85-104 | sail_ui/lib/widgets/core/sail_text.dart:106-125 | sail_ui/lib/widgets/core/sail_text.dart:263-281 | sail_ui/lib/widgets/core/sail_text.dart:347-366 | sail_ui/lib/widgets/core/sail_text.dart:368-387 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 15+ corresponding lines) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:347 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:347-361 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:652-668 | zside/lib/widgets/homepage_widget_catalog.dart:538-552 | zside/lib/widgets/homepage_widget_catalog.dart:880-896 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 10+ corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:2029 — sidechain_core/lib/rpcs/bitwindow_api.dart:2029-2038 | sidechain_core/lib/rpcs/bitwindow_api.dart:2040-2049 | sidechain_core/lib/rpcs/bitwindow_api.dart:2051-2060 | sidechain_core/lib/rpcs/bitwindow_api.dart:2062-2071 | sidechain_core/lib/rpcs/bitwindow_api.dart:2073-2082 | sidechain_core/lib/rpcs/bitwindow_api.dart:2094-2103 | sidechain_core/lib/rpcs/bitwindow_api.dart:2105-2114 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 10+ corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:789 — sidechain_core/lib/rpcs/bitwindow_api.dart:789-798 | sidechain_core/lib/rpcs/bitwindow_api.dart:800-809 | sidechain_core/lib/rpcs/bitwindow_api.dart:811-820 | sidechain_core/lib/rpcs/bitwindow_api.dart:822-831 | sidechain_core/lib/rpcs/bitwindow_api.dart:833-846 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:952 — sidechain_core/lib/rpcs/bitwindow_api.dart:952-963 | sidechain_core/lib/rpcs/bitwindow_api.dart:987-996 | sidechain_core/lib/rpcs/bitwindow_api.dart:1105-1116 | sidechain_core/lib/rpcs/bitwindow_api.dart:1179-1188 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 13+ corresponding lines) bitwindow/server/engines/deposit_dropped_engine.go:47 — bitwindow/server/engines/deposit_dropped_engine.go:47-64 | sidechain-orchestrator/engines/bip47_engine.go:87-99 | sidechain-orchestrator/engines/deposit_watch_engine.go:74-89 | sidechain-orchestrator/engines/seed_peer_engine.go:50-64 | sidechain-orchestrator/engines/split_engine.go:101-115 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) sidechain_core/lib/rpcs/bitwindow_api.dart:1857 — sidechain_core/lib/rpcs/bitwindow_api.dart:1857-1865 | sidechain_core/lib/rpcs/bitwindow_api.dart:1876-1884 | sidechain_core/lib/rpcs/bitwindow_api.dart:1910-1918 | sidechain_core/lib/rpcs/bitwindow_api.dart:1939-1949 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) bitassets/lib/pages/tabs/amm_page.dart:440 — bitassets/lib/pages/tabs/amm_page.dart:440-444 | bitassets/lib/pages/tabs/auction_browser_page.dart:590-594 | bitassets/lib/widgets/portfolio_dashboard.dart:525-531 — 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 (4 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 6+ corresponding lines) bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:335 — bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:335-343 | bitwindow/lib/pages/wallet/wallet_checks.dart:269-274 | bitwindow/lib/providers/notification_stream_provider.dart:168-173 | bitwindow/lib/widgets/draft_panel.dart:808-813 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×1
  • Edited copy of a member (2 corresponding lines) zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:299 — zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:299-300 | zside/lib/pages/tabs/zside/zside_shield_deshield_page.dart:90-91 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 4+ corresponding lines) sidechain-orchestrator/sidechain/bitnames/client.go:158 — sidechain-orchestrator/sidechain/bitnames/client.go:158-161 | sidechain-orchestrator/sidechain/photon/client.go:148-151 | sidechain-orchestrator/sidechain/thunder/client.go:148-151 | sidechain-orchestrator/sidechain/truthcoin/client.go:158-161 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (110 lines × 2) · ×1
  • Duplicated block (110 lines × 2) bitwindow/lib/dialogs/paper_check_dialog.dart:580 — bitwindow/lib/dialogs/paper_check_dialog.dart:580-689 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:358-467 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (64 lines × 2) · ×1
  • Duplicated block (64 lines × 2) sail_ui/lib/widgets/config_editor/working_config_panel.dart:58 — sail_ui/lib/widgets/config_editor/working_config_panel.dart:58-121 | sail_ui/lib/widgets/enforcer_config_editor/working_config_panel.dart:58-121 — `sail_ui/lib/widgets/config_editor/working_config_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/working_config_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 77 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (55 lines × 2) · ×1
  • Duplicated block (55 lines × 2) bitwindow/lib/dialogs/paper_check_dialog.dart:499 — bitwindow/lib/dialogs/paper_check_dialog.dart:499-553 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:277-331 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 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 `bitwindow/lib/dialogs/paper_check_dialog.dart:499` 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 (54 lines × 3) · ×1
  • Duplicated block (54 lines × 3) bitwindow/lib/pages/wallet/cash_check_page.dart:158 — bitwindow/lib/pages/wallet/cash_check_page.dart:158-211 | bitwindow/lib/pages/wallet/check_detail_page.dart:195-248 | bitwindow/lib/pages/wallet/create_check_page.dart:142-195 — before extracting anything, compare `bitwindow/lib/pages/wallet/cash_check_page.dart` and `bitwindow/lib/pages/wallet/check_detail_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (46–50 lines × 2) · ×1
  • Duplicated block (46–50 lines × 2) zside/lib/pages/tabs/zside/zside_transfer_page.dart:415 — zside/lib/pages/tabs/zside/zside_transfer_page.dart:415-464 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:600-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/pages/tabs/zside/zside_transfer_page.dart:415` it does not close everything it opens, so those 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, `zside/lib/pages/tabs/zside/zside_transfer_page.dart:646` calls `getCastColor`, `of` and `zside/lib/pages/tabs/zside/zside_transfer_page.dart:465` 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 (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) bitwindow/lib/pages/explorer/m4_explorer_page.dart:25 — bitwindow/lib/pages/explorer/m4_explorer_page.dart:25-73 | bitwindow/lib/pages/sidechain_activation_management_page.dart:14-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/explorer/m4_explorer_page.dart:25` it does not close everything it opens, so those 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 (39–40 lines × 3) · ×1
  • Duplicated block (39–40 lines × 3) bitwindow/lib/dialogs/merkle_tree_dialog.dart:103 — bitwindow/lib/dialogs/merkle_tree_dialog.dart:103-142 | bitwindow/lib/dialogs/paper_check_dialog.dart:171-209 | bitwindow/lib/dialogs/paper_wallet_dialog.dart:86-125 — before extracting anything, compare `bitwindow/lib/dialogs/paper_check_dialog.dart` and `bitwindow/lib/dialogs/paper_wallet_dialog.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 315 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 `bitwindow/lib/dialogs/merkle_tree_dialog.dart:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37–40 lines × 2) · ×1
  • Duplicated block (37–40 lines × 2) sail_ui/lib/pages/enforcer_conf_editor_page.dart:53 — sail_ui/lib/pages/enforcer_conf_editor_page.dart:53-92 | sail_ui/lib/shell/sidechain_conf_editor_page.dart:61-97 — before extracting anything, compare `sail_ui/lib/pages/enforcer_conf_editor_page.dart` and `sail_ui/lib/shell/sidechain_conf_editor_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 68 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 `sail_ui/lib/pages/enforcer_conf_editor_page.dart:53` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) truthcoin/lib/widgets/homepage_widget_catalog.dart:546 — truthcoin/lib/widgets/homepage_widget_catalog.dart:546-585 | truthcoin/lib/widgets/trading_position_widget.dart:248-287 — before extracting anything, compare `truthcoin/lib/widgets/homepage_widget_catalog.dart` and `truthcoin/lib/widgets/trading_position_widget.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 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 `truthcoin/lib/widgets/homepage_widget_catalog.dart:546` 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 (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) bitnames/lib/pages/tabs/reserve_register_page.dart:32 — bitnames/lib/pages/tabs/reserve_register_page.dart:32-70 | bitnames/lib/pages/tabs/reserve_register_page.dart:339-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitnames/lib/pages/tabs/reserve_register_page.dart:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) sail_ui/lib/pages/l1_restart_page.dart:93 — sail_ui/lib/pages/l1_restart_page.dart:93-130 | sail_ui/lib/pages/utxo_snapshot_page.dart:113-150 — before extracting anything, compare `sail_ui/lib/pages/l1_restart_page.dart` and `sail_ui/lib/pages/utxo_snapshot_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 113 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 `sail_ui/lib/pages/l1_restart_page.dart:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36–37 lines × 2) · ×1
  • Duplicated block (36–37 lines × 2) sail_ui/lib/widgets/config_editor/configurator_panel.dart:94 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:94-130 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:68-103 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/config_editor/configurator_panel.dart:94` it does not close everything it opens, so those 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 (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1128 — zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1128-1164 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1247-1283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:1128` 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 (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) sail_ui/lib/pages/bitcoin_conf_editor_page.dart:24 — sail_ui/lib/pages/bitcoin_conf_editor_page.dart:24-58 | sail_ui/lib/pages/enforcer_conf_editor_page.dart:25-59 — before extracting anything, compare `sail_ui/lib/pages/bitcoin_conf_editor_page.dart` and `sail_ui/lib/pages/enforcer_conf_editor_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 90 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 `sail_ui/lib/pages/bitcoin_conf_editor_page.dart:24` it does not close everything it opens, so those 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 (2–34 lines × 12) · ×1
  • Duplicated block (2–34 lines × 12) bbc/lib/widgets/homepage_widget_catalog.dart:302 — bbc/lib/widgets/homepage_widget_catalog.dart:302-335 | bitwindow/lib/pages/overview_page.dart:1635-1638 | bitwindow/lib/pages/wallet/wallet_receive.dart:322-323 | bitwindow/lib/pages/wallet/wallet_receive.dart:325-328 | bitwindow/lib/pages/wallet/wallet_utxos.dart:441-442 | bitwindow/lib/pages/wallet/wallet_utxos.dart:444-447 | bitwindow/lib/widgets/peers_table_widget.dart:153-154 | bitwindow/lib/widgets/peers_table_widget.dart:155-158 | coinshift/lib/widgets/homepage_widget_catalog.dart:445-478 | photon/lib/widgets/homepage_widget_catalog.dart:322-355 | thunder/lib/widgets/homepage_widget_catalog.dart:325-358 | truthcoin/lib/widgets/homepage_widget_catalog.dart:335-368 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 `bbc/lib/widgets/homepage_widget_catalog.dart:302` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `name` to `'Address'` in one and `'Height'` 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, `bitwindow/lib/pages/wallet/wallet_receive.dart:322` calls `SailTableHeaderCell`, `onSort` and `bitwindow/lib/pages/wallet/wallet_receive.dart:321` 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 (32–34 lines × 3) · ×1
  • Duplicated block (32–34 lines × 3) sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:137 — sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:137-168 | sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart:249-282 | sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart:157-188 — 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. 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 (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) sail_ui/lib/widgets/config_editor/actual_config_panel.dart:56 — sail_ui/lib/widgets/config_editor/actual_config_panel.dart:56-88 | sail_ui/lib/widgets/enforcer_config_editor/actual_config_panel.dart:56-88 — `sail_ui/lib/widgets/config_editor/actual_config_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/actual_config_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 75 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (29–31 lines × 2) · ×1
  • Duplicated block (29–31 lines × 2) bitwindow/lib/pages/root_page.dart:1471 — bitwindow/lib/pages/root_page.dart:1471-1499 | bitwindow/lib/pages/root_page.dart:1524-1554 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/root_page.dart:1471` 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 (26 lines × 6) · ×1
  • Duplicated block (26 lines × 6) bbc/lib/widgets/homepage_widget_catalog.dart:342 — bbc/lib/widgets/homepage_widget_catalog.dart:342-367 | coinshift/lib/widgets/homepage_widget_catalog.dart:485-510 | photon/lib/widgets/homepage_widget_catalog.dart:362-387 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:836-861 | thunder/lib/widgets/homepage_widget_catalog.dart:365-390 | truthcoin/lib/widgets/homepage_widget_catalog.dart:375-400 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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.
D4 · Code Duplication · Duplicated block (19–25 lines × 2) · ×1
  • Duplicated block (19–25 lines × 2) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:718 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:718-742 | bitwindow/lib/pages/explorer/widgets/transaction_flow_diagram.dart:346-364 — 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 `bitwindow/lib/pages/explorer/block_explorer_dialog.dart:718` 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 (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) sail_ui/lib/pages/datadir_setup_page.dart:125 — sail_ui/lib/pages/datadir_setup_page.dart:125-148 | sail_ui/lib/pages/network_switch_page.dart:79-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/pages/datadir_setup_page.dart:125` 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 (22–25 lines × 2) · ×1
  • Duplicated block (22–25 lines × 2) sail_ui/lib/widgets/config_editor/configurator_panel.dart:214 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:214-238 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:166-187 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/config_editor/configurator_panel.dart:214` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (24 lines × 6) · ×1
  • Duplicated block (24 lines × 6) bbc/lib/bbc_module.dart:44 — bbc/lib/bbc_module.dart:44-67 | coinshift/lib/coinshift_module.dart:59-82 | photon/lib/photon_module.dart:41-64 | thunder/lib/thunder_module.dart:41-64 | truthcoin/lib/truthcoin_module.dart:82-105 | zside/lib/zside_module.dart:74-97 — before extracting anything, compare `bbc/lib/bbc_module.dart` and `coinshift/lib/coinshift_module.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24 lines × 4) · ×1
  • Duplicated block (24 lines × 4) bitwindow/lib/pages/wallet/cash_check_page.dart:187 — bitwindow/lib/pages/wallet/cash_check_page.dart:187-210 | bitwindow/lib/pages/wallet/check_detail_page.dart:224-247 | bitwindow/lib/pages/wallet/create_check_page.dart:171-194 | bitwindow/lib/widgets/claim_ecx_card.dart:247-270 — before extracting anything, compare `bitwindow/lib/pages/wallet/cash_check_page.dart` and `bitwindow/lib/pages/wallet/check_detail_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 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 `bitwindow/lib/pages/wallet/cash_check_page.dart:187` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 5) · ×1
  • Duplicated block (23 lines × 5) bbc/lib/widgets/homepage_widget_catalog.dart:257 — bbc/lib/widgets/homepage_widget_catalog.dart:257-279 | coinshift/lib/widgets/homepage_widget_catalog.dart:400-422 | photon/lib/widgets/homepage_widget_catalog.dart:277-299 | thunder/lib/widgets/homepage_widget_catalog.dart:280-302 | truthcoin/lib/widgets/homepage_widget_catalog.dart:290-312 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 `bbc/lib/widgets/homepage_widget_catalog.dart:257` 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) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:395 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:395-417 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:491-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 `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:395` 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 lines × 6) · ×1
  • Duplicated block (21 lines × 6) bitassets/lib/pages/tabs/dutch_auction_page.dart:332 — bitassets/lib/pages/tabs/dutch_auction_page.dart:332-352 | bitassets/lib/pages/tabs/reserve_register_page.dart:537-557 | bitnames/lib/pages/tabs/reserve_register_page.dart:574-594 | bitwindow/lib/pages/explorer/block_explorer_dialog.dart:227-247 | bitwindow/lib/pages/wallet/wallet_page.dart:408-428 | zside/lib/widgets/homepage_widget_catalog.dart:722-742 — before extracting anything, compare `bitassets/lib/pages/tabs/dutch_auction_page.dart` and `bitassets/lib/pages/tabs/reserve_register_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 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 `bitassets/lib/pages/tabs/dutch_auction_page.dart:332` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) bitwindow/lib/pages/debug_window.dart:521 — bitwindow/lib/pages/debug_window.dart:521-541 | bitwindow/lib/pages/debug_window.dart:573-593 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:306-326 — before extracting anything, compare `bitwindow/lib/pages/debug_window.dart` and `sail_ui/lib/widgets/debug/sidechain_debug_window.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 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 `bitwindow/lib/pages/debug_window.dart:521` it does not close everything it opens, so those 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, `bitwindow/lib/pages/debug_window.dart:593` calls `SailTableHeaderCell` and `bitwindow/lib/pages/debug_window.dart:541` 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 (18–21 lines × 2) · ×1
  • Duplicated block (18–21 lines × 2) bitwindow/lib/main.dart:662 — bitwindow/lib/main.dart:662-679 | sail_ui/lib/pages/shutdown_page.dart:138-158 — 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 `bitwindow/lib/main.dart:662` it does not close everything it opens, so those 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–21 lines × 2) · ×1
  • Duplicated block (17–21 lines × 2) sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:445 — sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:445-465 | zside/lib/widgets/homepage_widget_catalog.dart:630-646 — before extracting anything, compare `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` and `zside/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 153 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 `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:445` it does not close everything it opens, so those 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–21 lines × 2) · ×1
  • Duplicated block (13–21 lines × 2) sail_ui/lib/shell/sidechain_home_page.dart:182 — sail_ui/lib/shell/sidechain_home_page.dart:182-194 | sail_ui/lib/shell/sidechain_home_page.dart:218-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/shell/sidechain_home_page.dart:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `label` to `'Console'` in one and `'Settings'` 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 (25 lines × 5) · ×1
  • Duplicated block (25 lines × 5) bbc/lib/widgets/homepage_widget_catalog.dart:281 — bbc/lib/widgets/homepage_widget_catalog.dart:281-305 | coinshift/lib/widgets/homepage_widget_catalog.dart:424-448 | photon/lib/widgets/homepage_widget_catalog.dart:301-325 | thunder/lib/widgets/homepage_widget_catalog.dart:304-328 | truthcoin/lib/widgets/homepage_widget_catalog.dart:314-338 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 `bbc/lib/widgets/homepage_widget_catalog.dart: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.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) sail_ui/lib/pages/bitcoin_conf_editor_page.dart:45 — sail_ui/lib/pages/bitcoin_conf_editor_page.dart:45-64 | sail_ui/lib/pages/enforcer_conf_editor_page.dart:46-65 | sail_ui/lib/shell/sidechain_conf_editor_page.dart:54-72 — before extracting anything, compare `sail_ui/lib/pages/bitcoin_conf_editor_page.dart` and `sail_ui/lib/pages/enforcer_conf_editor_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 90 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 `sail_ui/lib/shell/sidechain_conf_editor_page.dart: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.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) sail_ui/lib/widgets/debug/sidechain_debug_window.dart:164 — sail_ui/lib/widgets/debug/sidechain_debug_window.dart:164-183 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:479-496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/debug/sidechain_debug_window.dart:164` it does not close everything it opens, so those 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 lines × 5) · ×1
  • Duplicated block (19 lines × 5) sidechain_core/lib/rpcs/coinshift_rpc.dart:148 — sidechain_core/lib/rpcs/coinshift_rpc.dart:148-166 | sidechain_core/lib/rpcs/photon_rpc.dart:106-124 | sidechain_core/lib/rpcs/thunder_rpc.dart:100-118 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:299-317 | sidechain_core/lib/rpcs/zside_rpc.dart:148-166 — before extracting anything, compare `sidechain_core/lib/rpcs/coinshift_rpc.dart` and `sidechain_core/lib/rpcs/photon_rpc.dart` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 150 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 `sidechain_core/lib/rpcs/coinshift_rpc.dart:148` 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 (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) sail_ui/lib/widgets/inputs/checkbox.dart:138 — sail_ui/lib/widgets/inputs/checkbox.dart:138-155 | sail_ui/lib/widgets/inputs/radio_button.dart:146-164 — 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 `sail_ui/lib/widgets/inputs/checkbox.dart:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–18 lines × 7) · ×1
  • Duplicated block (15–18 lines × 7) bitassets/lib/pages/tabs/dutch_auction_page.dart:328 — bitassets/lib/pages/tabs/dutch_auction_page.dart:328-345 | bitassets/lib/pages/tabs/reserve_register_page.dart:533-550 | bitnames/lib/pages/tabs/reserve_register_page.dart:570-587 | bitwindow/lib/pages/explorer/block_explorer_dialog.dart:223-240 | bitwindow/lib/pages/wallet/wallet_page.dart:404-421 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:558-572 | zside/lib/widgets/homepage_widget_catalog.dart:718-735 — before extracting anything, compare `bitassets/lib/pages/tabs/dutch_auction_page.dart` and `bitassets/lib/pages/tabs/reserve_register_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 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 `bitassets/lib/pages/tabs/dutch_auction_page.dart:328` it does not close everything it opens, so those 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 (18 lines × 5) · ×1
  • Duplicated block (18 lines × 5) bbc/lib/widgets/homepage_widget_catalog.dart:182 — bbc/lib/widgets/homepage_widget_catalog.dart:182-199 | coinshift/lib/widgets/homepage_widget_catalog.dart:326-343 | photon/lib/widgets/homepage_widget_catalog.dart:202-219 | thunder/lib/widgets/homepage_widget_catalog.dart:205-222 | truthcoin/lib/widgets/homepage_widget_catalog.dart:215-232 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 `bbc/lib/widgets/homepage_widget_catalog.dart:182` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–18 lines × 4) · ×1
  • Duplicated block (14–18 lines × 4) bitwindow/lib/pages/overview_page.dart:316 — bitwindow/lib/pages/overview_page.dart:316-329 | bitwindow/lib/pages/wallet/denability_page.dart:187-200 | bitwindow/lib/pages/wallet/wallet_overview.dart:289-306 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:771-784 — before extracting anything, compare `bitwindow/lib/pages/overview_page.dart` and `bitwindow/lib/pages/wallet/denability_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 `bitwindow/lib/pages/overview_page.dart:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bitwindow/lib/pages/wallet/denability_page.dart:200` calls `SailTableHeaderCell`, `onSort` and `bitwindow/lib/pages/wallet/wallet_overview.dart:306` 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 (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) bitwindow/lib/pages/wallet/cash_check_page.dart:123 — bitwindow/lib/pages/wallet/cash_check_page.dart:123-139 | bitwindow/lib/pages/wallet/create_check_page.dart:108-123 — before extracting anything, compare `bitwindow/lib/pages/wallet/cash_check_page.dart` and `bitwindow/lib/pages/wallet/create_check_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 142 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 `bitwindow/lib/pages/wallet/cash_check_page.dart:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 8) · ×1
  • Duplicated block (16 lines × 8) bitwindow/lib/widgets/hash_calculator_modal.dart:389 — bitwindow/lib/widgets/hash_calculator_modal.dart:389-404 | bitwindow/lib/widgets/hash_calculator_modal.dart:421-436 | bitwindow/lib/widgets/hash_calculator_modal.dart:453-468 | bitwindow/lib/widgets/hash_calculator_modal.dart:485-500 | bitwindow/lib/widgets/hash_calculator_modal.dart:517-532 | bitwindow/lib/widgets/hash_calculator_modal.dart:549-564 | bitwindow/lib/widgets/hash_calculator_modal.dart:567-582 | bitwindow/lib/widgets/hash_calculator_modal.dart:585-600 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bitwindow/lib/widgets/hash_calculator_modal.dart:385` calls `_buildHashResults` and `bitwindow/lib/widgets/hash_calculator_modal.dart:418` 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 (16 lines × 7) · ×1
  • Duplicated block (16 lines × 7) sidechain_core/lib/rpcs/bitassets_rpc.dart:264 — sidechain_core/lib/rpcs/bitassets_rpc.dart:264-279 | sidechain_core/lib/rpcs/bitnames_rpc.dart:191-206 | sidechain_core/lib/rpcs/coinshift_rpc.dart:144-159 | sidechain_core/lib/rpcs/photon_rpc.dart:102-117 | sidechain_core/lib/rpcs/thunder_rpc.dart:96-111 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:295-310 | sidechain_core/lib/rpcs/zside_rpc.dart:144-159 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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 `sidechain_core/lib/rpcs/bitassets_rpc.dart:264` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) bitwindow/lib/pages/wallet/cash_check_page.dart:161 — bitwindow/lib/pages/wallet/cash_check_page.dart:161-176 | bitwindow/lib/pages/wallet/check_detail_page.dart:198-213 | bitwindow/lib/pages/wallet/create_check_page.dart:145-160 | bitwindow/lib/widgets/claim_ecx_card.dart:221-236 — before extracting anything, compare `bitwindow/lib/pages/wallet/cash_check_page.dart` and `bitwindow/lib/pages/wallet/check_detail_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 94 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 `bitwindow/lib/pages/wallet/cash_check_page.dart:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 4) · ×1
  • Duplicated block (15–16 lines × 4) zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:186 — zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:186-201 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:157-172 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:326-341 | zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:768-782 — 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 `zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:186` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `zside/lib/widgets/containers/tabs/zside_tab_widgets.dart:784` calls `setBusy` and `zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart:201` 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 (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) bitwindow/lib/dialogs/change_password_dialog.dart:72 — bitwindow/lib/dialogs/change_password_dialog.dart:72-87 | bitwindow/lib/dialogs/remove_encryption_dialog.dart:49-61 — 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 `bitwindow/lib/dialogs/change_password_dialog.dart:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–15 lines × 3) · ×1
  • Duplicated block (12–15 lines × 3) bitwindow/lib/pages/debug_window.dart:167 — bitwindow/lib/pages/debug_window.dart:167-181 | bitwindow/lib/pages/debug_window.dart:484-498 | sail_ui/lib/widgets/debug/sidechain_debug_window.dart:279-290 — before extracting anything, compare `bitwindow/lib/pages/debug_window.dart` and `sail_ui/lib/widgets/debug/sidechain_debug_window.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 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 `bitwindow/lib/pages/debug_window.dart:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 3) · ×1
  • Duplicated block (15 lines × 3) bitwindow/lib/pages/settings/network_swap_page.dart:117 — bitwindow/lib/pages/settings/network_swap_page.dart:117-131 | sail_ui/lib/pages/datadir_select_page.dart:75-89 | sail_ui/lib/pages/l1_restart_page.dart:83-97 — before extracting anything, compare `bitwindow/lib/pages/settings/network_swap_page.dart` and `sail_ui/lib/pages/l1_restart_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `bitwindow/lib/pages/settings/network_swap_page.dart:117` 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 × 3) · ×1
  • Duplicated block (14–15 lines × 3) bitwindow/lib/widgets/coinnews.dart:27 — bitwindow/lib/widgets/coinnews.dart:27-40 | bitwindow/lib/widgets/fee_coinnews.dart:38-51 | bitwindow/lib/widgets/fee_coinnews.dart:215-229 — before extracting anything, compare `bitwindow/lib/widgets/coinnews.dart` and `bitwindow/lib/widgets/fee_coinnews.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 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 `bitwindow/lib/widgets/coinnews.dart:27` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 6) · ×1
  • Duplicated block (11–14 lines × 6) bitwindow/lib/pages/explorer/block_explorer_dialog.dart:123 — bitwindow/lib/pages/explorer/block_explorer_dialog.dart:123-133 | bitwindow/lib/pages/wallet/denability_page.dart:458-469 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:631-642 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:982-995 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:505-516 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:683-694 — before extracting anything, compare `bitwindow/lib/pages/wallet/denability_page.dart` and `zside/lib/pages/tabs/zside/zside_melt_cast_page.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 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 `bitwindow/lib/pages/explorer/block_explorer_dialog.dart: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. 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, `zside/lib/pages/tabs/zside/zside_transfer_page.dart:519` calls `DetailRow` and `zside/lib/pages/tabs/zside/zside_transfer_page.dart:697` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) bitwindow/lib/pages/overview_page.dart:321 — bitwindow/lib/pages/overview_page.dart:321-334 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:451-464 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:776-789 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:443-456 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:624-637 | zside/lib/widgets/homepage_widget_catalog.dart:632-645 — before extracting anything, compare `bitwindow/lib/pages/overview_page.dart` and `sail_ui/lib/pages/sidechains/sidechain_overview_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 `bitwindow/lib/pages/overview_page.dart:321` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:487 — sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:487-500 | sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:608-621 | sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart:140-153 — before extracting anything, compare `sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart` and `sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:487` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 9) · ×1
  • Duplicated block (13 lines × 9) bitwindow/lib/pages/overview_page.dart:312 — bitwindow/lib/pages/overview_page.dart:312-324 | bitwindow/lib/pages/wallet/denability_page.dart:183-195 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:446-458 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:767-779 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:578-590 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:868-880 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:438-450 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:623-635 | zside/lib/widgets/homepage_widget_catalog.dart:631-643 — before extracting anything, compare `bitwindow/lib/pages/overview_page.dart` and `bitwindow/lib/pages/wallet/denability_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 `bitwindow/lib/pages/overview_page.dart:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:591` calls `SailTableHeaderCell` and `zside/lib/pages/tabs/zside/zside_transfer_page.dart:636` 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 (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:491 — sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:491-503 | sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:581-593 | sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart:612-624 | sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart:144-156 — before extracting anything, compare `sail_ui/lib/pages/sidechains/explorer/explorer_detail.dart` and `sail_ui/lib/pages/sidechains/explorer/withdrawals_tab.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:491` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) sail_ui/lib/shell/sidechain_home_page.dart:181 — sail_ui/lib/shell/sidechain_home_page.dart:181-192 | sail_ui/lib/shell/sidechain_home_page.dart:225-236 | sail_ui/lib/shell/sidechain_home_page.dart:257-269 — 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 `sail_ui/lib/shell/sidechain_home_page.dart:181` 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 first that the copies are not typed on the same thing: the declarations holding them bind `category` to `'Navigation'` in one and `'Settings'` 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 (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) bbc/lib/widgets/homepage_widget_catalog.dart:178 — bbc/lib/widgets/homepage_widget_catalog.dart:178-189 | coinshift/lib/widgets/homepage_widget_catalog.dart:322-333 | photon/lib/widgets/homepage_widget_catalog.dart:198-209 | thunder/lib/widgets/homepage_widget_catalog.dart:201-212 | truthcoin/lib/widgets/homepage_widget_catalog.dart:211-222 | zside/lib/widgets/homepage_widget_catalog.dart:793-804 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 `bbc/lib/widgets/homepage_widget_catalog.dart:178` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) sidechain_core/lib/rpcs/coinshift_rpc.dart:196 — sidechain_core/lib/rpcs/coinshift_rpc.dart:196-207 | sidechain_core/lib/rpcs/photon_rpc.dart:154-165 | sidechain_core/lib/rpcs/thunder_rpc.dart:197-208 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:347-358 | sidechain_core/lib/rpcs/zside_rpc.dart:228-239 — before extracting anything, compare `sidechain_core/lib/rpcs/coinshift_rpc.dart` and `sidechain_core/lib/rpcs/photon_rpc.dart` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 150 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) bitwindow/lib/pages/settings/network_swap_page.dart:122 — bitwindow/lib/pages/settings/network_swap_page.dart:122-132 | sail_ui/lib/pages/datadir_select_page.dart:80-90 | sail_ui/lib/pages/l1_restart_page.dart:88-98 | sail_ui/lib/pages/utxo_snapshot_page.dart:109-118 — before extracting anything, compare `bitwindow/lib/pages/settings/network_swap_page.dart` and `sail_ui/lib/pages/l1_restart_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 `bitwindow/lib/pages/settings/network_swap_page.dart: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.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) sidechain_core/lib/rpcs/photon_rpc.dart:188 — sidechain_core/lib/rpcs/photon_rpc.dart:188-198 | sidechain_core/lib/rpcs/thunder_rpc.dart:231-241 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:381-391 | sidechain_core/lib/rpcs/zside_rpc.dart:262-272 — before extracting anything, compare `sidechain_core/lib/rpcs/photon_rpc.dart` and `sidechain_core/lib/rpcs/thunder_rpc.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 184 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) bitwindow/lib/widgets/claim_ecx_card.dart:427 — bitwindow/lib/widgets/claim_ecx_card.dart:427-436 | bitwindow/lib/widgets/claim_ecx_card.dart:532-542 | bitwindow/lib/widgets/claim_ecx_card.dart:589-599 — 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 `bitwindow/lib/widgets/claim_ecx_card.dart:532` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) bitwindow/lib/pages/debug_window.dart:358 — bitwindow/lib/pages/debug_window.dart:358-366 | bitwindow/lib/pages/sidechain_activation_management_page.dart:391-401 — 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 `bitwindow/lib/pages/debug_window.dart:358` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) bitwindow/lib/pages/root_page.dart:512 — bitwindow/lib/pages/root_page.dart:512-518 | bitwindow/lib/pages/root_page.dart:1202-1212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/root_page.dart:512` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) bitassets/lib/pages/tabs/amm_page.dart:278 — bitassets/lib/pages/tabs/amm_page.dart:278-287 | bitassets/lib/pages/tabs/asset_explorer_page.dart:262-271 | bitassets/lib/pages/tabs/auction_browser_page.dart:874-883 | bitassets/lib/widgets/amm_analytics_widget.dart:448-457 — before extracting anything, compare `bitassets/lib/pages/tabs/asset_explorer_page.dart` and `bitassets/lib/pages/tabs/auction_browser_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 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 `bitassets/lib/pages/tabs/amm_page.dart:278` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–10 lines × 3) · ×1
  • Duplicated block (7–10 lines × 3) bitwindow/lib/pages/wallet/check_detail_page.dart:316 — bitwindow/lib/pages/wallet/check_detail_page.dart:316-325 | bitwindow/lib/pages/wallet/check_detail_page.dart:326-335 | bitwindow/lib/pages/wallet/check_detail_page.dart:336-342 — 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 `bitwindow/lib/pages/wallet/check_detail_page.dart:336` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:380 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:380-388 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:676-685 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:380` 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 (9 lines × 14) · ×1
  • Duplicated block (9 lines × 14) sidechain_core/lib/config/binaries.dart:412 — sidechain_core/lib/config/binaries.dart:412-420 | sidechain_core/lib/config/binaries.dart:492-500 | sidechain_core/lib/config/binaries.dart:571-579 | sidechain_core/lib/config/binaries.dart:650-658 | sidechain_core/lib/config/binaries.dart:756-764 | sidechain_core/lib/config/binaries.dart:837-845 | sidechain_core/lib/config/sidechains.dart:239-247 | sidechain_core/lib/config/sidechains.dart:344-352 | sidechain_core/lib/config/sidechains.dart:443-451 | sidechain_core/lib/config/sidechains.dart:542-550 | sidechain_core/lib/config/sidechains.dart:641-649 | sidechain_core/lib/config/sidechains.dart:740-748 | sidechain_core/lib/config/sidechains.dart:839-847 | sidechain_core/lib/config/sidechains.dart:938-946 — there are 14 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 14 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) sail_ui/lib/pages/sidechains/bmm_tab.dart:540 — sail_ui/lib/pages/sidechains/bmm_tab.dart:540-548 | sail_ui/lib/pages/sidechains/bmm_tab.dart:637-646 | sail_ui/lib/pages/sidechains/bmm_tab.dart:898-906 | sail_ui/lib/pages/sidechains/explorer/chain_explorer_tab.dart:328-336 | truthcoin/lib/pages/tabs/portfolio_page.dart:280-288 | truthcoin/lib/pages/voting_dashboard_page.dart:427-435 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/pages/sidechains/bmm_tab.dart:540` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `BuildContext` in one and `context` 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, `sail_ui/lib/pages/sidechains/bmm_tab.dart:540` calls `SailTableHeaderCell` and `sail_ui/lib/pages/sidechains/bmm_tab.dart:898` does not — after which the two agree again for 5 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–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:366 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:366-372 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:659-667 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:737-745 — 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 `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:366` it does not close everything it opens, so those 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, `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:668` calls `onSort` and `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:372` 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 lines × 7) · ×1
  • Duplicated block (8 lines × 7) sidechain_core/lib/rpcs/bitassets_rpc.dart:791 — sidechain_core/lib/rpcs/bitassets_rpc.dart:791-798 | sidechain_core/lib/rpcs/bitnames_rpc.dart:368-375 | sidechain_core/lib/rpcs/coinshift_rpc.dart:280-287 | sidechain_core/lib/rpcs/photon_rpc.dart:238-245 | sidechain_core/lib/rpcs/thunder_rpc.dart:276-283 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:426-433 | sidechain_core/lib/rpcs/zside_rpc.dart:307-314 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 6) · ×1
  • Duplicated block (7–8 lines × 6) bbc/lib/widgets/homepage_widget_catalog.dart:310 — bbc/lib/widgets/homepage_widget_catalog.dart:310-316 | coinshift/lib/widgets/homepage_widget_catalog.dart:453-459 | photon/lib/widgets/homepage_widget_catalog.dart:330-336 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:794-801 | thunder/lib/widgets/homepage_widget_catalog.dart:333-339 | truthcoin/lib/widgets/homepage_widget_catalog.dart:343-349 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 `bbc/lib/widgets/homepage_widget_catalog.dart:310` it does not close everything it opens, so those 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 (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) sail_ui/lib/widgets/config_editor/configurator_panel.dart:181 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:181-188 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:140-146 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sail_ui/lib/widgets/config_editor/configurator_panel.dart:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:366 — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:366-372 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:433-439 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:659-667 | bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:737-745 — 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 `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:366` it does not close everything it opens, so those 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, `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:668` calls `onSort` and `bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:372` 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 lines × 8) · ×1
  • Duplicated block (8 lines × 8) bbc/lib/bbc_module.dart:19 — bbc/lib/bbc_module.dart:19-26 | bitassets/lib/bitassets_module.dart:23-30 | bitnames/lib/bitnames_module.dart:20-27 | coinshift/lib/coinshift_module.dart:21-28 | photon/lib/photon_module.dart:16-23 | thunder/lib/thunder_module.dart:16-23 | truthcoin/lib/truthcoin_module.dart:25-32 | zside/lib/zside_module.dart:24-31 — before extracting anything, compare `bbc/lib/bbc_module.dart` and `coinshift/lib/coinshift_module.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 13) · ×1
  • Duplicated block (11 lines × 13) bbc/lib/widgets/homepage_widget_catalog.dart:241 — bbc/lib/widgets/homepage_widget_catalog.dart:241-251 | bitwindow/lib/pages/wallet/denability_page.dart:363-373 | bitwindow/lib/pages/wallet/wallet_utxos.dart:233-243 | bitwindow/lib/widgets/address_list.dart:387-397 | coinshift/lib/widgets/homepage_widget_catalog.dart:384-394 | photon/lib/widgets/homepage_widget_catalog.dart:261-271 | sail_ui/lib/pages/sidechains/sidechain_overview_page.dart:709-719 | thunder/lib/widgets/homepage_widget_catalog.dart:264-274 | truthcoin/lib/widgets/homepage_widget_catalog.dart:274-284 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:534-544 | zside/lib/pages/tabs/zside/zside_melt_cast_page.dart:822-832 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:375-385 | zside/lib/pages/tabs/zside/zside_transfer_page.dart:564-574 — before extracting anything, compare `bbc/lib/widgets/homepage_widget_catalog.dart` and `coinshift/lib/widgets/homepage_widget_catalog.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 187 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 (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) sail_ui/lib/widgets/config_editor/configurator_panel.dart:484 — sail_ui/lib/widgets/config_editor/configurator_panel.dart:484-489 | sail_ui/lib/widgets/config_editor/configurator_panel.dart:536-541 | sail_ui/lib/widgets/config_editor/configurator_panel.dart:602-607 | sail_ui/lib/widgets/config_editor/configurator_panel.dart:651-656 | sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart:384-389 — `sail_ui/lib/widgets/config_editor/configurator_panel.dart` and `sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (5 lines × 8) · ×1
  • Duplicated block (5 lines × 8) sidechain_core/lib/rpcs/bbc_rpc.dart:91 — sidechain_core/lib/rpcs/bbc_rpc.dart:91-95 | sidechain_core/lib/rpcs/bitassets_rpc.dart:253-257 | sidechain_core/lib/rpcs/bitnames_rpc.dart:180-184 | sidechain_core/lib/rpcs/coinshift_rpc.dart:133-137 | sidechain_core/lib/rpcs/photon_rpc.dart:91-95 | sidechain_core/lib/rpcs/thunder_rpc.dart:85-89 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:284-288 | sidechain_core/lib/rpcs/zside_rpc.dart:114-118 — before extracting anything, compare `sidechain_core/lib/rpcs/bitassets_rpc.dart` and `sidechain_core/lib/rpcs/bitnames_rpc.dart` as WHOLE FILES: this scan already matched 36 separate duplicated blocks between them, totalling at least 309 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) sidechain_core/lib/rpcs/photon_rpc.dart:182 — sidechain_core/lib/rpcs/photon_rpc.dart:182-186 | sidechain_core/lib/rpcs/thunder_rpc.dart:225-229 | sidechain_core/lib/rpcs/truthcoin_rpc.dart:375-379 | sidechain_core/lib/rpcs/zside_rpc.dart:256-260 — before extracting anything, compare `sidechain_core/lib/rpcs/photon_rpc.dart` and `sidechain_core/lib/rpcs/thunder_rpc.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 184 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.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) sidechain-orchestrator/config/enforcer_conf.go:556 — sidechain-orchestrator/config/enforcer_conf.go:556-575 | sidechain-orchestrator/config/sidechain_conf.go:575-593 — 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 `sidechain-orchestrator/config/enforcer_conf.go:556` 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 lines × 6) · ×1
  • Duplicated block (15 lines × 6) sidechain-orchestrator/sidechain/bitassets/client.go:56 — sidechain-orchestrator/sidechain/bitassets/client.go:56-70 | sidechain-orchestrator/sidechain/bitnames/client.go:58-72 | sidechain-orchestrator/sidechain/coinshift/client.go:68-82 | sidechain-orchestrator/sidechain/photon/client.go:56-70 | sidechain-orchestrator/sidechain/thunder/client.go:56-70 | sidechain-orchestrator/sidechain/truthcoin/client.go:68-82 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `sidechain-orchestrator/sidechain/coinshift/client.go:83` calls `SetBearerCookie` and `sidechain-orchestrator/sidechain/bitassets/client.go:72` 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–15 lines × 2) · ×1
  • Duplicated block (11–15 lines × 2) dc-hub/server/api/explorer/api_explorer.go:187 — dc-hub/server/api/explorer/api_explorer.go:187-201 | dc-hub/server/api/explorer/api_explorer.go:303-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–14 lines × 7) · ×1
  • Duplicated block (12–14 lines × 7) sidechain-orchestrator/sidechain/bitassets/client.go:73 — sidechain-orchestrator/sidechain/bitassets/client.go:73-84 | sidechain-orchestrator/sidechain/coinshift/client.go:88-99 | sidechain-orchestrator/sidechain/corenode/client.go:124-137 | sidechain-orchestrator/sidechain/photon/client.go:73-84 | sidechain-orchestrator/sidechain/thunder/client.go:73-84 | sidechain-orchestrator/sidechain/truthcoin/client.go:88-99 | sidechain-orchestrator/wallet/core_rpc.go:134-145 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/coinshift/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 113 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/sidechain/bitassets/client.go: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `sidechain-orchestrator/sidechain/corenode/client.go:121` calls `SetBasicAuth` and `sidechain-orchestrator/sidechain/coinshift/client.go:85` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) sidechain-orchestrator/api/deposit.go:45 — sidechain-orchestrator/api/deposit.go:45-51 | sidechain-orchestrator/api/wallet_handler.go:961-969 — 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 `sidechain-orchestrator/api/deposit.go: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.
D4 · Code Duplication · Duplicated block (5 lines × 17) · ×1
  • Duplicated block (5 lines × 17) sidechain-orchestrator/api/deposit.go:47 — sidechain-orchestrator/api/deposit.go:47-51 | sidechain-orchestrator/api/wallet_handler.go:628-632 | sidechain-orchestrator/api/wallet_handler.go:663-667 | sidechain-orchestrator/api/wallet_handler.go:687-691 | sidechain-orchestrator/api/wallet_handler.go:801-806 | sidechain-orchestrator/api/wallet_handler.go:829-834 | sidechain-orchestrator/api/wallet_handler.go:964-969 | sidechain-orchestrator/api/wallet_handler.go:1070-1074 | sidechain-orchestrator/api/wallet_handler.go:1145-1150 | sidechain-orchestrator/api/wallet_handler.go:1254-1259 | sidechain-orchestrator/api/wallet_handler.go:1354-1359 | sidechain-orchestrator/api/wallet_handler.go:1393-1398 | sidechain-orchestrator/api/wallet_handler.go:1706-1711 | sidechain-orchestrator/api/wallet_handler.go:1738-1743 | sidechain-orchestrator/api/wallet_handler.go:1846-1851 | sidechain-orchestrator/api/wallet_handler.go:2422-2426 | sidechain-orchestrator/api/wallet_handler.go:2455-2459 — there are 17 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 17 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `sidechain-orchestrator/api/deposit.go:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) sidechain-orchestrator/sidechain/bitassets/client.go:21 — sidechain-orchestrator/sidechain/bitassets/client.go:21-26 | sidechain-orchestrator/sidechain/bitnames/client.go:23-28 | sidechain-orchestrator/sidechain/photon/client.go:21-26 | sidechain-orchestrator/sidechain/thunder/client.go:21-26 — `sidechain-orchestrator/sidechain/bitassets/client.go` and `sidechain-orchestrator/sidechain/bitnames/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 105 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×1
  • Duplicated block (6 lines × 6) sidechain-orchestrator/sidechain/bitassets/handler.go:133 — sidechain-orchestrator/sidechain/bitassets/handler.go:133-138 | sidechain-orchestrator/sidechain/coinshift/handler.go:119-124 | sidechain-orchestrator/sidechain/photon/handler.go:118-123 | sidechain-orchestrator/sidechain/thunder/handler.go:233-238 | sidechain-orchestrator/sidechain/truthcoin/handler.go:124-129 | sidechain-orchestrator/sidechain/zside/handler.go:170-175 — `sidechain-orchestrator/sidechain/bitassets/handler.go` and `sidechain-orchestrator/sidechain/coinshift/handler.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 25 separate duplicated blocks between them, totalling at least 180 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (15 lines × 8) · ×1
  • Duplicated block (15 lines × 8) bbc/macos/Runner/MainFlutterWindow.swift:6 — bbc/macos/Runner/MainFlutterWindow.swift:6-20 | bitassets/macos/Runner/MainFlutterWindow.swift:6-20 | bitnames/macos/Runner/MainFlutterWindow.swift:6-20 | coinshift/macos/Runner/MainFlutterWindow.swift:6-20 | photon/macos/Runner/MainFlutterWindow.swift:6-20 | thunder/macos/Runner/MainFlutterWindow.swift:6-20 | truthcoin/macos/Runner/MainFlutterWindow.swift:6-20 | zside/macos/Runner/MainFlutterWindow.swift:6-20 — before extracting anything, compare `bbc/macos/Runner/MainFlutterWindow.swift` and `bitassets/macos/Runner/MainFlutterWindow.swift` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (5 clone groups) coinnews/app/jobs/page.tsx:8 — 5 duplicated blocks under coinnews/app/ have copies in at least two of the sibling directories item, jobs, new, t, u — 3 of them are reported below, and 2 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 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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 with local edits (20 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (20 matched lines × 2 locations) coinnews/app/layout.tsx:15 — coinnews/app/layout.tsx:15 · dc-hub/app/layout.tsx:27 — the two spans are one implementation copied and then locally edited — 82 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 (15 lines × 2 locations) · ×1
  • Duplicated block (15 lines × 2 locations) coinnews/app/item/[id]/page.tsx:31 — coinnews/app/item/[id]/page.tsx:31 · coinnews/components/item-row.tsx:22 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (15 lines × 3 locations) · ×1
  • Duplicated block (15 lines × 3 locations) coinnews/app/jobs/page.tsx:8 — coinnews/app/jobs/page.tsx:8 · coinnews/app/new/page.tsx:7 · coinnews/app/page.tsx:7 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) dc-hub/app/sidechains/explorer-client.tsx:334 — dc-hub/app/sidechains/explorer-client.tsx:334 · dc-hub/app/sidechains/explorer-client.tsx:370 — 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 × 4 locations) · ×1
  • Duplicated block (6 lines × 4 locations) coinnews/app/jobs/page.tsx:6 — coinnews/app/jobs/page.tsx:6 · coinnews/app/new/page.tsx:5 · coinnews/app/page.tsx:5 · coinnews/app/t/[topic]/page.tsx:5 — the 4 copies are spread across 4 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 InfoPage (cyclomatic 23, cognitive 20) · ×1
  • Complex function InfoPage (cyclomatic 23, cognitive 20) dc-hub/app/info/page.tsx:23 — InfoPage has cyclomatic complexity 23 and cognitive complexity 20; 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. 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 Home (cyclomatic 23, cognitive 16) · ×1
  • Complex function Home (cyclomatic 23, cognitive 16) dc-hub/app/page.tsx:24 — Home has cyclomatic complexity 23 and cognitive complexity 16; 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. 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 BlockCard (cyclomatic 21, cognitive 20) · ×1
  • Complex function BlockCard (cyclomatic 21, cognitive 20) dc-hub/app/sidechains/explorer-client.tsx:292 — BlockCard has cyclomatic complexity 21 and cognitive complexity 20; 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. 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 fieldDefault (cyclomatic 11, cognitive 15) · ×1
  • Complex function fieldDefault (cyclomatic 11, cognitive 15) REDACTED:84 — fieldDefault has cyclomatic complexity 11 and cognitive complexity 15; 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.
R3 · Large Files · dc-hub/app/sidechains/explorer-client.tsx · ×1
  • dc-hub/app/sidechains/explorer-client.tsx: 436 lines of code dc-hub/app/sidechains/explorer-client.tsx:1 — dc-hub/app/sidechains/explorer-client.tsx has 436 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · This package's lint script runs in no CI job · ×1
  • This package's lint script runs in no CI job REDACTED:39 — The package in `coinnews` declares the lint script `lint` (`biome lint`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `coinnews` (or the workspace's task runner).
R8 · Dependency Hygiene · Unlisted import '@bufbuild/protobuf' · ×1
  • Unlisted import '@bufbuild/protobuf' coinnews/lib/api.ts:1 — Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
R8 · Dependency Hygiene · Unused dependency '@icons-pack/react-simple-icons' · ×1
  • Unused dependency '@icons-pack/react-simple-icons' REDACTED:9 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'date-fns' · ×1
  • Unused dependency 'date-fns' REDACTED:12 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'lucide-react' · ×1
  • Unused dependency 'lucide-react' REDACTED:13 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap sidechain_core/lib/utils/change_tracker.dart:92 — `track` is public, takes a document from its caller (line 34) and hands it to `_deepEquals`, which calls itself at line 92 (`_deepEquals`) with a piece of `a` (and at line 104) — and nowhere in `_deepEquals` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `_deepEquals` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X2 · Cancellation propagation · Async function without AbortSignal · ×1
  • Async function without AbortSignal: getDrivechainConfig dc-hub/lib/config.ts:25 — `getDrivechainConfig` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
X27 · Collection changed while being enumerated · Collection is structurally changed while it is being enumerated · ×1
  • Collection is structurally changed while it is being enumerated sidechain-orchestrator/wallet/service.go:2009 — `s.wallets` is walked by the `for … range` at line 2009, and line 2024 appends to `s.wallets`. A range evaluates its slice once and walks the length it had when the loop began, so the elements appended here are never visited by this loop — work queued for it is silently dropped.
X3 · Exception handling · Discarded error (assigned to `_`, then its result used) · ×1
  • Discarded error (assigned to `_`, then its result used) sidechain-orchestrator/config.go:272 — `entries, _ := os.ReadDir(dir)` writes the call's error to `_` and then uses `entries` as if the call succeeded. When `os.ReadDir` fails, `entries` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `entries` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
X3 · Exception handling · Lost error (reports an error that is nil on this path) · ×1
  • Lost error (reports an error that is nil on this path) REDACTED:156 — `if _, err := os.Lstat(binPath); err == nil` reports `err` on the one path where it is nil, and the path where the call failed goes on without ever reading it: the comparison is inverted. The real failure is lost and a nil error (or a panic on `err.Error()`) is reported in its place. Test `err != nil` here.
Minor — 128 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate bitwindow/lib/main.dart:1262 — `!Platform.isMacOS && !Platform.isWindows` appears character-identically in 2 files — bitwindow/lib/main.dart, sail_ui/lib/shell/run_sidechain_app.dart. 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 bitwindow/lib/providers/mempool_watch_provider.dart:85 — `!hasListeners || !api.connected || isFetching` appears character-identically in 2 files — bitwindow/lib/providers/mempool_watch_provider.dart, bitwindow/lib/providers/mining_pools_provider.dart. 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 bitwindow/lib/pages/explorer/load_transaction_dialog.dart:286 — `!input.isCoinbase && (input.valueSats.toInt() != 0 || input.address.isNotEmpty)` appears character-identically in 2 files — bitwindow/lib/pages/explorer/load_transaction_dialog.dart, sail_ui/lib/widgets/transaction_diagram.dart. 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 coinshift/lib/providers/analytics_provider.dart:257 — `!s.state.isCompleted && !s.state.isCancelled` appears character-identically in 2 files — coinshift/lib/providers/analytics_provider.dart, coinshift/lib/providers/swap_provider.dart. 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 bitwindow/lib/pages/mining/pools_tab.dart:229 — `GetIt.I.isRegistered<NodeModeProvider>() && GetIt.I<NodeModeProvider>().isLight` appears character-identically in 2 files — bitwindow/lib/pages/mining/pools_tab.dart, bitwindow/lib/pages/transaction_censorship_page.dart. 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 sail_ui/lib/widgets/dialogs/network_swap_progress_dialog.dart:68 — `_currentStepIndex >= 0 && _currentStepIndex < _steps.length` appears character-identically in 2 files — sail_ui/lib/widgets/dialogs/network_swap_progress_dialog.dart, sail_ui/lib/widgets/wallet_backup_restore.dart. 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 bitwindow/lib/pages/root_page.dart:141 — `_lastShiftPress != null && now.difference(_lastShiftPress!).inMilliseconds < 400` appears character-identically in 2 files — bitwindow/lib/pages/root_page.dart, sail_ui/lib/shell/sidechain_home_page.dart. 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 bitassets/lib/pages/tabs/reserve_register_page.dart:605 — `encryptionKey == null || signingKey == null` appears character-identically in 2 files — bitassets/lib/pages/tabs/reserve_register_page.dart, bitnames/lib/pages/tabs/reserve_register_page.dart. 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 bitwindow/lib/pages/root_page.dart:138 — `event is KeyDownEvent && (event.logicalKey == LogicalKeyboardKey.shiftLeft || event.logicalKey == LogicalKeyboardKey.shiftRight)` appears character-identically in 2 files — bitwindow/lib/pages/root_page.dart, sail_ui/lib/shell/sidechain_home_page.dart. 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 bitwindow/lib/pages/root_page.dart:151 — `event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.keyP` appears character-identically in 2 files — bitwindow/lib/pages/root_page.dart, sail_ui/lib/shell/sidechain_home_page.dart. 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 sail_ui/lib/widgets/console/console_view.dart:219 — `event is! KeyDownEvent && event is! KeyRepeatEvent` appears character-identically in 2 files — sail_ui/lib/widgets/console/console_view.dart, sail_ui/lib/widgets/inputs/sail_combobox.dart. 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 bitwindow/lib/pages/root_page.dart:406 — `item.label.toLowerCase().contains(query) || item.category.toLowerCase().contains(query)` appears character-identically in 2 files — bitwindow/lib/pages/root_page.dart, sail_ui/lib/shell/sidechain_home_page.dart. 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 bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart:1219 — `keyInfo.isEmpty || keyInfo['xpub'] == null` appears character-identically in 2 files — bitwindow/lib/pages/wallet/wallet_multisig_lounge.dart, bitwindow/lib/widgets/import_psbt_modal.dart. 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 bitwindow/lib/main.dart:139 — `logFile == null || applicationDir == null` appears character-identically in 2 files — bitwindow/lib/main.dart, sail_ui/lib/shell/run_sidechain_app.dart. 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 sail_ui/lib/pages/sidechains/parent_chain_page.dart:147 — `maxAmount != null && (double.tryParse(currentInput) != null && double.parse(currentInput) > maxAmount!)` appears character-identically in 4 files — sail_ui/lib/pages/sidechains/parent_chain_page.dart, sail_ui/lib/pages/sidechains/sidechain_overview_page.dart, zside/lib/widgets/containers/tabs/dashboard_tab_widgets.dart, zside/lib/widgets/homepage_widget_catalog.dart. 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 truthcoin/lib/widgets/homepage_widget_catalog.dart:545 — `model.holdings == null || model.holdings!.positions.isEmpty` appears character-identically in 2 files — truthcoin/lib/widgets/homepage_widget_catalog.dart, truthcoin/lib/widgets/trading_position_widget.dart. 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 bitassets/lib/pages/tabs/reserve_register_page.dart:449 — `model.useEncryptionKey && model.encryptionKey != null` appears character-identically in 2 files — bitassets/lib/pages/tabs/reserve_register_page.dart, bitnames/lib/pages/tabs/reserve_register_page.dart. 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 bitassets/lib/pages/tabs/reserve_register_page.dart:464 — `model.useSigningKey && model.signingKey != null` appears character-identically in 2 files — bitassets/lib/pages/tabs/reserve_register_page.dart, bitnames/lib/pages/tabs/reserve_register_page.dart. 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 sidechain_core/lib/providers/backend_sidechain_conf_provider.dart:81 — `msg.contains('http/2 connection is finishing') || msg.contains('Connection refused') || msg.contains('Connection reset') || msg.contains('Co…` appears character-identically in 3 files — sidechain_core/lib/providers/backend_sidechain_conf_provider.dart, sidechain_core/lib/providers/bitcoin_conf_provider.dart, REDACTED. 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 bitwindow/lib/pages/sidechains_page.dart:1279 — `network == BitcoinNetwork.BITCOIN_NETWORK_ECASH || network == BitcoinNetwork.BITCOIN_NETWORK_SIGNET || network == BitcoinNetwork.BITCOIN_NET…` appears character-identically in 2 files — bitwindow/lib/pages/sidechains_page.dart, sidechain_core/lib/providers/bitcoin_conf_provider.dart. 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 sidechain_core/lib/classes/node_connection_settings.dart:157 — `network == BitcoinNetwork.BITCOIN_NETWORK_MAINNET || network == BitcoinNetwork.BITCOIN_NETWORK_ECASH` appears character-identically in 4 files — sidechain_core/lib/classes/node_connection_settings.dart, REDACTED, sidechain_core/lib/config/binaries.dart, sidechain_core/lib/providers/bitcoin_conf_provider.dart. 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 sail_ui/lib/widgets/config_editor/configurator_panel.dart:77 — `option.key.toLowerCase().contains(_searchQuery) || option.description.toLowerCase().contains(_searchQuery) || option.tooltip.toLowerCase().c…` appears character-identically in 2 files — sail_ui/lib/widgets/config_editor/configurator_panel.dart, sail_ui/lib/widgets/enforcer_config_editor/configurator_panel.dart. 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 sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:156 — `originalLine.isEmpty && workingLine.isNotEmpty` appears character-identically in 3 files — sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart, sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart, sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart. 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 sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart:154 — `originalLine.isNotEmpty && workingLine.isEmpty` appears character-identically in 3 files — sail_ui/lib/shell/sidechain_conf_editor_viewmodel.dart, sail_ui/lib/viewmodels/bitcoin_config_editor_viewmodel.dart, sail_ui/lib/viewmodels/enforcer_config_editor_viewmodel.dart. 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 bitwindow/lib/pages/explorer/block_explorer_dialog.dart:32 — `raw.contains('connection') || raw.contains('unavailable') || raw.contains('refused')` appears character-identically in 2 files — bitwindow/lib/pages/explorer/block_explorer_dialog.dart, bitwindow/lib/pages/explorer/load_transaction_dialog.dart. 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.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on error · ×18
  • Silent fallback default on error bitwindow/server/miningpools/registry.go:192 — `source` turns a non-nil `err` into `return "", nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/api/explorer_bundle.go:121 — `contentValue` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/api/transaction_warning.go:38 — `burnTransactionWarning` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/api/orchestrator_handler.go:1298 — `nextBlockFeeRate` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/logtail.go:63 — `readLogOffset` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/release_check.go:162 — `localModTime` turns a non-nil `err` into `return time.Time{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:750 — `binaryVersion` turns a non-nil `err` into `return "unknown"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/config/network.go:438 — `splitElectrumURL` turns a non-nil `err` into `return "", 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:515 — `probeContentLength` turns a non-nil `err` into `return -1` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:1715 — `datadirOwnerPid` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/sidechain/mempool.go:241 — `OutputValueSats` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/stratum/pool.go:331 — `configuredMask` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/wallet/ecx_burn.go:88 — `opReturnAddress` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/wallet/electrum_backend.go:410 — `inputWeightForKind` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/wallet/metadata.go:479 — `backupWalletPath` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/wallet/seed_explorer.go:147 — `pathPurpose` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error sidechain-orchestrator/wallet/electrum_backend.go:669 — `hdPathFor` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error REDACTED:739 — `blockTime` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
X7 · Silent fallback defaults · Silent fallback default in catch · ×14
  • Silent fallback default in catch bitwindow/lib/pages/wallet/timestamp_detail_page.dart:152 — `_formatDate` turns every thrown error into `'-'` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/pages/wallet/verify_timestamp_page.dart:171 — `_formatDate` turns every thrown error into `'-'` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/pages/wallet/wallet_timestamps.dart:172 — `_formatDate` turns every thrown error into `'-'` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/providers/content_provider.dart:77 — `loadArticleGroups` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/providers/multisig_provider.dart:891 — `loadSoloKeys` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch sidechain_core/lib/settings/secure_store.dart:39 — `_read` turns every thrown error into `{}` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch sidechain_core/lib/utils/shared_log_tail.dart:109 — `_lengthOrZero` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/widgets/hash_calculator_modal.dart:212 — `_getInputBytes` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/widgets/hash_calculator_modal.dart:380 — `_hexToBytes` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/widgets/import_txid_modal.dart:347 — `_updateWalletKeyStates` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/widgets/peers_table_widget.dart:200 — `_formatPing` turns every thrown error into `'-'` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch bitwindow/lib/widgets/peers_table_widget.dart:236 — `_formatDuration` turns every thrown error into `'-'` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch coinnews/app/item/[id]/page.tsx:61 — `safeHost` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch coinnews/components/item-row.tsx:50 — `safeHost` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
AX6 · Interface segregation · Fat interface · ×8
  • Fat interface: Backend (23 methods) sidechain-orchestrator/wallet/backend.go:20 — `Backend` declares 23 methods: `Ensure`, `EnsureAll`, `Forget`, `Balance`, `ListUnspent`, `ListTransactions`, `ListTransactionsRange`, `ListReceivedByAddress`, `GetWalletTransaction`, `AddressHDPath`, `OwnedAddresses`, `NextReceiveAddress`, `NextChangeAddress`, `WatchKeys`, `Send`, `PreviewSend`, `SignTransaction`, `BumpFee`, `PreviewBumpFee`, `CreateCpfp`, `PreviewCancel`, `CancelTransaction`, `Chain`. Counted over the exported method specs the interface itself declares, once per name; an embedded interface is a role it composes, judged on its own declaration, and is not counted here. 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: BitAssetsRPC (48 abstract methods) sidechain_core/lib/rpcs/bitassets_rpc.dart:12 — `BitAssetsRPC` declares 48 abstract methods: `getBalance`, `getBitAssetData`, `listBitAssets`, `connectPeer`, `forgetPeer`, `listPeers`, `registerBitAsset`, `reserveBitAsset`, `getDepositAddress`, `getSideAddress`, `listTransactions`, `sideEstimateFee`, `sideSend`, `getNewAddress`, `getBlockCount`, `getWalletAddresses`, `getWalletUTXOs`, `listUTXOs`, `myUnconfirmedUtxos`, `removeFromMempool`, `openapiSchema`, `stop`, `transfer`, `transferBitAsset`, `getNewVerifyingKey`, `signArbitraryMsg`, `signArbitraryMsgAsAddr`, `ammBurn`, `ammMint`, `ammSwap`, `getAmmPoolState`, `getAmmPrice`, `dutchAuctionBid`, `dutchAuctionCollect`, `dutchAuctionCreate`, `dutchAuctions`, `decryptMsg`, `encryptMsg`, `generateMnemonic`, `getBlock`, and 8 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: BitnamesRPC (34 abstract methods) sidechain_core/lib/rpcs/bitnames_rpc.dart:22 — `BitnamesRPC` declares 34 abstract methods: `getBalance`, `getBitNameData`, `listBitNames`, `connectPeer`, `listPeers`, `registerBitName`, `reserveBitName`, `getBlock`, `getBMMInclusions`, `getBestMainchainBlockHash`, `getBestSidechainBlockHash`, `generateMnemonic`, `setSeedFromMnemonic`, `getSidechainWealth`, `getNewEncryptionKey`, `getNewVerifyingKey`, `createDeposit`, `decryptMsg`, `encryptMsg`, `getNewAddress`, `getBlockCount`, `getPaymail`, `getPendingPaymail`, `getBitNameOwner`, `getWalletAddresses`, `getWalletUTXOs`, `listUTXOs`, `myUTXOs`, `openapiSchema`, `resolveCommit`, `readCommitment`, `signArbitraryMsg`, `signArbitraryMsgAsAddr`, `transfer`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: BitwindowAPI (24 abstract methods) sidechain_core/lib/rpcs/bitwindow_api.dart:370 — `BitwindowAPI` declares 24 abstract methods: `stop`, `createDenial`, `cancelDenial`, `pauseDenial`, `resumeDenial`, `getSyncInfo`, `listAddressBook`, `createAddressBookEntry`, `updateAddressBookEntry`, `deleteAddressBookEntry`, `setTransactionNote`, `exportLabels`, `importLabels`, `getFireplaceStats`, `listRecentTransactions`, `listBlocks`, `getNetworkStats`, `setMempoolWatch`, `resetMempoolWatch`, `getMempoolWatchStatus`, `listMempoolTransactions`, `listBlockStats`, `listMiningPools`, `updateNetwork`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: WalletAPI (32 abstract methods) sidechain_core/lib/rpcs/bitwindow_api.dart:625 — `WalletAPI` declares 32 abstract methods: `sendTransaction`, `getBalance`, `getNewAddress`, `listTransactions`, `listUnspent`, `listReceiveAddresses`, `listSidechainDeposits`, `createSidechainDeposit`, `signMessage`, `verifyMessage`, `getStats`, `unlockWallet`, `lockWallet`, `isWalletUnlocked`, `createCheque`, `getCheque`, `listCheques`, `checkChequeFunding`, `previewSweep`, `sweepCheque`, `deleteCheque`, `setUTXOMetadata`, `getUTXOMetadata`, `setCoinSelectionStrategy`, `getCoinSelectionStrategy`, `getTransactionDetails`, `getUTXODistribution`, `bumpFee`, `selectCoins`, `createBackup`, `restoreBackup`, `validateBackup`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: CoinShiftRPC (22 abstract methods) sidechain_core/lib/rpcs/coinshift_rpc.dart:21 — `CoinShiftRPC` declares 22 abstract methods: `getSidechainWealth`, `createDeposit`, `connectPeer`, `forgetPeer`, `listPeers`, `getBlock`, `getBestMainchainBlockHash`, `getBestSidechainBlockHash`, `getBMMInclusions`, `removeFromMempool`, `generateMnemonic`, `setSeedFromMnemonic`, `getWalletAddresses`, `formatDepositAddress`, `getOpenAPISchema`, `createSwap`, `claimSwap`, `getSwapStatus`, `listSwaps`, `listSwapsByRecipient`, `updateSwapL1Txid`, `reconstructSwaps`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: TruthcoinRPC (47 abstract methods) sidechain_core/lib/rpcs/truthcoin_rpc.dart:21 — `TruthcoinRPC` declares 47 abstract methods: `getSidechainWealth`, `createDeposit`, `connectPeer`, `listPeers`, `getBlock`, `getBestMainchainBlockHash`, `getBestSidechainBlockHash`, `getBMMInclusions`, `removeFromMempool`, `generateMnemonic`, `setSeedFromMnemonic`, `refreshWallet`, `getTransaction`, `getTransactionInfo`, `getWalletAddresses`, `myUtxos`, `myUnconfirmedUtxos`, `calculateInitialLiquidity`, `marketCreate`, `marketList`, `marketGet`, `marketPriceHistory`, `marketBuy`, `marketSell`, `marketPositions`, `marketAmplifyBeta`, `slotStatus`, `slotList`, `slotGet`, `slotClaim`, `slotClaimCategory`, `getVoterAddress`, `voteVoter`, `voteVoters`, `voteSubmit`, `voteList`, `votePeriod`, `votecoinTransfer`, `votecoinBalance`, `transferVotecoin`, and 7 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ZSideRPC (24 abstract methods) sidechain_core/lib/rpcs/zside_rpc.dart:57 — `ZSideRPC` declares 24 abstract methods: `getSidechainWealth`, `createDeposit`, `connectPeer`, `listPeers`, `getBlock`, `getBestMainchainBlockHash`, `getBestSidechainBlockHash`, `getBMMInclusions`, `removeFromMempool`, `generateMnemonic`, `setSeedFromMnemonic`, `getNewShieldedAddress`, `getNewTransparentAddress`, `getShieldedWalletAddresses`, `getTransparentWalletAddresses`, `shield`, `sendShielded`, `sendTransparent`, `deshield`, `listPrivateTransactions`, `listTransparentTransactions`, `listShieldedUTXOs`, `listUnshieldedUTXOs`, `getBalanceBreakdown`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it 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.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×5
  • Projects may be oversized for their cohesion REDACTED:1 — `sidechain-orchestrator` (78140 LoC, 442 module-visible types across 44 directories) overshoots its size bounds. 5 of 40 build unit(s) (Go, SwiftPM, Xcode, npm, pub) overshoot their size bounds, lowering Project Cohesion to 7.5/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion bitwindow/pubspec.yaml:1 — `bitwindow` (60070 LoC, 442 module-visible types across 21 directories) overshoots its size bounds. 5 of 40 build unit(s) (Go, SwiftPM, Xcode, npm, pub) overshoot their size bounds, lowering Project Cohesion to 7.5/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion sail_ui/pubspec.yaml:1 — `sail_ui` (40477 LoC, 362 module-visible types across 28 directories) overshoots its size bounds. 5 of 40 build unit(s) (Go, SwiftPM, Xcode, npm, pub) overshoot their size bounds, lowering Project Cohesion to 7.5/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion sidechain_core/pubspec.yaml:1 — `sidechain_core` (27384 LoC, 339 module-visible types across 47 directories) overshoots its size bounds. 5 of 40 build unit(s) (Go, SwiftPM, Xcode, npm, pub) overshoot their size bounds, lowering Project Cohesion to 7.5/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion REDACTED:1 — `bitwindow/server` (23629 LoC, 195 module-visible types across 47 directories) overshoots its size bounds. 5 of 40 build unit(s) (Go, SwiftPM, Xcode, npm, pub) overshoot their size bounds, lowering Project Cohesion to 7.5/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D19 · Documentation Quality · Documentation · ×2
  • Documentation: no build, run or usage example dc-hub/README.md:1 — `dc-hub` is runnable (a `start` script in `REDACTED`) and neither `dc-hub/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dc-hub/server/README.md:1 — `server` is a command (`package main` at the root of module `github.com/LayerTwo-Labs/sidesail/dc-hub/server`) and neither `dc-hub/server/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D21 · Naming Consistency · `prepareBMM` spells `BMM` where 20 names in the project spell it `Bmm` · ×2
  • `prepareBMM` spells `BMM` where 20 names in the project spell it `Bmm` sidechain_core/lib/gen/bmm/v1/bmm.connect.client.dart:186 — 20 of 22 names in project repository.gen spell the token `Bmm` (20 of 22; unit: names in project repository.gen containing `Bmm`). Peers: BbcServiceClient.getBmmCommitment (sidechain_core/lib/gen/bbc/v1/bbc.connect.client.dart:85); BbcService.getBmmCommitment (sidechain_core/lib/gen/bbc/v1/bbc.connect.spec.dart:47); BitAssetsServiceClient.getBmmInclusions (sidechain_core/lib/gen/bitassets/v1/bitassets.connect.client.dart:299); BitAssetsService.getBmmInclusions (sidechain_core/lib/gen/bitassets/v1/bitassets.connect.spec.dart:141); BitnamesServiceClient.getBmmInclusions (sidechain_core/lib/gen/bitnames/v1/bitnames.connect.client.dart:281). Rename to `prepareBmm`. [rule N6]
  • `prepareBMM` spells `BMM` where 20 names in the project spell it `Bmm` sidechain_core/lib/gen/bmm/v1/bmm.connect.spec.dart:98 — 20 of 22 names in project repository.gen spell the token `Bmm` (20 of 22; unit: names in project repository.gen containing `Bmm`). Peers: BbcServiceClient.getBmmCommitment (sidechain_core/lib/gen/bbc/v1/bbc.connect.client.dart:85); BbcService.getBmmCommitment (sidechain_core/lib/gen/bbc/v1/bbc.connect.spec.dart:47); BitAssetsServiceClient.getBmmInclusions (sidechain_core/lib/gen/bitassets/v1/bitassets.connect.client.dart:299); BitAssetsService.getBmmInclusions (sidechain_core/lib/gen/bitassets/v1/bitassets.connect.spec.dart:141); BitnamesServiceClient.getBmmInclusions (sidechain_core/lib/gen/bitnames/v1/bitnames.connect.client.dart:281). Rename to `prepareBmm`. [rule N6]
D21 · Naming Consistency · `getCoinbasePSBT` spells `PSBT` where 30 names in the project spell it `Psbt` · ×2
  • `getCoinbasePSBT` spells `PSBT` where 30 names in the project spell it `Psbt` sidechain_core/lib/gen/cusf/mainchain/v1/validator.connect.client.dart:103 — 30 of 32 names in project repository.gen spell the token `Psbt` (30 of 32; unit: names in project repository.gen containing `Psbt`). Peers: BitcoinServiceClient.createPsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:705); BitcoinServiceClient.decodePsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:723); BitcoinServiceClient.analyzePsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:740); BitcoinServiceClient.combinePsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:757); BitcoinServiceClient.utxoUpdatePsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:774). Rename to `getCoinbasePsbt`. [rule N6]
  • `getCoinbasePSBT` spells `PSBT` where 30 names in the project spell it `Psbt` sidechain_core/lib/gen/cusf/mainchain/v1/validator.connect.spec.dart:60 — 30 of 32 names in project repository.gen spell the token `Psbt` (30 of 32; unit: names in project repository.gen containing `Psbt`). Peers: BitcoinServiceClient.createPsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:705); BitcoinServiceClient.decodePsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:723); BitcoinServiceClient.analyzePsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:740); BitcoinServiceClient.combinePsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:757); BitcoinServiceClient.utxoUpdatePsbt (sidechain_core/lib/gen/bitcoin/bitcoind/v1alpha/bitcoin.connect.client.dart:774). Rename to `getCoinbasePsbt`. [rule N6]
D21 · Naming Consistency · `sequenceID` spells `ID` where 136 names in the project spell it `Id` · ×2
  • `sequenceID` spells `ID` where 136 names in the project spell it `Id` sidechain_core/lib/rpcs/bitassets_rpc.dart:983 — 136 of 138 names in project repository.rpcs spell the token `Id` (136 of 138; unit: names in project repository.rpcs containing `Id`). Peers: BitAssetsRPC.getBitAssetData(assetId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:18); BitAssetsRPC.transferBitAsset(assetId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:100); BitAssetsRPC.dutchAuctionBid(dutchAuctionId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:159); BitAssetsRPC.dutchAuctionCollect(dutchAuctionId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:165); BitAssetsLive.getBitAssetData(assetId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:342). Rename to `sequenceId`. [rule N6]
  • `sequenceID` spells `ID` where 136 names in the project spell it `Id` sidechain_core/lib/rpcs/bitassets_rpc.dart:988 — 136 of 138 names in project repository.rpcs spell the token `Id` (136 of 138; unit: names in project repository.rpcs containing `Id`). Peers: BitAssetsRPC.getBitAssetData(assetId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:18); BitAssetsRPC.transferBitAsset(assetId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:100); BitAssetsRPC.dutchAuctionBid(dutchAuctionId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:159); BitAssetsRPC.dutchAuctionCollect(dutchAuctionId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:165); BitAssetsLive.getBitAssetData(assetId) (sidechain_core/lib/rpcs/bitassets_rpc.dart:342). Rename to `sequenceId`. [rule N6]
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×2
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Member throws UnsupportedError · ×2
  • Member throws UnsupportedError sidechain_core/lib/rpcs/bitassets_rpc.dart:314 — `listTransactions`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError sidechain_core/lib/rpcs/bitnames_rpc.dart:241 — `listTransactions`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found zside/macos/Runner.xcodeproj/project.pbxproj:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `zside/macos/Runner.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
D21 · Naming Consistency · `_NodeRpcSyncWarning` spells `Rpc` where 15 names in the project spell it `RPC` · ×1
  • `_NodeRpcSyncWarning` spells `Rpc` where 15 names in the project spell it `RPC` sail_ui/lib/pages/enforcer_conf_editor_page.dart:197 — 15 of 16 names in project repository.pages spell the token `RPC` (15 of 16; unit: names in project repository.pages containing `RPC`). Peers: DutchAuctionViewModel.bitassetsRPC (bitassets/lib/pages/tabs/dutch_auction_page.dart:358); BitAssetsViewModel.bitassetsRPC (bitassets/lib/pages/tabs/reserve_register_page.dart:563); BitnamesViewModel.bitnamesRPC (bitnames/lib/pages/tabs/reserve_register_page.dart:600); ChatViewModel._bitnamesRPC (bitwindow/lib/pages/chat_page.dart:769); FireplaceViewModel._enforcerRPC (bitwindow/lib/pages/overview_page.dart:63). Rename to `_NodeRPCSyncWarning`. [rule N6]
D21 · Naming Consistency · `getByID` spells `ID` where 111 names in the project spell it `Id` · ×1
  • `getByID` spells `ID` where 111 names in the project spell it `Id` sidechain_core/lib/providers/window_provider.dart:358 — 111 of 112 names in project repository.providers spell the token `Id` (111 of 112; unit: names in project repository.providers containing `Id`). Peers: AssetHolding.assetId (bitassets/lib/providers/asset_analytics_provider.dart:12); AssetHolding.AssetHolding(assetId) (bitassets/lib/providers/asset_analytics_provider.dart:18); PriceAlertProvider.getAlertsForAuction(auctionId) (bitassets/lib/providers/price_alert_provider.dart:28); PriceAlertProvider.hasAlertForAuction(auctionId) (bitassets/lib/providers/price_alert_provider.dart:32); PriceAlertProvider.removeAlert(auctionId) (bitassets/lib/providers/price_alert_provider.dart:52). Rename to `getById`. [rule N6]
D21 · Naming Consistency · `coreRawCall` spells `Raw` where 13 names in the project spell it `RAW` · ×1
  • `coreRawCall` spells `Raw` where 13 names in the project spell it `RAW` sidechain_core/lib/rpcs/orchestrator_rpc.dart:233 — 13 of 14 names in project repository.rpcs spell the token `RAW` (13 of 14; unit: names in project repository.rpcs containing `RAW`). Peers: BbcLive.callRAW (sidechain_core/lib/rpcs/bbc_rpc.dart:228); BitAssetsLive.callRAW (sidechain_core/lib/rpcs/bitassets_rpc.dart:291); BitnamesLive.callRAW (sidechain_core/lib/rpcs/bitnames_rpc.dart:218); BitwindowRPC.callRAW (sidechain_core/lib/rpcs/bitwindow_api.dart:44); BitwindowRPCLive.callRAW (sidechain_core/lib/rpcs/bitwindow_api.dart:174). Rename to `coreRAWCall`. [rule N6]
D21 · Naming Consistency · `TopicIdLength` spells `Id` where 164 names in the project spell it `ID` · ×1
  • `TopicIdLength` spells `Id` where 164 names in the project spell it `ID` bitwindow/server/models/opreturns/opreturns.go:278 — 164 of 165 names in project github.com/LayerTwo-Labs/sidesail/bitwindow/server spell the token `ID` (164 of 165; unit: names in project github.com/LayerTwo-Labs/sidesail/bitwindow/server containing `ID`). Peers: Server.checkElectrumUTXO(walletID) (bitwindow/server/api/bitwindowd/bitwindowd.go:1229); Server.checkBitcoinCoreUTXO(walletID) (bitwindow/server/api/bitwindowd/bitwindowd.go:1241); Server.processPegDataBlocks(sidechainID) (bitwindow/server/api/drivechain/drivechain.go:483); misc.parseItemID (bitwindow/server/api/misc/misc.go:145); misc.parseItemID(hexID) (bitwindow/server/api/misc/misc.go:145). Rename to `TopicIDLength`. [rule N6]
D21 · Naming Consistency · `SyncNodeRpcFromBitcoinConf` spells `Rpc` where 35 names in the project spell it `RPC` · ×1
  • `SyncNodeRpcFromBitcoinConf` spells `Rpc` where 35 names in the project spell it `RPC` sidechain-orchestrator/api/enforcer_conf_handler.go:68 — 35 of 37 names in project github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator spell the token `RPC` (35 of 37; unit: names in project github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator containing `RPC`). Peers: github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/api.coreRPCResult (sidechain-orchestrator/api/orchestrator_handler.go:1164); Handler.callCoreRPC (sidechain-orchestrator/api/orchestrator_handler.go:1172); orchestrator.bitcoindRPCMaxInflight (sidechain-orchestrator/bitcoind_rpc.go:22); orchestrator.bitcoindRPCGate (sidechain-orchestrator/bitcoind_rpc.go:25); orchestrator.bitcoindRPCInflight (sidechain-orchestrator/bitcoind_rpc.go:26). Rename to `SyncNodeRPCFromBitcoinConf`. [rule N6]
D21 · Naming Consistency · `GetExpectedNodeRpcSettings` spells `Rpc` where 35 names in the project spell it `RPC` · ×1
  • `GetExpectedNodeRpcSettings` spells `Rpc` where 35 names in the project spell it `RPC` sidechain-orchestrator/config/enforcer_conf.go:188 — 35 of 37 names in project github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator spell the token `RPC` (35 of 37; unit: names in project github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator containing `RPC`). Peers: github.com/LayerTwo-Labs/sidesail/sidechain-orchestrator/api.coreRPCResult (sidechain-orchestrator/api/orchestrator_handler.go:1164); Handler.callCoreRPC (sidechain-orchestrator/api/orchestrator_handler.go:1172); orchestrator.bitcoindRPCMaxInflight (sidechain-orchestrator/bitcoind_rpc.go:22); orchestrator.bitcoindRPCGate (sidechain-orchestrator/bitcoind_rpc.go:25); orchestrator.bitcoindRPCInflight (sidechain-orchestrator/bitcoind_rpc.go:26). Rename to `GetExpectedNodeRPCSettings`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 1 of 724 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 724 of the 1081 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: sail_ui/lib/widgets/inputs/text_form_field.dart. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D34 · Knowledge Freshness · Orphaned file · ×1
  • Orphaned file sail_ui/lib/widgets/inputs/text_form_field.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M1 · Documentation (README) · Thin README · ×1
  • Thin README README.md:1 — The root README is 26 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
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 16/30 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `bbc`, `bbc/macos`, `bitassets/macos`, `bitnames/macos`, `bitwindow/macos` and 9 more.
P3 · Security & performance tooling · Dependabot does not watch github-actions/bun/gitsubmodule · ×1
  • Dependabot does not watch github-actions/bun/gitsubmodule REDACTED:4 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `github-actions`, `bun`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate REDACTED:57 — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code · Unused export 'cn' · ×1
  • Unused export 'cn' coinnews/lib/utils.ts:4 — Nothing imports this binding — it is safe to review for removal.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected scripts/remote-enforcer/Caddyfile:9 — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `Caddyfile` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
X2 · Cancellation propagation · Not all functions that make a request accept a context.Context or an AbortSignal · ×1
  • Not all functions that make a request accept a context.Context or an AbortSignal — Only 44/49 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X4 · Structured logging · Interpolated log message defeats structured logging · ×1
  • Interpolated log message defeats structured logging bitwindow/server/engines/coinnews.go:152 — `Msg` at line 152 is handed a message assembled at the call — `fmt.Sprintf` with values, or a string concatenated with a value — so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass a constant message and the values as attributes instead: `slog.Msg("order moved", "order_id", orderID, "status", status)` with log/slog, `logger.Msg("order moved", zap.String("order_id", orderID))` with zap, `log.WithFields(log.Fields{"order_id": orderID}).Msg("order moved")` with logrus, or `log.Info().Str("order_id", orderID).Msg("order moved")` with zerolog.
Minor — 34 finding(s)
D12 · Dependency Hygiene · Outdated · ×34
  • Outdated: connectrpc.com/connect — `connectrpc.com/connect` is required at v1.18.1 in REDACTED, but v1.21.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get connectrpc.com/connect@v1.21.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: connectrpc.com/connect — `connectrpc.com/connect` is required at v1.18.1 in REDACTED, but v1.21.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get connectrpc.com/connect@v1.21.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: connectrpc.com/connect — `connectrpc.com/connect` is required at v1.19.0 in REDACTED, but v1.21.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get connectrpc.com/connect@v1.21.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: connectrpc.com/connect — `connectrpc.com/connect` is required at v1.20.0 in REDACTED, but v1.21.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get connectrpc.com/connect@v1.21.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: connectrpc.com/grpcreflect — `connectrpc.com/grpcreflect` is required at v1.3.0 in REDACTED, but v1.3.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get connectrpc.com/grpcreflect@v1.3.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/brianvoe/gofakeit/v7 — `github.com/brianvoe/gofakeit/v7` is required at v7.18.2 in REDACTED, but v7.18.8 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/brianvoe/gofakeit/v7@v7.18.8 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/btcsuite/btcd — `github.com/btcsuite/btcd` is required at v0.25.0 in REDACTED, but v0.27.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/btcsuite/btcd@v0.27.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/btcsuite/btcd — `github.com/btcsuite/btcd` is required at v0.25.0 in REDACTED, but v0.27.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/btcsuite/btcd@v0.27.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/btcsuite/btcd/btcec/v2 — `github.com/btcsuite/btcd/btcec/v2` is required at v2.3.6 in REDACTED, but v2.5.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/btcsuite/btcd/btcec/v2@v2.5.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/btcsuite/btcd/btcutil — `github.com/btcsuite/btcd/btcutil` is required at v1.1.6 in REDACTED, but v1.2.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/btcsuite/btcd/btcutil@v1.2.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/btcsuite/btcd/btcutil — `github.com/btcsuite/btcd/btcutil` is required at v1.1.6 in REDACTED, but v1.2.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/btcsuite/btcd/btcutil@v1.2.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/btcsuite/btcd/chaincfg/chainhash — `github.com/btcsuite/btcd/chaincfg/chainhash` is required at v1.1.0 in REDACTED, but v1.2.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/btcsuite/btcd/chaincfg/chainhash@v1.2.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/bufbuild/protovalidate-go — `github.com/bufbuild/protovalidate-go` is required at v0.10.0 in REDACTED, but v1.4.0 is the module's current release — so this build is missing every fix published since, including any security fix. This crosses a major version — v0 releases carry no compatibility promise, so read the changelog before taking it. Run `go get github.com/bufbuild/protovalidate-go@v1.4.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/fsnotify/fsnotify — `github.com/fsnotify/fsnotify` is required at v1.9.0 in REDACTED, but v1.10.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/fsnotify/fsnotify@v1.10.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/gowebpki/jcs — `github.com/gowebpki/jcs` is required at v1.0.1 in REDACTED, but v1.0.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gowebpki/jcs@v1.0.2 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/mattn/go-sqlite3 — `github.com/mattn/go-sqlite3` is required at v1.14.45 in REDACTED, but v1.14.53 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/mattn/go-sqlite3@v1.14.53 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/mattn/go-sqlite3 — `github.com/mattn/go-sqlite3` is required at v1.14.32 in REDACTED, but v1.14.53 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/mattn/go-sqlite3@v1.14.53 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/mattn/go-sqlite3 — `github.com/mattn/go-sqlite3` is required at v1.14.45 in REDACTED, but v1.14.53 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/mattn/go-sqlite3@v1.14.53 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/rs/zerolog — `github.com/rs/zerolog` is required at v1.34.0 in REDACTED, but v1.35.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rs/zerolog@v1.35.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/rs/zerolog — `github.com/rs/zerolog` is required at v1.33.0 in REDACTED, but v1.35.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/rs/zerolog@v1.35.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/samber/lo — `github.com/samber/lo` is required at v1.50.0 in REDACTED, but v1.53.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/samber/lo@v1.53.0 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.10.0 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.11.1 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.11.1 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.11.1 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
  • + 9 more in this group — see findings.md.

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-74d82b7fd8084736af8feee59c10a6b6/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-74d82b7fd8084736af8feee59c10a6b6/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3200" --report-format json --report-path /tmp/watchdog-gitleaks-74d82b7fd8084736af8feee59c10a6b6/history-2.json --exit-code 0 --source .2artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=1470" --report-format json --report-path /tmp/watchdog-gitleaks-74d82b7fd8084736af8feee59c10a6b6/history-3.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-74d82b7fd8084736af8feee59c10a6b6/tree.json --exit-code 0 --source .2artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude bbc/lib/gen --exclude bitassets/lib/gen --exclude bitnames/lib/gen --exclude bitwindow/lib/gen --exclude bitwindow/server/gen --exclude bitwindow/server/tests/mocks --exclude coinnews/gen --exclude coinnews/server/gen --exclude coinshift/lib/gen --exclude dc-hub/gen --exclude dc-hub/server/gen --exclude ecash-broadcaster/gen --exclude photon/lib/gen --exclude sidechain-orchestrator/gen --exclude sidechain_core/lib/gen --exclude thunder/lib/gen --exclude truthcoin/lib/gen --exclude zside/lib/gen .140artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .62artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .13artifacts/raw/trivy-config.json
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.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 01a1ea5a-4936-7600-aa3c-9c577720aa37 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md